# Integrate cos(lnx)dx

Cudi1

let u=lnx
du=1/x*dx
dv=cosdx
v=-sin

## Homework Equations

Now im confused as im getting nowhere with this substiution, i learned the LIPTE rule but its quite confusing, i have a function within a function

## The Attempt at a Solution

Cudi1
for integration by parts to work, i would need two differentiable functions, but the cosdx is not differentiable would it need to be cosxdx for it to be differentiated?

Dickfore
Is the integral:

$$\int{\cos{(\ln{(x)})} \, dx}$$

If it is, make the substitution:

$$t = \ln{(x)} \Rightarrow x = e^{t}$$

and substitute everywhere. The integral that you will get can be integrated by using integration by parts twice, or, if you know complex numbers, by representing the trigonometric function through the complex exponential.

Cudi1
it is just cos(lnx)dx

Dickfore
then proceed as I told you.

Cudi1
ok im getting an integral of the form : coste^tdt. is this correct?

Dickfore
yes. proceed by integration by parts or using complex exponentials.

Cudi1
ok thank you for the help, quick question why do we have to let t=lnx?

Dickfore
We have a composite function $\cos{(\ln{x})}$ of two elementary functions (trigonometric and logarithmic). As a combination, it does not have an immediate table integral. But, the method of substitution, which is nothing but inverting the chain rule for derivatives of composite functions, works exactly for such compound functions.

Cudi1
thank you, lastly i end up with 1/2(e^tcost-e^tsint), do i sub back , so that x=e^t and t=lnx
which leaves me with : 1/2x(cos(lnx)-sin(lnx)+c?

Dickfore
I think the sign in front of the sine should be + and the result should be:

$$\frac{1}{2} x \left[\cos{\left(\ln{(x)}\right)} + \sin{\left(\ln{(x)}\right)}\right]+ C$$

Cudi1
yes, made a slight mistake thank you very much for the help, i tried doing it another way by letting u=cos(lnx) and dv=dx and i arrived at the same answer

Dickfore
yes, the x's will cancel.