How do you evaluate the integral #int cos^2(lnx)#?

1 Answer
Jan 29, 2017

#1/10xcos(2lnx)+1/5xsin(2lnx)+1/2x+C#

Explanation:

#I=intcos^2(lnx)color(red)(dx)#

First, let #t=lnx#. This implies that #x=e^t# and that #dt=1/xdx#. Then:

#I=intcos^2(lnx)(x)(1/xdx)#

#I=intcos^2(t)e^tdt#

From the identity #cos(2t)=2cos^2(t)-1#, we write that #cos^2(t)=1/2cos(2t)+1/2#. Then:

#I=int(1/2cos(2t)+1/2)e^tdt#

#I=1/2inte^tcos(2t)dt+1/2inte^tdt#

#I=1/2inte^tcos(2t)dt+1/2e^t#

Let #J=inte^tcos(2t)dt#. This will be tackled in isolation. We will use integration by parts to solve it. Let:

#{(u=cos(2t),=>,du=-2sin(2t)dt),(dv=e^tdt,=>,v=e^t):}#

Then by the IBP formula:

#J=e^tcos(2t)+int2e^tsin(2t)dt#

Reapplying IBP to the remaining integral with new #u# and #dv#:

#{(u=2sin(2t),=>,du=4cos(2t)),(dv=e^tdt,=>,v=e^t):}#

So:

#J=e^tcos(2t)+2e^tsin(2t)-4inte^tcos(2t)dt#

Notice that #J=inte^tcos(2t)dt# has reappeared in the expression. We can now do some "integral algebra" to solve for #J#, the integral.

#J=e^tcos(2t)+2e^tsin(2t)-4J#

#5J=e^tcos(2t)+2e^tsin(2t)#

#J=1/5e^tcos(2t)+2/5e^tsin(2t)#

Returning to #I#:

#I=1/2J+1/2e^t#

#I=1/10e^tcos(2t)+1/5e^tsin(2t)+1/2e^t#

Our original substitution was #t=lnx#, also implying that #x=e^t#, so:

#I=1/10xcos(2lnx)+1/5xsin(2lnx)+1/2x+C#