Professional Documents
Culture Documents
Math Lab 5-3 PDF
Math Lab 5-3 PDF
Math Lab 5-3 PDF
In [28]: # Problem 3
# Part A
x,u = symbols('x,u')
f = (E**(2*x)) / (E**(2*x) + 3*E**x + 2)
new = f.subs(E**x,u)
new
Out[28]: 𝑢2
𝑢2 + 3𝑢 + 2
In [29]: # Part B
fnew = apart(new,u)
fnew
Out[29]:
1 − 𝑢 +4 2 + 𝑢 +1 1
In [30]: # Part B integration
f2 = fnew.subs(u,E**x)
integral = integrate(f2,x)
integral
localhost:8888/notebooks/Untitled1.ipynb?kernel_name=python3 1/1