How Do You Solve the Integral of Cos(ln(x))?

  • Context: MHB 
  • Thread starter Thread starter Pedro1
  • Start date Start date
  • Tags Tags
    Integral
Click For Summary

Discussion Overview

The discussion revolves around the integral of the function $\cos(\ln x)$, specifically the expression $\int \cos(\ln x) \mathrm{d}x$. Participants explore various methods for solving this integral, including substitution and integration by parts, while addressing the challenges encountered in the process.

Discussion Character

  • Exploratory
  • Mathematical reasoning
  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant suggests using substitution with $u = \ln x$, leading to the integral $\int \cos(u)e^{u} \mathrm{d}u$, but struggles to complete the integration.
  • Another participant agrees with the use of integration by parts on $\int \cos(u)e^{u} \mathrm{d}u$, noting it leads to a recursive situation that returns to a similar integral.
  • A different approach is proposed, suggesting that after applying integration by parts, one can express the integral in terms of itself, leading to a solvable equation.
  • Some participants express uncertainty about the validity of their methods, indicating potential infinite loops in their reasoning.
  • One participant provides a detailed breakdown of the integration by parts process, ultimately leading to a formula for the integral in terms of $x$ and trigonometric functions.

Areas of Agreement / Disagreement

Participants generally agree on the use of integration by parts and substitution as valid methods for tackling the integral. However, there is no consensus on the best approach or the validity of certain methods, with some expressing doubts about potential infinite loops in their reasoning.

Contextual Notes

Some methods discussed may lead to recursive integrals, and participants note the challenge of resolving these without arriving at a definitive conclusion. The discussion includes various assumptions and conditions that are not fully resolved.

Pedro1
Messages
4
Reaction score
0
Hi, this is my first question in this forum.

Find $\int \cos(\ln x) \mathrm dx$.

I started by substitution. Let $u=\ln x$, so we get $\mathrm du=\frac{1}{x} \mathrm dx$ and $x=e^{u}$. Then the integral stays like this:

$$\int \cos(u)e^{u} \mathrm du$$

But now I can't managed how to finish. I've tryed integration by parts, but it seems like there is allways an integral remainingto integrate by parts.

Can you help me? Thanks
 
Physics news on Phys.org
Pedro said:
Hi, this is my first question in this forum.

Find $\int \cos(\ln x) \mathrm dx$.

I started by substitution. Let $u=\ln x$, so we get $\mathrm du=\frac{1}{x} \mathrm dx$ and $x=e^{u}$. Then the integral stays like this:

$$\int \cos(u)e^{u} \mathrm du$$

But now I can't managed how to finish. I've tryed integration by parts, but it seems like there is allways an integral remainingto integrate by parts.

Can you help me? Thanks
Hi Pedro and welcome to MHB.

You have made a good start on this problem, and you are right to use integration by parts on the integral $$\int \cos (u)\, e^{u}du$$ (integrating the exponential and differentiating the cosine). That will lead to something looking like $$\int \sin (u)\, e^{u}du$$. The trick now is to integrate that by parts (again integrating the exponential, and differentiating the sine). At first sight, this looks unpromising, because it leads you back to something looking very like what you started out with. But look at it more closely, and you will see that in fact it can be rearranged to give you a formula for $$\int \cos (u)\, e^{u}du$$.
 
Pedro said:
Hi, this is my first question in this forum.

Find $\int \cos(\ln x) \mathrm dx$.

I started by substitution. Let $u=\ln x$, so we get $\mathrm du=\frac{1}{x} \mathrm dx$ and $x=e^{u}$. Then the integral stays like this:

$$\int \cos(u)e^{u} \mathrm du$$

But now I can't managed how to finish. I've tryed integration by parts, but it seems like there is allways an integral remainingto integrate by parts.

Can you help me? Thanks
Hello Pedro,
I have not really spend time and check if this works but you should be able to use integrate by part with $$u=\cos(\ln x) <=> du = \frac{-\sin(\ln x)}{x} dx$$ and $$ dv=dx <=>v=x$$ now when I think about this I think it will be infinity loop. Well I really don't have time to check this now as I have to go soon but I hope this is correctly as I remember from when I did one.

Edit: now when I read Opalg comment maybe my method is not valid.
Regards,
$$|\pi\rangle$$
 
Opalg said:
Hi Pedro and welcome to MHB.

You have made a good start on this problem, and you are right to use integration by parts on the integral $$\int \cos (u)\, e^{u}du$$ (integrating the exponential and differentiating the cosine). That will lead to something looking like $$\int \sin (u)\, e^{u}du$$. The trick now is to integrate that by parts (again integrating the exponential, and differentiating the sine). At first sight, this looks unpromising, because it leads you back to something looking very like what you started out with. But look at it more closely, and you will see that in fact it can be rearranged to give you a formula for $$\int \cos (u)\, e^{u}du$$.

Just to elaborate on Opalg's tip: after substituting $t = \ln(x)$, you correctly ended up with
$$
\int \cos (t)\, e^{t}dt
$$
Now to do integration by parts, begin by proceeding as usual. Take:
$$
u = \cos(t)\\
du = -\sin(t)\,dt\\
dv = e^t dt\\
v = e^t
$$
And you end up with
$$
\int \cos (t)\, e^{t}dt = e^t \cos(t) - \int (-\sin(t)\,e^t dt)\\
=e^t \cos(t) + \int \sin(t)\,e^t dt
$$
Now, in order to do the second integral, we once again integrate by parts, taking
$$
u = \sin(t)\\
du = \cos(t)\,dt\\
dv = e^t dt\\
v = e^t
$$
and ending up with
$$
\int \sin(t)\,e^t dt = \sin(t)e^t - \int \cos(t)e^t dt
$$
Which, substituting the above back in, gives us
$$
\int \cos (t)\,e^t dt = e^t \cos(t) + \sin(t)e^t - \int \cos(t)e^t dt
$$
As you indicated, if we were to continue with integration by parts, the process would never end since we have come full circle. What we will do instead at this point is make the above into an algebra problem. Defining $I = \int \cos(t)e^t dt$ to be our integral, we can rewrite the above equation as
$$
I = e^t \cos(t) + \sin(t)e^t - I + C
$$
From there, we can simply solve for $I$. We find
$$
2I = 2\left[\int \cos(t)e^t dt\right]= e^t \cos(t) + \sin(t)e^t + C\\
I = \int \cos(t)e^t dt =\frac12\left[e^t \cos(t) + \sin(t)e^t\right] + C
$$
Now, to solve the original problem, you have to substitute back in $t=\ln(x)$.
 
a slightly different approach after this step,
$$\int\cos{u}e^udu=\cos{u}e^u+\int\sin{u}e^udu$$
$$\int(\cos{u}-\sin{u})e^udu=\cos{u}e^u$$
$$\int\sqrt{2}\cos{(u+\frac{\pi}{4})}e^udu=\cos{u}e^u$$
there by,$$u+\frac{\pi}{4}=x$$
and you can proceed in traditional way
 
Last edited:
Petrus said:
Hello Pedro,
I have not really spend time and check if this works but you should be able to use integrate by part with $$u=\cos(\ln x) <=> du = \frac{-\sin(\ln x)}{x} dx$$ and $$ dv=dx <=>v=x$$ now when I think about this I think it will be infinity loop. Well I really don't have time to check this now as I have to go soon but I hope this is correctly as I remember from when I did one.

Edit: now when I read Opalg comment maybe my method is not valid.
Regards,
$$|\pi\rangle$$

Your method is actually valid - it will just continue looping through integrals of $\cos(\ln x)$ and $\sin(\ln x)$; however, you get back to $\cos(\ln x)$ after applying parts twice. It's at this point that you treat the integral as a variable and solve for it.

Meaning:

Let $u=\cos(\ln x)\implies \,du= -\dfrac{\sin(\ln x)}{x}\,dx$ and $\,dv=\,dx\implies v=x$, then
\[\int \cos(\ln x)\,dx = x\cos(\ln x)+\int\sin(\ln x)\,dx\]
Here, let $u=\sin(\ln x)\implies \,du = \dfrac{\cos(\ln x)}{x}\,dx$ and $\,dv=\,dx \implies v=x$. Thus,
\[\int\sin(\ln x)\,dx = x\sin(\ln x) - \int\cos(\ln x)\,dx\]
Putting the two pieces together yields
\[\int \cos(\ln x)\,dx = x\cos(\ln x)+\left[x\sin(\ln x)-\int\cos(\ln x)\,dx\right]\]
Thus,
\[2\int\cos(\ln x)\,dx = x(\cos(\ln x)+\sin(\ln x))+C\implies \boxed{\displaystyle\int \cos(\ln x)\,dx = \tfrac{1}{2}x(\cos(\ln x) + \sin(\ln x))+C}\]

I hope this clarifies things for the OP.
 

Similar threads

  • · Replies 8 ·
Replies
8
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 17 ·
Replies
17
Views
5K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 27 ·
Replies
27
Views
2K
  • · Replies 4 ·
Replies
4
Views
4K