## 17Calculus Integrals - Trig Integration - Integration of Trigonometric Functions

### Start Here

This page is directed to two main groups of students. To best use the material and resources on this page, determine which group you are in and follow these steps.

Group 1: If you are in first semester calculus and you are just learning integration, read the first few paragraphs of this page through the the section on basic integration. This will explain the material on this page that applies to you. Most of the rest of this page apply to people in group 2.

Group 2: If you are in second semester calculus and you have learned integration by parts, follow these steps.
Step 1: Read the panel immediately following this one discussing the difference between trig integration and trig substitution to make sure you are on the correct page. The material on this page is usually covered before the material on trig substitution.
Step 2: Go through first few paragraphs on this page through the basic integration section to refresh your memory, if you feel like you need to, and then read the rest of this page.
Step 3: Once you are ready, try some practice problems.

### Difference Between Trig Integration and Trig Substitution

Trig integration, covered on this page, is the evaluation of integrals that already have trig functions in the integrand.

Trig substitution is a technique that takes an integrand that most likely does NOT contain any trig functions, and uses some trig identities to introduce trig functions into the integrand. Once the integral is completely transformed, then trig integration is used to evaluate the integral. Once the evaluation is complete, another set of substitutions, based on the original ones, is done to convert the result back to the original variable.

When integrating trig functions, the trick is to get the integrand into a form so that you can use integration by substitution. Besides the basic trig identities, there are several sets of identities that you need to know and be able to use.

Set 1 - basic identities

$$\displaystyle{ \tan(t) = \frac{\sin(t)}{\cos(t)} }$$

$$\displaystyle{ \cot(t) = \frac{\cos(t)}{\sin(t)} }$$

$$\displaystyle{ \sec(t) = \frac{1}{\cos(t)} }$$

$$\displaystyle{ \csc(t) = \frac{1}{\sin(t)} }$$

Set 2 - squared identities

$$\sin^2t + \cos^2t = 1$$

$$1 + \tan^2t = \sec^2t$$

$$1 + \cot^2t = \csc^2t$$

Set 3 - double-angle formulas

$$\sin(2t) = 2\sin(t)\cos(t)$$

$$\displaystyle{ \cos(2t) = \cos^2(t) - \sin^2(t) }$$

Set 4 - half-angle formulas

$$\displaystyle{ \sin^2(t) = \frac{1-\cos(2t)}{2} }$$

$$\displaystyle{ \cos^2(t) = \frac{1+\cos(2t)}{2} }$$

Basic Trigonometric Integration

When you are first starting to learn integration, you will run across problems involving trig functions. The basic information and techniques you need are the basic trig identities and integration by substitution. In addition to the identities in the table above, you need to know these integrals.

 $$\int{\sin(x)~dx} = -\cos(x)+C$$ $$\int{\cos(x)~dx} = \sin(x)+C$$ $$\int{\tan(x)~dx} = -\ln\abs{\cos(x)}+C$$ $$\int{\cot(x)~dx} = \ln\abs{\sin(x)}+C$$ $$\int{\sec(x)~dx} = \ln\abs{\sec(x)+\tan(x)}+C$$ $$\int{\csc(x)~dx} = -\ln\abs{\csc(x)+\cot(x)}+C$$
Evaluate $$\displaystyle{ \int{\frac{1}{\cos x} ~dx } }$$ to derive the equation for $$\int{\sec x ~ dx }$$.

Problem Statement

Evaluate $$\displaystyle{ \int{\frac{1}{\cos x} ~dx } }$$ to derive the equation for $$\int{\sec x ~ dx }$$.

Solution

This problem is solved two different ways, shown in these two videos.

### 2334 video

video by Michel vanBiezen

### 2334 video

video by Michel vanBiezen

With the equations in the previous two tables, you should have all the tools you need to solve basic trig integrals. Here are some practice problems.

Basic Problems

$$\displaystyle{ \int{ \cos(2x) ~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \cos(2x) ~dx } }$$

Solution

### 2584 video

$$\displaystyle{ \int{ x\cos(x^2+1)~dx } }$$

Problem Statement

$$\displaystyle{ \int{ x\cos(x^2+1)~dx } }$$

$$(1/2)\sin(x^2+1) + C$$

Problem Statement

$$\displaystyle{ \int{ x\cos(x^2+1)~dx } }$$

Solution

### 88 video

video by Krista King Math

$$(1/2)\sin(x^2+1) + C$$

$$\displaystyle{ \int{ 3(x^5)\sin(x^6)~dx } }$$

Problem Statement

$$\displaystyle{ \int{ 3(x^5)\sin(x^6)~dx } }$$

Solution

### 1324 video

video by PatrickJMT

$$\displaystyle{ \int{ \frac{\sin\sqrt{x}}{\sqrt{x}}~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \frac{\sin\sqrt{x}}{\sqrt{x}}~dx } }$$

Solution

### 1325 video

video by PatrickJMT

$$\displaystyle{ \int{ 2\sin(x)\cos(x)~dx } }$$

Problem Statement

$$\displaystyle{ \int{ 2\sin(x)\cos(x)~dx } }$$

Solution

The first video solves the given problem. The second video, by a different instructor, evaluates the integral $$\int{\sin x \cos x ~ dx}$$, which is the same as the given problem without the factor of 2. Consequently the answer in the second video is (1/2) times the answer in the first video.

### 90 video

video by Krista King Math

### 90 video

$$\displaystyle{ \int{ \sin^3(x) \cos(x) ~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \sin^3(x) \cos(x) ~dx } }$$

Solution

### 89 video

video by Krista King Math

$$\displaystyle{ \int{ 5 \cos^4(2x) \sin(2x) ~dx } }$$

Problem Statement

$$\displaystyle{ \int{ 5 \cos^4(2x) \sin(2x) ~dx } }$$

Solution

### 1330 video

video by PatrickJMT

$$\displaystyle{ \int{ \frac{\cos^5(x) \sin(x)}{1 - \sin^2(x)} dx } }$$

Problem Statement

$$\displaystyle{ \int{ \frac{\cos^5(x) \sin(x)}{1 - \sin^2(x)} dx } }$$

Solution

### 105 video

video by PatrickJMT

$$\displaystyle{ \int{ \frac{\cos(x) + \sin(x)}{\sin(2x)} ~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \frac{\cos(x) + \sin(x)}{\sin(2x)} ~dx } }$$

Solution

### 101 video

video by PatrickJMT

$$\displaystyle{ \int{ a\cos(x) + \frac{b}{\sin^2(x)} dx } }$$

Problem Statement

$$\displaystyle{ \int{ a\cos(x) + \frac{b}{\sin^2(x)} dx } }$$

Solution

### 83 video

video by Krista King Math

$$\displaystyle{ \int{ \sin(2x) \cos(3x) ~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \sin(2x) \cos(3x) ~dx } }$$

Solution

### 109 video

video by MIT OCW

$$\displaystyle{ \int{ \frac{\sqrt[3]{\cot(x)}}{\sin^2(x)} ~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \frac{\sqrt[3]{\cot(x)}}{\sin^2(x)} ~dx } }$$

Solution

### 102 video

video by PatrickJMT

$$\displaystyle{ \int{ \tan^3(x) (\csc^2(x)-1) ~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \tan^3(x) (\csc^2(x)-1) ~dx } }$$

Solution

### 106 video

video by PatrickJMT

$$\displaystyle{ \int{ \csc x \cot x \sqrt{1-\csc x}~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \csc x \cot x \sqrt{1-\csc x}~dx } }$$

$$(2/3)(1 - \csc x)^{3/2} + C$$

Problem Statement

$$\displaystyle{ \int{ \csc x \cot x \sqrt{1-\csc x}~dx } }$$

Solution

### 2111 video

video by PatrickJMT

$$(2/3)(1 - \csc x)^{3/2} + C$$

Intermediate Problems

$$\displaystyle{ \int_{0}^{\pi/2}{ x \cos(x) ~dx } }$$

Problem Statement

$$\displaystyle{ \int_{0}^{\pi/2}{ x \cos(x) ~dx } }$$

Solution

This problem is solved in two videos.

### 113 video

video by Krista King Math

### 113 video

video by Krista King Math

$$\displaystyle{ \int{ \cos^2x ~\tan^3x ~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \cos^2x ~\tan^3x ~dx } }$$

Solution

### 117 video

video by PatrickJMT

$$\displaystyle{ \int{ \csc(x) ~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \csc(x) ~dx } }$$

Solution

### 118 video

video by PatrickJMT

$$\displaystyle{ \int{ \sqrt{x} \sec(x^{3/2}) \tan(x^{3/2}) ~dx } }$$

Problem Statement

$$\displaystyle{ \int{ \sqrt{x} \sec(x^{3/2}) \tan(x^{3/2}) ~dx } }$$

Solution

### 1326 video

video by PatrickJMT

$$\displaystyle{ \int{ (1+2t^2)^2 ~t ~\csc^2\left[ (1+2t^2)^3 \right]~dt } }$$

Problem Statement

$$\displaystyle{ \int{ (1+2t^2)^2 ~t ~\csc^2\left[ (1+2t^2)^3 \right]~dt } }$$

Solution

### 1327 video

video by PatrickJMT

$$\displaystyle{\int_{\pi/2}^{3\pi/2}{\sqrt{1+\sin\theta}~d\theta}}$$

Problem Statement

$$\displaystyle{\int_{\pi/2}^{3\pi/2}{\sqrt{1+\sin\theta}~d\theta}}$$

$$\displaystyle{\int_{\pi/2}^{3\pi/2}{\sqrt{1+\sin\theta}~d\theta}=2\sqrt{2}}$$

Problem Statement

$$\displaystyle{\int_{\pi/2}^{3\pi/2}{\sqrt{1+\sin\theta}~d\theta}}$$

Solution

Our first inclination might be to use integration by substitution, letting $$u=1+\sin \theta$$. However, since $$du= \cos \theta d \theta$$ and we don't have a $$\cos(\theta)$$ outside the square root, this won't help us.

So we will do a trick. We will multiply the integrand by $$\cos \theta / \cos \theta$$. This doesn't seem to help us since now we have

$$\displaystyle{ \int_{\pi /2}^{3 \pi /2}{\sqrt{1+\sin \theta} \frac{\cos \theta}{\cos \theta}~ d \theta } }$$

However, now we are going to replace the cosine in the denominator with something that WILL help us using the identity $$\sin^2 \theta + \cos ^2 \theta = 1$$. This is a very simple identity but very powerful when evaluating trig integrals. Let's solve for $$\cos \theta$$ here.

$$\cos \theta = \pm \sqrt{1-\sin^2 \theta}$$

Notice in this last equation we have '$$\pm$$' in front of the square root. This is important. In algebra, your teacher may have let you ignore it. But in calculus you can't. You have to carry it along or consciously choose positive or negative. In this problem, you need to choose the negative sign because the limits of integration tell you that you are integrating in the left half plane where cosine is negative. Okay, so let's see where we are now. We are going to drop the limits of integration, so that we don't have to carry them along. Then we will bring them back in after we have evaluated the integral.

 $$\displaystyle{ \int{ \sqrt{1+\sin \theta} \frac{\cos \theta}{\cos \theta} ~d \theta } }$$ $$\displaystyle{ \int{ \sqrt{1+\sin \theta} \frac{\cos \theta}{-\sqrt{1-\sin^2 \theta}} ~d \theta } }$$ $$\displaystyle{ \int{ \frac{\sqrt{1+\sin \theta}\cos \theta}{-\sqrt{1+\sin \theta} \sqrt{1-\sin \theta} } ~d \theta } }$$ $$\displaystyle{ \int{ \frac{-\cos \theta}{\sqrt{1-\sin \theta} } ~d \theta } }$$

Now integration by substitution will work with $$u=1-\sin \theta \to du = -\cos \theta d \theta$$ giving us

 $$\displaystyle{ \int{ \frac{-\cos \theta}{\sqrt{1-\sin \theta}} ~ d \theta} }$$ $$\displaystyle{ \int{ \frac{du}{u^{1/2}} } }$$ $$\displaystyle{ \int{ u^{-1/2}~du } }$$ $$\displaystyle{ \frac{u^{1/2}}{1/2} }$$ $$\displaystyle{ 2u^{1/2} = 2 (1-\sin \theta)^{1/2} }$$

Normally when we work an indefinite integral, we need to add $$+C$$ for the unknown constant. However, we are leaving it off since we know that ultimately our problem is a definite integral. So, let's finish the problem.

 $$\displaystyle{ \left. 2 (1-\sin \theta)^{1/2} \right|_{\pi/2}^{3\pi/2} }$$ $$\displaystyle{ 2(1 - \sin(3\pi/2))^{1/2} - 2(1 - \sin(\pi/2))^{1/2} }$$ $$\displaystyle{ 2(1-(-1))^{1/2} - 2(1-1)^{1/2} = 2\sqrt{2} }$$

$$\displaystyle{\int_{\pi/2}^{3\pi/2}{\sqrt{1+\sin\theta}~d\theta}=2\sqrt{2}}$$

The remaining material on this page is for people who are in group 2 (as described in the above Start Here panel).

Here are links to other pages involving more advanced techniques, usually found in second semester calculus.

The strategies listed so far on this page cover most of the integrals you will run across. Occasionally, you may need various other techniques to convert the integrand into a form that can be integrated. Here are a few ideas.
1. Convert all the trig functions into sine and cosine. Sometimes, you may have lots of cancellation and end up with an easy integral.
2. Use the half-angle formulas to remove powers. This may leave an easy substitution problem.

The rest of this page covers a unique, more specialized strategy that you can try. Once you get more experience, you will be able to tell pretty quickly which strategy is best.

Special Tangent Substitution

An interesting and special substitution that will often convert trig integrals into a form that can be integrated is to let $$t = \tan(x/2)$$. From this we get the list of substitutions in the table below.

$$\displaystyle{ t = \tan(x/2) }$$

$$\displaystyle{ \sin(x) = \frac{2t}{1+t^2} }$$

$$\displaystyle{ \cos(x) = \frac{1-t^2}{1+t^2} }$$

$$\displaystyle{ dx = \frac{2}{1+t^2}dt }$$

This video shows the derivation of these equations. It is recommended that you watch it, so that you will know where the equations come from and how to use them.

### PatrickJMT - Integrate Rational Function of Sine and Cosine ; t = tan(x/2) , Part 1 [9min-42secs]

video by PatrickJMT

Okay, let's work some practice problems using this substitution.

$$\displaystyle{\int{\frac{dx}{2\sin(x)+\sin(2x)}}}$$

Problem Statement

$$\displaystyle{\int{\frac{dx}{2\sin(x)+\sin(2x)}}}$$

$$\displaystyle{ \int{ \frac{dx}{2\sin(x)+\sin(2x)} } = \frac{1}{4}\ln[\tan(x/2)] + \frac{1}{8}\tan^2(x/2)+C }$$

Problem Statement

$$\displaystyle{\int{\frac{dx}{2\sin(x)+\sin(2x)}}}$$

Solution

To try to simplify this problem somewhat so that we can get some ideas, we use the identity $$\sin(2x) = 2\sin(x)\cos(x)$$ in the denominator.

 $$\displaystyle{ \int{ \frac{dx}{2\sin(x)+\sin(2x)} } }$$ $$\displaystyle{ \int{ \frac{dx}{2\sin(x)+2\sin(x)\cos(x)} } }$$ $$\displaystyle{ \int{ \frac{dx}{2\sin(x)(1+\cos(x))} } }$$

We could try substitution letting $$u=1+\cos(x)$$ but that doesn't get us anywhere and no other basic substitution will either. So, let's try the substitution $$t=\tan(x/2)$$. We know that
$$\displaystyle{ \sin(x) = \frac{2t}{1+t^2} }$$ and $$\displaystyle{ \cos(x) = \frac{1-t^2}{1+t^2} }$$

From these, we can calculate expressions for $$1+\cos(x)$$ and $$2\sin(x)(1+\cos(x))$$.

 $$\displaystyle{1+\cos(x) = 1 + \frac{1-t^2}{1+t^2} }$$ $$\displaystyle{ \frac{1+t^2}{1+t^2} + \frac{1-t^2}{1+t^2} }$$ $$\displaystyle{ \frac{1+t^2+1-t^2}{1+t^2} = \frac{2}{1+t^2} }$$ $$\displaystyle{ 2\sin(x)(1+\cos(x)) = 2 \left( \frac{2t}{1+t^2} \right) \left( \frac{2}{1+t^2} \right) = \frac{8t}{(1+t^2)^2} }$$

Now we take the reciprocal of the last expression (since it is in the denominator of the integrand) substitute $$\displaystyle{ dx = \frac{2}{1+t^2}dt }$$ and integrate.

 $$\displaystyle{ \int{ \frac{(1+t^2)^2}{8t} \frac{2}{1+t^2} dt } }$$ $$\displaystyle{ \frac{1}{4}\int{ \frac{1+t^2}{t} dt } }$$ $$\displaystyle{ \frac{1}{4}\int{ \frac{1}{t} + t ~dt} }$$ $$\displaystyle{ \frac{1}{4} \left[ \ln(t) + \frac{t^2}{2} \right] + C }$$ $$\displaystyle{ \frac{1}{4} \ln[ \tan(x/2)] + \frac{1}{8}\tan^2 (x/2) + C }$$

Challenging Question: We checked our answer by using an online system and the answer they gave was
$$\displaystyle{\frac{1-2\cos^2(x/2)[ \ln(\cos(x/2)) - \ln(\sin(x/2)) ]}{4(\cos(x)+1)} + c_1}$$
Can you show that our answer is the same as this?

$$\displaystyle{ \int{ \frac{dx}{2\sin(x)+\sin(2x)} } = \frac{1}{4}\ln[\tan(x/2)] + \frac{1}{8}\tan^2(x/2)+C }$$

$$\displaystyle{\int{\frac{dx}{3-5\sin(x)}}}$$

Problem Statement

$$\displaystyle{\int{\frac{dx}{3-5\sin(x)}}}$$

Solution

### 124 video

video by PatrickJMT

### trig integration 17calculus youtube playlist

You CAN Ace Calculus

for everyone

integration

integration by substitution

additional topics for people in group 2

integration by parts

### Calculus Topics Listed Alphabetically

Single Variable Calculus

Multi-Variable Calculus

### Search Practice Problems

Do you have a practice problem number but do not know on which page it is found? If so, enter the number below and click 'page' to go to the page on which it is found or click 'practice' to be taken to the practice problem.

 The 17Calculus and 17Precalculus iOS and Android apps are no longer available for download. If you are still using a previously downloaded app, your app will be available until the end of 2020, after which the information may no longer be available. However, do not despair. All the information (and more) is now available on 17calculus.com for free.

When using the material on this site, check with your instructor to see what they require. Their requirements come first, so make sure your notation and work follow their specifications.

DISCLAIMER - 17Calculus owners and contributors are not responsible for how the material, videos, practice problems, exams, links or anything on this site are used or how they affect the grades or projects of any individual or organization. We have worked, to the best of our ability, to ensure accurate and correct information on each page and solutions to practice problems and exams. However, we do not guarantee 100% accuracy. It is each individual's responsibility to verify correctness and to determine what different instructors and organizations expect. How each person chooses to use the material on this site is up to that person as well as the responsibility for how it impacts grades, projects and understanding of calculus, math or any other subject. In short, use this site wisely by questioning and verifying everything. If you see something that is incorrect, contact us right away so that we can correct it.