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:
.
They are
and
.
e.g.
> Int(sin(x)^2,x)=int(sin(x)^2,x);
> Int(sin(x)^4,x)=int(sin(x)^4,x);
> Int(cos(3*t)^2,t=0..Pi)=int(cos(3*t)^2,t=0..Pi);int(cos(3*t)^2,t);
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);
> F(2); F(4);
> value([F(2),F(4)]);
Products of Powers of sine and cosine
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
. Once this is done you proceed by
substitution
, letting
.Consider the examples:
e.g.
This one doesn't "look" like an example of
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);
e.g.
> I3:=Int(sin(x)^5*cos(x)^4,x);I4:=changevar(u=cos(x),I3,u);value(I4);value(I3);
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
. Once this is done you proceed by substitution, letting
. 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);
> plot(sin(x)^2*cos(x)^3,x=-2..10,colour=black);
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));
> simplify(I8-I9);
Now, explain the numerical result above!!
when m and n are
both
even
This situation can be a real pain and necessitates using the identities
and
, perhaps repeatedly.
e.g.
find the area under
above
.
> f:=sin(x)^2*cos(x)^2:plot(f,x=0..Pi,colour=black);
> Int(f,x=0..Pi/4);[value(%),evalf(%)];
> f1:=((1-cos(2*x))/2)*(1+cos(2*x))/2;simplify(%);
> f2:=1/4-1/4*((1+cos(4*x))/2);
> int(f2,x=0..Pi/4);
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)):
e.g.
Find the area under
above [0,3]
> f:=sin(4*x)*cos(2*x);
> plot(f,x=0..8,colour=black,title=`sin(4*x)*cos(2*x)`);
> Int(f,x=0..3)=int(f,x=0..3);
> evalf(int(f,x=0..3));
using the first identity we would get:
> Int(1/2*(sin(2*x)+sin(6*x)),x=0..3);
> value(%);
Powers of Tangent and Secant
Basics: the following should be in your "toolbox"
> Int(tan(x),x)=int(tan(x),x);
Note:
is usually reported as
. How can that be?
Get the antiderivative of sec(x) by multiplying secant by
:
> Int(sec(x),x)=int(sec(x),x);
Use integration by parts to obtain the following:
> Int(sec(x)^3,x)=int(sec(x)^3,x);
The above antiderivative is usually reported as
> Int(csc(x),x)=int(csc(x),x);
> Int(cot(x),x)=int(cot(x),x);
when n (the power of secant) is
even
The strategy here is to "split off" a factor of
(recall:
) and use
to write the remaining power of secant in terms of tan(x) and then use substitution with
.
e.g.
> I1:=Int(tan(x)^4*sec(x)^4,x);
> changevar(w=tan(x),I1,w);
> value(%);value(I1);
when m (the power of tangent) is
odd
The strtegy now is to "split off" a factor of the form
(recall:
). This leaves behind an
even
power of tangent which can be converted by the identity
. Then you use the substitution
.
e.g.
Find the area under
above
.
> f:=tan(x)^3*sec(x)^4;plot(f,x=0..1,y=0..2);
> I2:=Int(f,x=0..Pi/4);
> I3:=changevar(theta=sec(x),I2,theta);simplify(%);
> value(I2);value(I3);
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);
> Int(sin(x)^3*sqrt(cos(x)),x);g:=int(sin(x)^3*sqrt(cos(x)),x);
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);
> simplify(f-g);
> Int((1-tan(x)^2)/sec(x)^2,x)=int((1-tan(x)^2)/sec(x)^2,x);
Stewart gives the above integral as