Topics You Need To Understand For This Page
Calculus Main Topics
Tools
Related Topics and Links
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. In the practice problem section, filtering out all practice problems except for the basic trig integrals will display only the practice problems that apply to you. Most of the rest of this page and the other practice problems 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 to watch some videos and try some practice problems, go to the resources section below to learn and practice.
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  doubleangle formulas 
\( \sin(2t) = 2\sin(t)\cos(t)\) 
\(\displaystyle{ \cos(2t) = \cos^2(t)  \sin^2(t) }\) 
Set 4  halfangle 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\) 
With the equations in the previous two tables, you should have all the tools you need to solve basic trig integrals. 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 halfangle 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.
Practice 1 
\(\displaystyle{\int{x\cos(x^2+1)~dx}}\) 


\((1/2)\sin(x^2+1)+C\) 
Practice 1 Final Answer 
\((1/2)\sin(x^2+1)+C\) 
Practice 2 
\(\displaystyle{\int{3x^5\sin(x^6)~dx}}\) 

Practice 3 
\(\displaystyle{\int{\frac{\sin\sqrt{x}}{\sqrt{x}}~dx}}\) 

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

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

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

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

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

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

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

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

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

Practice 13 
\(\displaystyle{ \int{ \csc x \cot x \sqrt{1\csc x}~dx } }\) 


\( (2/3)(1  \csc x)^{3/2} + C \) 
Practice 13 Final Answer 
\( (2/3)(1  \csc x)^{3/2} + C \) 
Practice 14 
\(\displaystyle{\int_{0}^{\pi/2}{x\cos(x)~dx}}\) 

This problem is solved in two videos.
Practice 15 
\(\displaystyle{\int{\cos^2x~\tan^3x~dx}}\) 

Practice 16 
\(\displaystyle{\int{\csc(x)~dx}}\) 

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

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

Practice 19 
\(\displaystyle{\int_{\pi/2}^{3\pi/2}{\sqrt{1+\sin\theta}~d\theta}}\) tricky! 



\(\displaystyle{\int_{\pi/2}^{3\pi/2}{\sqrt{1+\sin\theta}~d\theta}=2\sqrt{2}}\) 
1. multiply the integrand by \((\cos \theta) / (\cos \theta)\); 2. replace the \(\cos\theta\) in the denominator with \( \cos \theta = \pm \sqrt{1\sin^2 \theta} \) making sure to choose the appropriate sign; 3. separate \(\sqrt{1\sin^2 \theta}\) into two square roots using the idea \(a^2b^2 = (a+b)(ab)\) 
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.
\(
\begin{array}{rcl}
& & \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 } }
\end{array}
\)
Now integration by substitution will work with \(u=1\sin \theta \to du = \cos \theta d \theta \) giving us
\(
\begin{array}{rcl}
& & \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} } \\
& = & 2u^{1/2} = 2 (1\sin \theta)^{1/2}
\end{array}
\)
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(11)^{1/2} = 2\sqrt{2} } \)
Practice 19 Final Answer 
\(\displaystyle{\int_{\pi/2}^{3\pi/2}{\sqrt{1+\sin\theta}~d\theta}=2\sqrt{2}}\) 
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{1t^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 

Okay, let's work some practice problems using this substitution.
Practice 20 
\(\displaystyle{\int{\frac{dx}{2\sin(x)+\sin(2x)}}}\) 


\(\displaystyle{\frac{1}{4}\ln[\tan(x/2)]+\frac{1}{8}\tan^2(x/2)+C}\) 
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{1t^2}{1+t^2} }\)
From these, we can calculate expressions for \(1+\cos(x)\) and \(2\sin(x)(1+\cos(x))\).
\(
\begin{array}{rcl}
1+\cos(x) & = & \displaystyle{ 1 + \frac{1t^2}{1+t^2} } \\
& = & \displaystyle{ \frac{1+t^2}{1+t^2} + \frac{1t^2}{1+t^2} } \\
& = & \displaystyle{ \frac{1+t^2+1t^2}{1+t^2} = \frac{2}{1+t^2} }
\end{array}
\)
\(\displaystyle{
2\sin(x)(1+\cos(x)) = }\) \(\displaystyle{
2 \left( \frac{2t}{1+t^2} \right) \left( \frac{2}{1+t^2} \right) = }\) \(\displaystyle{
\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.
\(
\begin{array}{rcl}
& & \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 }
\end{array}
\)
Challenging Question 
We checked our answer by using an online system and the answer they gave was 
\(\displaystyle{\frac{12\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? 
Practice 20 Final Answer 
\(\displaystyle{\frac{1}{4}\ln[\tan(x/2)]+\frac{1}{8}\tan^2(x/2)+C}\) 