Starting from:

$30

Math 152 – Python Lab 3

MATH 152
Python Lab
Math 152 – Python Lab 3
Directions: Use Python to solve each problem. (Template link)
1. Refer to the given figure and find the volume generated by rotating the given region about the
indicated axis. May use whichever method you prefer, unless otherwise indicated.
1 2 2.5
1
2
A B
C
x · e
(1−x/2)
x
x
2
2
(a) Region A about x-axis
(b) Region A about y-axis
(c) Region B about x-axis
(d) Region C about x = 2.5 using the washer
method
2. A trough is 5 m long and has ends which are isosceles triangles with height 2 m and width
(across the top) 3 m. The trough has a spout at the top of the tank with height 1 m. The tank
is full of water.
(a) How much work is required to pump all of the water out of the tank? Note that the
density of water is ρ = 1000 kg/m3 and the acceleration due to gravity is g = 9.8 m/s2
.
(b) Suppose the pump breaks down after 3 × 104 J of work has been done. What is the depth
of the remaining water in the tank?
3. Given f(x) = cos2
(x) and g(x) = cos4
(x) (give exact answers for all parts):
(a) Plot the functions on the x-interval
0,
π
2

. Find the volume when the region between the
two curves is rotated about the line x =
π
2
.
(b) Find the area of the region.
(c) The center of mass of a region [a, b] is the point (¯x, y¯), where ¯x =
1
A
Z b
a
x(f(x)−g(x)) dx
and ¯y =
1
A
Z b
a
1
2
(f(x)
2 − g(x)
2
) dx, with A the area between the curves. Find the xcoordinate of the center of mass of the region. In a print statement, explain why this
answer makes sense based on the graph in part a).
(d) When the region rotates about the line x =
π
2
, how far does the center of mass travel?
Multiply this value by the area. What do you notice when you compare your answer to
part a)?
© 2023 TAMU Department of Mathematics MATH 152 Python Lab : Page 1 of 1