Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

$intsin|ln x|dx$

Question

$intsin|ln x|dx$

Explanation:

Step1: Use substitution

Let $u = \ln x$, then $x=e^{u}$ and $dx = e^{u}du$. The integral becomes $\int\sin|u|e^{u}du$.

Step2: Consider cases for $u$

When $u\geq0$, the integral is $\int\sin(u)e^{u}du$. Use integration - by - parts. Let $I=\int\sin(u)e^{u}du$. Let $a = \sin(u)$, $db=e^{u}du$, then $da=\cos(u)du$, $b = e^{u}$. By the integration - by - parts formula $\int a db=ab-\int b da$, we have $I = e^{u}\sin(u)-\int e^{u}\cos(u)du$.
For $\int e^{u}\cos(u)du$, use integration - by - parts again. Let $a=\cos(u)$, $db = e^{u}du$, then $da=-\sin(u)du$, $b = e^{u}$. So $\int e^{u}\cos(u)du=e^{u}\cos(u)+\int e^{u}\sin(u)du=e^{u}\cos(u)+I$. Then $I = e^{u}\sin(u)-(e^{u}\cos(u)+I)$, and $2I=e^{u}(\sin(u)-\cos(u))$, so $I=\frac{1}{2}e^{u}(\sin(u)-\cos(u))+C_1$.
When $u < 0$, the integral is $\int-\sin(u)e^{u}du$. Using integration - by - parts in a similar way as above. Let $I'=\int-\sin(u)e^{u}du$. Let $a =-\sin(u)$, $db=e^{u}du$, then $da=-\cos(u)du$, $b = e^{u}$. By integration - by - parts, $I'=-e^{u}\sin(u)-\int - e^{u}\cos(u)du=-e^{u}\sin(u)+\int e^{u}\cos(u)du$. After another round of integration - by - parts for $\int e^{u}\cos(u)du$ and solving for $I'$, we get $I'=\frac{1}{2}e^{u}(-\sin(u)-\cos(u))+C_2$.

Step3: Substitute back $x$

Since $u = \ln x$, when $x\geq1$ (i.e., $u\geq0$), the integral $\int\sin|\ln x|dx=\frac{1}{2}x(\sin(\ln x)-\cos(\ln x))+C_1$. When $0 < x<1$ (i.e., $u < 0$), the integral $\int\sin|\ln x|dx=\frac{1}{2}x(-\sin(\ln x)-\cos(\ln x))+C_2$. We can combine them as $\frac{1}{2}x(\sin(\ln x)\text{sgn}(\ln x)-\cos(\ln x))+C$, where $\text{sgn}(t)$ is the sign function: $\text{sgn}(t)=

$$\begin{cases}1, & t>0\\0, & t = 0\\- 1, & t<0\end{cases}$$

$.

Answer:

$\frac{1}{2}x(\sin(\ln x)\text{sgn}(\ln x)-\cos(\ln x))+C$