Sale!

Math 152 – Python Lab 5

$30.00

Category:
Rate this product

Python Lab
Math 152 – Python Lab 5
Directions: Use Python to solve each problem. (Template link)
1. Given f(x) = x
3 − 4x + 3
(x − 5)2
(x
2 + 3)(x
2 + 5)
(a) The partial fraction decomposition of f(x) is A
(x − 5) +
B
(x − 5)2
+
Cx + D
x
2 + 3
+
Ex + F
x
2 + 5
.
Using this, write and solve a system of equations to find A through F (as you would by
hand). Integrate the resulting partial fraction decomposition.
(b) Use Python to find the partial fraction decomposition of f and integrate the result.
(c) Integrate f directly and indicate whether your integrals (a), (b), and (c) are the same or
not.
2. (a) Calculate the value of a so that Z ∞
0
x
2
x
4 + a
2
dx = 0.1. (Note: When defining x and a as
symbolic variables, include positive = True to clear up some issues when calculating.)
(b) Find the value of a such that Z a
1
x
6
e
−x
7
dx =
Z ∞
a
x
6
e
−x
7
dx.
(c) Evaluate Z a
1
x
6
e
−x
7
dx using the value found in part (b), then use your result to print the
value of Z ∞
1
x
6
e
−x
7
dx without integrating again.
3. Let f(x) = |x| cos2
(x)
x
3
and g(x) = 1
x
2
.
(a) Show Z ∞
1
g(x) dx converges.
(b) Plot f and g on the same axes in the domain x ∈ [1, 10] to show f(x) ≤ g(x) on the given
interval.
(c) Evaluate Z ∞
1
f(x) dx. Give exact and approximate answers.

Scroll to Top