Starting from:

$30

Math 152 – Python Lab 1

MATH 152
Python Lab
Math 152 – Python Lab 1
Directions: Use Python to solve each problem. (Template link)
1. Define variables a = 1.54 and b = 3.78, then evaluate the following:
(a) sin2
(a) + cos2
(a)
b
2 + 1
(b) (sin(a) + cos(a))2
b
2 + 1
State whether or not the answers to (a) and (b) are equal. One or both of the expressions can
be simplified using a well-known trigonometric identity. Give the simplified expression(s).
2. A very useful identity this semester will be the power reducing formula for sin(θ), which is
sin2
(θ) = 1 − cos(2θ)
2
.
(a) Verify this identity when x =

4
.
(b) Plot f = sin2
(x) −
1 − cos(2x)
2
on [0, 2π]. Since this is a trigonometric identity, f(x)
should be 0 for all x. If you do not get y = 0, explain why.
3. Given f(x) = −x
3 − 2x
2 + 5x and g(x) = x:
(a) Graph both functions on the same set of axes in a domain and range that let’s you see
all points of intersection.
(b) Find the exact and approximate area between these curves. (NOTE: if the absolute value
method does not work, you’ll have to split it up as you do by hand!)
4. Given f(x) = 5x
2
(x
3 − 7)1/2
:
(a) Make an appropriate substitution to change Z
f(x)dx to a function of u and integrate
this function.
(b) Confirm your answer to part (a) by integrating Z
f(x)dx directly. Show that your
answers for part (a) and (b) are the same.
(c) Use the definite integral from part (b) and the Fundamental Theorem of Calculus to
evaluate Z 3
2
f(x)dx (give exact and approximate answers).
(d) Check your answer to part (c) by using Python to directly evaluate Z 3
2
f(x)dx.
© 2022 TAMU Department of Mathematics MATH 152 Python Lab : Page 1 of 1