Trigonometric Integrals

> restart:with(student):

Powers of Sine and Cosine

"Stand alone" even powers of sine or cosine

To integrate "stand alone" even powers of sine or cosine you can make use of two identities, each of which comes from the familiar trig identity: [Maple Math] .

They are [Maple Math] and [Maple Math] .

e.g.

> Int(sin(x)^2,x)=int(sin(x)^2,x);

[Maple Math]

> Int(sin(x)^4,x)=int(sin(x)^4,x);

[Maple Math]

> Int(cos(3*t)^2,t=0..Pi)=int(cos(3*t)^2,t=0..Pi);int(cos(3*t)^2,t);

[Maple Math]

[Maple Math]

e.g. a Reduction Formula

Recall: We proved a reduction formula for integrals of powers of sine. Here it is below as a function of n where n is the power of sine to be integrated. You can use it to check your answers. You should try making one for powers of cosine too.

> F:=n->-1/n*sin(x)^(n-1)*cos(x)+(n-1)/n*Int(sin(x)^(n-2),x);

[Maple Math]

> F(2); F(4);

[Maple Math]

[Maple Math]

> value([F(2),F(4)]);

[Maple Math]

Products of Powers of sine and cosine

[Maple Math] when power of Sine is odd

If the power of Sine is odd then you can take one of the sine factors away, leaving an even power of sine behind and this even power of sine can be converted into an expression in cosines using [Maple Math] . Once this is done you proceed by substitution , letting [Maple Math] .Consider the examples:

e.g. This one doesn't "look" like an example of [Maple Math] until you consider the case with n = 0

> I1:=Int(sin(x)^3,x);I2:=changevar(u=cos(x),I1,u);value(I2);value(I1);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

e.g.

> I3:=Int(sin(x)^5*cos(x)^4,x);I4:=changevar(u=cos(x),I3,u);value(I4);value(I3);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math] when power of cosine is odd

If the power of cosine is odd then you can take one of the cosine factors away, leaving an even power of cosine behind and this even power of cosine can be converted into an expression in sines using [Maple Math] . Once this is done you proceed by substitution, letting [Maple Math] . Consider the examples:

e.g.

> I5:=Int(sin(x)^2*cos(x)^3,x=0..Pi/2);I6:=changevar(u=sin(x),I5,u);value(I6);value(I5);

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

> plot(sin(x)^2*cos(x)^3,x=-2..10,colour=black);

[Maple Plot]

e.g. If both sine and cosine are to odd powers then you can choose to substitute for either sine or cosine. Just be aware that the answers can look different depending on your choice. Regard:

> I7:=Int(sin(2*x)^3*cos(2*x)^3,x);value(I7);I8:=changevar(u=cos(2*x),I7,u);I9:=changevar(w=sin(2*x),I7,w);I8:=subs(u=cos(2*x),value(I8));I9:=subs(w=sin(2*x),value(I9));

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

[Maple Math]

> simplify(I8-I9);

[Maple Math]

Now, explain the numerical result above!!

[Maple Math] when m and n are both even

This situation can be a real pain and necessitates using the identities [Maple Math] and [Maple Math] , perhaps repeatedly.

e.g. find the area under [Maple Math] above [Maple Math] .

> f:=sin(x)^2*cos(x)^2:plot(f,x=0..Pi,colour=black);

[Maple Plot]

> Int(f,x=0..Pi/4);[value(%),evalf(%)];

[Maple Math]

[Maple Math]

> f1:=((1-cos(2*x))/2)*(1+cos(2*x))/2;simplify(%);

[Maple Math]

[Maple Math]

> f2:=1/4-1/4*((1+cos(4*x))/2);

[Maple Math]

> int(f2,x=0..Pi/4);

[Maple Math]

Three other identities that can be useful in products of sine and cosine

The following three identities are useful and are easily derived from the identities for angle addition (sin(a+b), sin(a-b), cos(a+b), cos(a-b)):

[Maple Math]

[Maple Math]

[Maple Math]

e.g. Find the area under [Maple Math] above [0,3]

> f:=sin(4*x)*cos(2*x);

[Maple Math]

> plot(f,x=0..8,colour=black,title=`sin(4*x)*cos(2*x)`);

[Maple Plot]

> Int(f,x=0..3)=int(f,x=0..3);

[Maple Math]

> evalf(int(f,x=0..3));

[Maple Math]

using the first identity we would get:

> Int(1/2*(sin(2*x)+sin(6*x)),x=0..3);

[Maple Math]

> value(%);

[Maple Math]

Powers of Tangent and Secant

Basics: the following should be in your "toolbox"

> Int(tan(x),x)=int(tan(x),x);

[Maple Math]

Note: [Maple Math] is usually reported as [Maple Math] . How can that be?

Get the antiderivative of sec(x) by multiplying secant by [Maple Math] :

> Int(sec(x),x)=int(sec(x),x);

[Maple Math]

Use integration by parts to obtain the following:

> Int(sec(x)^3,x)=int(sec(x)^3,x);

[Maple Math]

The above antiderivative is usually reported as [Maple Math]

> Int(csc(x),x)=int(csc(x),x);

[Maple Math]

> Int(cot(x),x)=int(cot(x),x);

[Maple Math]

[Maple Math] when n (the power of secant) is even

The strategy here is to "split off" a factor of [Maple Math] (recall: [Maple Math] ) and use [Maple Math] to write the remaining power of secant in terms of tan(x) and then use substitution with [Maple Math] .

e.g.

> I1:=Int(tan(x)^4*sec(x)^4,x);

[Maple Math]

> changevar(w=tan(x),I1,w);

[Maple Math]

> value(%);value(I1);

[Maple Math]

[Maple Math]

[Maple Math] when m (the power of tangent) is odd

The strtegy now is to "split off" a factor of the form [Maple Math] (recall: [Maple Math] ). This leaves behind an even power of tangent which can be converted by the identity [Maple Math] . Then you use the substitution [Maple Math] .

e.g. Find the area under [Maple Math] above [Maple Math] .

> f:=tan(x)^3*sec(x)^4;plot(f,x=0..1,y=0..2);

[Maple Math]

[Maple Plot]

> I2:=Int(f,x=0..Pi/4);

[Maple Math]

> I3:=changevar(theta=sec(x),I2,theta);simplify(%);

[Maple Math]

[Maple Math]

> value(I2);value(I3);

[Maple Math]

[Maple Math]

Other Cases

In situations other than the recognizable patterns described above you must get creative and try different things: trig identities, clever substitutions, integration by parts, algebraic manipulations and, possibly, combinations of any and all of these! That's part of what makes integral calculus (Cal II) more fun than differential calculus (Cal I).

Try some examples:

> Int((1-sin(x))/cos(x),x)=int((1-sin(x))/cos(x),x);

[Maple Math]

> Int(sin(x)^3*sqrt(cos(x)),x);g:=int(sin(x)^3*sqrt(cos(x)),x);

[Maple Math]

[Maple Math]

Wow, the expression f below is what I got "by hand." Are they the same??

> f:=2/7*cos(x)^(7/2)-2/3*cos(x)^(3/2);

[Maple Math]

> simplify(f-g);

[Maple Math]

> Int((1-tan(x)^2)/sec(x)^2,x)=int((1-tan(x)^2)/sec(x)^2,x);

[Maple Math]

Stewart gives the above integral as [Maple Math]