Problem with evaluating the exact value of an integral
Evaluate the integral $\int_0^1 \cos(\ln(x)) \, dx$
I was able to evaluate the improper integral which is:
$$\frac{x\left(\sin \ln x + \cos \ln x\right)}{2}$$
I was using the substitution $u = \ln x$, and afterward I did integration by parts twice and got the result:
$$\frac{e^u\left( \sin(u) + \cos(u) \right)}{2}$$
Applying $x=1$ we get $u = 0$ and applying $x=0$ we get $u=-\infty$.
So how can it be calculated?
$\endgroup$ 32 Answers
$\begingroup$Set
$$\begin{align} u &= \ln(x) \implies e^{u}du = dx \\ x &= 0 \implies u = -\infty \\ x &= 1 \implies u = 0 \end{align}$$
Hence, you get
$$I = \int_{-\infty}^{0} e^{u}\cos(u) du$$
Integrating by parts twice, first with $v = e^{u}$, $w' = \cos(u)$ and secondly with $v = e^{u}$, $w' = \sin(u)$
$$\begin{align} I &= \int_{-\infty}^{0} e^{u}\cos(u) du \\ &= e^{u}\sin(u) \biggr|_{-\infty}^{0} - \int_{-\infty}^{0} e^{u}\sin(u) du \\ &= 0 - \int_{-\infty}^{0} e^{u}\sin(u) du \\ &= -\bigg[ -e^{u}\cos(u)\biggr|_{-\infty}^{0} + \int_{-\infty}^{0} e^{u}\cos(u) du \biggr] \\ &= 1 - \int_{-\infty}^{0} e^{u}\cos(u) du \\ &= 1 - I \end{align}$$
Therefore
$$\begin{align} I &= 1 - I \\ \implies I &= \frac{1}{2} \\ \end{align}$$
Wolfram gives the same result.
$\endgroup$ 2 $\begingroup$Hint
$$ \lim_{x\to 0^+} -\frac{x}{2}\leq \lim_{x\to 0^+} \frac{x\sin(\ln(x))}{2}\leq \lim_{x\to 0^+} \frac{x}{2} $$
Works also for $x\cos(\ln(x))$.
$\endgroup$ 1