0

I need to find the indefinite integral: $\int \cos(\log(x)) dx$.

I've tried using u-substitution, setting $u=\log(x)$. Then I get: $\int \cos(u)du$, where $du$ is $\frac{1}{x}dx$.

The worked solutions I can see put an $e^u$ in there as well, and I'm not really sure why. How should I go about solving this problem?

Thanks for your time.

farruhota
  • 31,482

2 Answers2

2

Let $\ln x=u\implies x=e^u,dx=e^u\ du$

$$\int\cos(\ln x)dx=\int e^u\cos u\ du $$

Now use Integration of $e^{ax}\cos bx$ and $e^{ax}\sin bx$

See also : Set $n=-1$ in $100$-th derivative of the function $f(x)=e^{x}\cos(x)$

1

Better way:

Recall that $$\cos x=\frac{e^{ix}+e^{-ix}}2$$ So $$\cos \log x=\frac{e^{i\log x}+e^{-i\log x}}2=\frac{x^i+x^{-i}}2$$ And hence $$\int\cos\log x\,\mathrm dx=\frac12\left[\frac1{1+i}x^{1+i}+\frac{1}{1-i}x^{1-i}\right]+C$$ Then using $$\sin x=\frac{e^{ix}-e^{-ix}}{2i}$$ We have that $$\int\cos\log x\,\mathrm dx=\frac{x}2[\cos\log x+\sin\log x]+C$$

clathratus
  • 17,161