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

  • MHB
  • Thread starter Pedro1
  • Start date
  • Tags
    Integral
In summary, the solution is:$$\int \cos(\ln x) dx = \frac12\left[e^{\ln (x)} \cos(\ln(x)) + \sin(\ln(x))e^{\ln(x)}\right] + C = \frac{x}{2}\left[\cos(\ln(x)) + 2\sin(\ln(x))\right] + C$$
  • #1
Pedro1
4
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
  • #2
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 \(\displaystyle \int \cos (u)\, e^{u}du\) (integrating the exponential and differentiating the cosine). That will lead to something looking like \(\displaystyle \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 \(\displaystyle \int \cos (u)\, e^{u}du\).
 
  • #3
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 \(\displaystyle u=\cos(\ln x) <=> du = \frac{-\sin(\ln x)}{x} dx\) and \(\displaystyle 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,
\(\displaystyle |\pi\rangle\)
 
  • #4
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 \(\displaystyle \int \cos (u)\, e^{u}du\) (integrating the exponential and differentiating the cosine). That will lead to something looking like \(\displaystyle \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 \(\displaystyle \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)$.
 
  • #5
a slightly different approach after this step,
\(\displaystyle \int\cos{u}e^udu=\cos{u}e^u+\int\sin{u}e^udu\)
\(\displaystyle \int(\cos{u}-\sin{u})e^udu=\cos{u}e^u\)
\(\displaystyle \int\sqrt{2}\cos{(u+\frac{\pi}{4})}e^udu=\cos{u}e^u\)
there by,\(\displaystyle u+\frac{\pi}{4}=x\)
and you can proceed in traditional way
 
Last edited:
  • #6
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 \(\displaystyle u=\cos(\ln x) <=> du = \frac{-\sin(\ln x)}{x} dx\) and \(\displaystyle 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,
\(\displaystyle |\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.
 

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

How do I know which integration method to use?

There are several integration methods, such as substitution, integration by parts, and partial fractions. To determine which method is most appropriate for a given integral, you should first analyze the structure of the integrand and look for patterns or familiar functions. You can also use a table of integration formulas to guide your decision. Ultimately, practice and experience will help you become more familiar with different integration methods and their applications.

Can I use a calculator to integrate?

Yes, most scientific calculators have a built-in integral function that can perform numerical integration. However, it is important to understand the concepts and techniques behind integration in order to properly interpret and use the results from a calculator. Calculators should only be used as a tool to check your work or to save time on more complex integrals.

How do I handle indefinite integrals?

Indefinite integrals, also known as antiderivatives, do not have upper and lower limits and result in a function rather than a numerical value. To find an indefinite integral, you must use integration techniques to find a general form of the function. This means including a constant of integration, as the derivative of a constant is always 0.

What if I can't solve the integral?

Sometimes, an integral may be too complex to solve using traditional integration techniques. In these cases, you may need to use numerical methods, such as Simpson's rule or the trapezoidal rule, to approximate the value of the integral. Alternatively, you can use software programs or online tools to calculate the integral for you.

How do I check my answer?

To check your answer to an integral, you can differentiate the result and see if it matches the original integrand. This is known as the Fundamental Theorem of Calculus. Additionally, you can use the properties of integrals, such as linearity and substitution, to manipulate and simplify your answer and compare it to the original integral. It is also helpful to use a graphing calculator or graphing software to visualize the integral and its solution.

Back
Top