You are on page 1of 5

Spring 2005 Math 152 Solution

8 Techniques of Integration Convert the squares of sine and cosine, then repeat.
8.2 Trigonometric Integrals sin2 x cos2 x = 1
2 (1 − cos 2x) · 12 (1 + cos 2x)

Mon, 07/Feb 2005,
c Art Belmonte = 1
4 1 − cos2 2x
 
= 1
4 1 − 12 (1 + cos 4x)
Summary
= 1
8 − 1
8 cos 4x = 1
8 (1 − cos 4x)
Recall and memorize the following trigonometric identities. Z π/2
Therefore, sin2 x cos2 x d x is equivalent to
1 0
sin2 x + cos2 x
=1 sin2 x= 2 (1 − cos 2x) Z π/2   π/2
tan2 x + 1 = sec2 x cos2 x = 1 π
2 (1 + cos 2x) 1
1 − cos 4x d x =
1 1
x − sin 4x = ≈ 0.20.
1 + cot2 x = csc2 x sin 2x = 2 sin x cos x 8 0 8 4 0 16

sin A cos B = 12 sin (A − B) + sin (A + B)
 470/18
sin A sin B = 12 cos (A − B) − cos (A + B) Z

cos A cos B = 12 cos (A − B) + cos (A + B) Evaluate
1
d x.
1 − sin x
Also memorize these two bizarre formulas. The first is derived in
the textbook, then second in 470/37 in the hand examples. Both
use obscure tricks. Solution
Z
Multiply numerator and denominator by 1 + sin x.
sec x d x = ln |sec x + tan x| + C Z Z
Z 1 1 + sin x
dx = dx
csc x d x = ln |csc x − cot x| + C 1 − sin x 1 − sin2 x
Z
1 + sin x
= dx
cos2 x
Z
Hand Examples = sec2 x + sec x tan x d x

470/6 = tan x + sec x + C


Z
Evaluate sin4 x cos3 x d x. 470/24
Z π/4
Evaluate tan2 x sec4 x d x.
0
Solution

Convert all but one of the odd number of cosine factors into sines. Solution
Z Z   Convert all but two of the even number of secant factors into
sin4 x cos3 x d x = sin4 x 1 − sin2 x cos x d x tangents.
Z   Z π/4 Z π/4  
= sin4 x − sin6 x cos x d x tan2 x sec4 x d x = tan2 x tan2 x + 1 sec2 x d x
0 0
= 1 sin5 x − 1 sin7 x + C Z π/4  
5 7
= tan4 x + tan2 x sec2 x d x
[ We implicitly used the Substitution Rule. Let w = sin x. 0
R   π/4
Then dw = cos x d x and w4 − w6 dw = 15 w5 − 17 w7 + C. ]
= 1
5 tan5 x + 1
3 tan3 x
0
 
1 1 8
470/8 = + −0= ≈ 0.53
5 3 15
Z π/2 Again note the implicit use of the Substitution Rule in the
Evaluate sin2 x cos2 x d x. penultimate step.
0

1
470/30 Solution
Z π/3
Multiply “numerator” and “denominator” by (csc x − cot x),
Evaluate tan5 x sec3 x d x.
0 an admittedly obscure trick!
Z Z
csc x csc x (csc x − cot x)
dx = · dx
Solution 1 1 (csc x − cot x)
Z
csc2 x − csc x cot x
Convert all but one of the odd number of tangent factors into = dx
csc x − cot x
secants. Season to taste.
= ln |csc x − cot x| + C
Z π/3 Z π/3  2
tan5 x sec3 x d x = tan2 x sec2 x · sec x tan x d x
0 0
[We implicitly used the Substitution
 R w = csc x − cot x
Rule with
Z π/3  2 and dw = csc2 x − csc x cot x d x. Thus w1 dw = ln |w| + C.]
= sec2 x − 1 sec2 x · sec x tan x d x
0
Z π/3   470/41
= sec2 x − 2 sec4 x + sec6 x · sec x tan x d x
0 R
Z 2 Evaluate cos 3x cos 4x d x.
= w2 − 2w4 + w6 dw
1
  2 Solution
= 1 w3 − 2 w5 + 1 w7
3 5 7
! 1  We have
23 26 27 1 2 1 848 R R  
= − + − − + = ≈ 8.08
3 5 7 3 5 7 105 cos 3x cos 4x d x = 1
2 cos x + cos 7x d x = 1
2 sin x + 1
7 sin 7x + C.

Here we explicitly used the Substitution Rule. Letting w = sec x,


x 0 π3 470/44
we have dw = sec x tan x d x and .
w 1 2 Z
cos x + sin x
Evaluate d x.
sin 2x
470/32
Z Solution
Evaluate Z = tan2 x sec x d x.
Replace sin 2x by 2 sin x cos x, then divide.
Z Z
cos x + sin x cos x + sin x
Solution dx = dx
sin 2x 2 sin x cos x
Z
u = tan x dv = sec x tan x d x 1 1 1
Let . Then = + dx
du = sec2 x d x v = sec x 2
Z
sin x cos x
Z Z 1
= csc x + sec x d x
Z= tan2 x sec x d x 3
= sec x tan x − sec x d x 2
1 
Z   = ln |csc x − cot x| + ln |sec + tan x| + C
= sec x tan x − 1 + tan2 x sec x d x 2
Z
= sec x tan x − sec x d x − Z . MATLAB Examples

1 R  Recall that MATLAB can compute antiderivatives (indefinite


Hence Z = 2 sec x tan x − sec x d x . This in turn is equal to
integrals) or definite
R integrals via its int command. So can a TI-89
 calculator via its ( command. Become familiar with machine
1 sec x tan x − ln |sec x + tan x| + C.
2 power. You’ll be glad you did!
Remember that int computes an antiderivative. You must mentally
470/37 add the constant of integration. Moreover, the antiderivative it
R gives may not look exactly like yours. But remember, it can only
Derive the bizarre formula csc x d x = ln |csc x − cot x| + C. differ from yours by a constant.

2
s470x06 Solution
Z %--------------------------------------------------
% Stewart 470/18
4 3
Evaluate sin x cos x d x. %
syms x
f = 1 / (1 - sin(x)); pretty(f)

1
----------
Solution 1 - sin(x)
F = int(f, x);
%--------------------------------------------------
pretty(F)
% Stewart 470/6
%
2
syms x
- --------------
f = sin(x)ˆ4 * cos(x)ˆ3; pretty(f)
tan(1/2 x) - 1
%
4 3
ByHand = tan(x) + sec(x);
sin(x) cos(x)
pretty(ByHand)
F = int(f, x);
pretty(F)
tan(x) + sec(x)
const diff = simple(F - ByHand)
3 4 4
const diff =
- 1/7 sin(x) cos(x) - 3/35 sin(x) cos(x)
1
2
%
+ 1/35 cos(x) sin(x) + 2/35 sin(x)
% echo off; diary off
ByHand = sin(x)ˆ5 / 5 - sin(x)ˆ7 / 7;
pretty(ByHand)

5 7
While machine and hand answers are different, they are both
1/5 sin(x) - 1/7 sin(x) 1
antiderivatives of since their difference is 1, a constant.
no diff = simple(F - ByHand)
no diff =
1 − sin x
0
%
echo off; diary off s470x24
Z π/4
Evaluate tan2 x sec4 x d x.
Despite the fact that machine and hand answers look different, 0
they are equivalent in this instance since their difference is zero.

Solution
%--------------------------------------------------
s470x08 % Stewart 470/24
%
Z π/2 syms x
sin2 x cos2 x d x.
a = int(tan(x)ˆ2 * sec(x)ˆ4, x, 0, pi/4);
Evaluate pretty(a)
0
8/15
a float = eval(a)
a float =
Solution 0.5333
%
%-------------------------------------------------- echo off; diary off
% Stewart 470/8
%
syms x
a = int(sin(x)ˆ2 * cos(x)ˆ2, x, 0, pi/2); s470x30
pretty(a)

1/16 pi
Z π/3
a float = eval(a) Evaluate tan5 x sec3 x d x.
a float = 0
0.1963
%
echo off; diary off Solution
%--------------------------------------------------
% Stewart 470/30
%
s470x18 syms x
a = int(tan(x)ˆ5 * sec(x)ˆ3, x, 0, pi/3);
Z pretty(a)
1 %
Evaluate d x.
1 − sin x

3
848 s470x44
---
Z
105 cos x + sin x
a float = eval(a) Evaluate d x.
a float = sin 2x
8.0762
%
echo off; diary off Solution
%--------------------------------------------------
% Stewart 470/44
%
s470x32 syms x
Z f = (cos(x) + sin(x)) / sin(2*x); pretty(f)

Evaluate tan2 x sec x d x. cos(x) + sin(x)


---------------
sin(2 x)
F = int(f, x);
pretty(F)
Solution 1/2 log(csc(x) - cot(x)) + 1/2 log(sec(x) + tan(x))
%-------------------------------------------------- %
% Stewart 470/32 echo off; diary off
%
syms x
f = tan(x)ˆ2 * sec(x); pretty(f)
s470x50
2
tan(x) sec(x)
F = int(f, x); Find the area of the region bounded by y = sin x and y = 2 sin2 x,
pretty(F) x = 0, and x = π2 .
3
sin(x)
1/2 ------- + 1/2 sin(x) - 1/2 log(sec(x) + tan(x)) Solution
2
cos(x)
% • Here is a plot of the region.
ByHand = 1/2 * ( sec(x)*tan(x) - log(sec(x) + tan(x)) ); Stewart 470/50: Area between curves
pretty(ByHand)

1/2 sec(x) tan(x) - 1/2 log(sec(x) + tan(x))


no = simple(F - ByHand) 2
no =
0
%
echo off; diary off
1
y

Despite the fact that machine and hand answers look different,
they are equivalent in this instance since their difference is zero. 0

0 pi/6 pi/3 pi/2


s470x41 x

R • When the curves intersect we have


Evaluate cos 3x cos 4x d x.
sin x = 2 sin2 x
sin x (1 − 2 sin x) = 0
Solution sin x = 0, 12
%--------------------------------------------------
% Stewart 470/41
x = 0, π6 ,
%
recalling that 0 ≤ x ≤ π.
syms x 2
f = cos(3*x) * cos(4*x); pretty(f)
• The area is
cos(3 x) cos(4 x) Z π/6 Z π/2
F = int(f, x); 2
pretty(F) A = sin x − 2 sin x d x + 2 sin2 x − sin x d x
0 π/6
1/2 sin(x) + 1/14 sin(7 x) √
% π 3
= 1+ − ≈ 0.66 cm2 .
echo off; diary off 6 2

4
• Here is the code that performs the computations and renders • The volume is
the graphics. Z π/2
V = π (1)2 − π (1 − y)2 d x
0
Z
%--------------------------------------------------
% Stewart 470/50: Area between curves π/2
% = π (1)2 − π (1 − cos x)2 d x
syms x
0
f = sin(x); g = 2.* sin(x).ˆ2;
intersections = solve(sin(x) - 2*sin(x)ˆ2, x) π2
intersections = = 2π − ≈ 3.82 cm3 .
0 4
1/6*pi
%
x = linspace(0, pi/2); • Here is the code that performs the computations and renders
y1 = eval(f); y2 = eval(vectorize(g)); the graphics.
X = [x fliplr(x)];
Y = [y1 fliplr(y2)];
% %--------------------------------------------------
fill(X, Y, ’y’, ’LineStyle’, ’none’) % Stewart 470/56: Volume of a solid of revolution
grid on; hold on; %
plot(x, y1, ’r’, ’LineWidth’, 1) x = linspace(0, pi/2); y = cos(x);
plot(x, y2, ’b’, ’LineWidth’, 1) X = [x 0 0]; Y = [y 0 1];
plot([pi/2 pi/2], [1 2], ’k’, ’LineWidth’, 1) %
% fill(X, Y, ’y’, ’LineStyle’, ’none’)
axis([-pi/8 5*pi/8, -0.5 2.5]) grid on; hold on;
xlabel(’x’); ylabel(’y’) plot(X, Y, ’b’, ’LineWidth’, 1)
title(’Stewart 470/50: Area between curves’) plot([-0.5 2], [1 1], ’k--’, ’LineWidth’, 1)
set(gca, ’Xtick’, 0 : pi/6 : pi/2) %
set(gca, ’XtickLabel’, {’0’;’pi/6’;’pi/3’;’pi/2’}) axis([-0.5 2 -0.5 1.5])
set(gca, ’Ytick’, 0:2) xlabel(’x’); ylabel(’y’)
% title(’Stewart 470/56: Volume of a solid of revolution’)
syms x set(gca, ’Xtick’, 0 : pi/6 : pi/2)
A = int(f-g, x, 0, pi/6) + int(g-f, x, pi/6, pi/2); set(gca, ’XtickLabel’, {’0’;’pi/6’;’pi/3’;’pi/2’})
pretty(A) set(gca, ’Ytick’, 0:0.5:1)
%
1/2 % Slice
- 1/2 3 + 1/6 pi + 1 xs = 0.85; ys = cos(xs); h = 0.02;
Area = eval(A) fill([xs-h xs+h xs+h xs-h xs-h], ...
Area = [0 0 ys ys 0], ’m’)
0.6576 %
% syms x
echo off; diary off V = int(pi*1ˆ2 - pi*(1 - cos(x))ˆ2, x, 0, pi/2)
V =
-1/4*piˆ2+2*pi
pretty(V)
s470x56 2
- 1/4 pi + 2 pi
Volume = eval(V)
Find the volume of the region obtained by rotating the region Volume =
bounded by y = cos x, y = 0, x = 0, and x = π2 , about the line %
3.8158

y = 1. echo off; diary off

Solution

• Here is a plot of the region.


Stewart 470/56: Volume of a solid of revolution

0.5
y

thickness dx

0 pi/6 pi/3 pi/2


x

You might also like