# Evaluate integral with substitution and then by parts - wondering what I did wrong

Evaluate the integral by using substitution prior to integration by parts

Integral is:

$\int sin(lnx) dx$

$w = lnx$ .... $dw = \frac 1x$ .... $dx = e^u dw$

Integrating by parts I get

$\int sin(w) dw = sin(w)e^w - \int cos(w)e^w dw$

and I don't know how to go from there. I tried doing integration by parts again but I'm not getting anywhere. Any help is appreciated.

Edit: Integrating by parts again I get:

$e^wsin(w) - e^wcos(w) + \int e^wsin(w) dw$

• Integration by parts again should work. Show your calculation please. Commented Oct 5, 2015 at 17:54
• It works if you do integration by parts twice, calling $I=\int e^u\sin{u}du$ , and you find $I$ reappears so you can isolate it Commented Oct 5, 2015 at 17:54
• I'm not understanding. I get how to do the second integration by parts, but I don't know how to integrate $\int e^wsin(w) dw$ ... I don't understand how you get a 1/2 Commented Oct 5, 2015 at 18:08

$$\int \sin(\ln x) dx=\int \sin(u)e^u du=\sin(u)e^u-\int \cos(u)e^u du$$ now by doing same method we have, $$\int \cos(u)e^u du=-\sin(u)e^u+\int \sin(u)e^u du$$ combine this two.

$$\int {\sin (\ln (x))dx}$$

using the substitution $u=ln(x)$ and considering $dx = {e^u}du$ it becomes

$$\int {\sin (u){e^u}du}$$

Now we use integration by parts two times to get

\eqalign{ & \int {\sin (u){e^u}du} = \sin (u){e^u} - \int {\cos (u){e^u}du} + C \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, = \sin (u){e^u} - \left( {\cos (u){e^u} - \int { - \sin (u){e^u}du} } \right) + C \cr & \,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\, = \sin (u){e^u} - \cos (u){e^u} - \int {\sin (u){e^u}du} + C \cr}

Finally, solve the above equation for $\int {\sin (u){e^u}du}$ which leads to

$$\int {\sin (u){e^u}du} = {1 \over 2}{e^u}\left( {\sin (u) - \cos (u)} \right) + {1 \over 2}C$$

if you want your final answer in $x$ just substitute $u=ln(x)$ to get

$$\int {\sin (\ln (x))dx} = {1 \over 2}x\left( {\sin (\ln (x)) - \cos (\ln (x))} \right) + {1 \over 2}C$$

• How do you integrate $\int sin(u) e^u du$.. I'm not understanding how you get 1/2 Commented Oct 5, 2015 at 18:09
• When I integrated twice by parts, the $-\int {\sin (u){e^u}du}$ appeared on the right side. Take it to the left side to get $2\int {\sin (u){e^u}du}$ and then solve for $\int {\sin (u){e^u}du}$. OK? Commented Oct 5, 2015 at 18:11
• Ahhhhhh thank you! :) Commented Oct 5, 2015 at 18:13