Solving the Integral of cos(2x)

An error occurred trying to load this video.

Try refreshing the page, or contact customer support.

Coming up next: Solving the Integral of cos(x)

You're on a roll. Keep up the good work!

Take Quiz Watch Next Lesson
Your next lesson will play in 10 seconds
  • 0:00 Steps to Solve
  • 4:19 Checking Your Work
Save Save Save

Want to watch this again later?

Log in or sign up to add this lesson to a Custom Course.

Log in or Sign up

Speed Speed

Recommended Lessons and Courses for You

Lesson Transcript
Laura Pennington

Laura received her Master's degree in Pure Mathematics from Michigan State University. She has 15 years of experience teaching collegiate mathematics at various institutions.

Expert Contributor
Kathryn Boddie

Kathryn earned her Ph.D. in Mathematics from UW-Milwaukee in 2019. She has over 10 years of teaching experience at high school and university level.

In this lesson, we will find the integral of cos(2x) using integration by substitution in a step-by-step process. We will then go on to check our work using derivatives and the chain rule for derivatives.

Steps to Solve

We are interested in finding the integral of cos(2x). To do this, we are going to make use of integration by substitution. Integration by substitution is an integration method that can be used on integrals that are in the form ∫ f(g(x)) dx, and can be put in the following form:

f(g(x)) ⋅ g ' (x) dx

When we have an integral in this form, we can make a u-substitution where u = g(x), so du = g ' (x) dx. By making this substitution, we end up with the following:

f(g(x)) ⋅ g ' (x) dx = ∫ f(u) du

Then, we can find the integral of f(u) and plug g(x) back in for u to get the integral. Hmmm…that sounds a little confusing. Let's see if writing this process out in steps makes it a bit more clear.

To find ∫ f(g(x)) ⋅ g ' (x) dx, we follow these steps.

  1. Let u = g(x). Then du = g ' (x) dx, and dx = (1/g ' (x))du.
  2. Plug these values into the integral appropriately to get it in the form ∫ f(u) du or ∫ af(u) du, where a is a constant.
  3. Evaluate the integral in terms of u.
  4. Plug g(x) back in for u.

Alright, these steps don't seem so bad, but if you really want to learn this, it helps to practice it out in the form of problems, so let's find the integral of cos(2x) using this process!

There are a few more facts that we need to know to be able to find this integral, and those are as follows:

  • The derivative of 2x is 2.
  • The integral of cos(x) is sin(x) + C, where C is a constant.
  • If a is a constant, then ∫ af(x) dx = af(x) dx.

Okay, let's get to work!

First, we notice that if we let f(x) = cos(x) and g(x) = 2x, then f(g(x)) = cos(2x), so we are finding the integral of f(g(x)). Recognizing this makes our substitution much easier, which brings us to our first step, and that is to let u = g(x) and du = g ' (x) dx.


Alright, we have that u = 2x and that dx = (1/2)du. The next step is to plug these values into our integral. That is, we plug in u for 2x, and we plug in (1/2)du for dx.


Moving on to the third step, we see that we want to find ∫ (1/2)cos(u) du. To do this, we make use of our facts that we mentioned earlier and find:


We have that ∫ (1/2)cos(u) du = (1/2)sin(u) + C, where C is a constant. We're almost there! Just one last step! We need to plug 2x back in for u to get (1/2)sin(2x) + C, where C is a constant.


The integral of cos(2x) is (1/2)sin(2x) + C, where C is a constant.


Checking Your Work

Well, we've got our answer, but there were a few steps involved, so we probably want to make sure we didn't make any mistakes along the way. In other words, it would be nice to be able to check that our answer is correct. Thankfully, we can use derivatives to do so!

To unlock this lesson you must be a Member.
Create your account

Additional Activities

Challenge Problems using Substitution

Now that we have learned how to find ∫ cos(2x)dx using substitution, let's try substitution on some other integrals. Watch out - the problems get more challenging further down the list!

Problem List

1. ∫ cos(1/2 x) dx

2. ∫ sin(3x) dx

3. ∫ xex2 dx

4. ∫ 2x ln(x2 + 1)/(x2 + 1) dx

Some facts you may need are

d/dx ln(x) = 1/x

∫ ex dx = ex +c

∫ sin(x)dx = -cos(x) + c

just in case you needed a reminder!


1. ∫ cos(1/2 x) dx

We know how to find the anti-derivative of cos(x), but the input for our cosine function is more complicated. Let's "hide" it with substitution. Let

u = 1/2 x

du = 1/2 dx

2du = dx

Remember that the du is found by finding the derivative of u. Rewriting the integral by substituting this information in, we have

∫ cos(1/2 x) dx = ∫ 2cos(u)du = 2sin(u)+ C


u = 1/2 x

back in, we have

2sin(1/2 x) +C

2. &int sin(3x) dx

We will again "hide" the more complicated input with substitution. Let

u = 3x

du = 3dx

1/3 du = dx

Substituting in,

∫ sin(3x) dx = ∫ 1/3 sin(u) du = -1/3cos(u) + C

Finally, substituting u = 3x back in, we have -1/3 cos(3x) + C

3. &int xex2 dx

We know the anti-derivative of ex, but ex2 is tricky. "Hide" the complicated exponent in the substitution. Let

u = x2

du = 2x dx

1/2x du = dx

But what do we do about those extra x's? Well, substitute in what we know, and see what happens.

∫ xex2 dx = ∫ xeu 1/2x du

The x's will cancel out! We have

&int xeu 1/2x du = ∫ 1/2 eu du = 1/2 eu + C

Substituting u = x2 back in, we have 1/2 ex2 + C

4. ∫ 2xln(x2 + 1)/(x2 + 1) dx

This one is the trickiest. We don't commonly know the anti-derivative of a natural logarithm! However, notice that that term x2 + 1 can be found in both the numerator and denominator. What if we "hide" that logarithm in our substitution? Let

u = ln(x2 + 1)

du = 1/(x2 + 1) (x2 + 1)' dx

du = 2x/(x2 + 1) dx

(x2 + 1)/(2x) du = dx

Note that the chain rule was used to find du

Substituting in what we know,

∫ 2xln(x2 + 1)/(x2 + 1) dx = ∫(2xu)/(x2 + 1) * (x2 + 1)/(2x}du = ∫ u du

Well, now this isn't so scary after all. Finding the anti-derivative, we have ∫ u du = 1/2 u2 + C


u = ln(x2 + 1)

back in, we have 1/2 (ln(x2 + 1))2 +C

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use

Become a member and start learning now.
Become a Member  Back
What teachers are saying about
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account