Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download
Views: 18
Kernel: Python 3 (Ubuntu Linux)

Final Exam

Technology for Calculus

Due Tuesday, 12/11/18 at 5PM

Problem 1

Using SymPy, find the third derivative of f(x)=1(4x+x2+9)2.f(x) = \frac{1}{(4x + \sqrt{x^{2} + 9})^{2}}.

from sympy import * init_printing() x = Symbol('x') diff(1/(4*x + sqrt(x**2 + 9))**2, x, 3)
6(x(x2x2+91)(x2+9)32+3(xx2+9+4)(x2x2+91)(4x+x2+9)x2+9+4(xx2+9+4)3(4x+x2+9)2)(4x+x2+9)3- \frac{6 \left(\frac{x \left(\frac{x^{2}}{x^{2} + 9} - 1\right)}{\left(x^{2} + 9\right)^{\frac{3}{2}}} + \frac{3 \left(\frac{x}{\sqrt{x^{2} + 9}} + 4\right) \left(\frac{x^{2}}{x^{2} + 9} - 1\right)}{\left(4 x + \sqrt{x^{2} + 9}\right) \sqrt{x^{2} + 9}} + \frac{4 \left(\frac{x}{\sqrt{x^{2} + 9}} + 4\right)^{3}}{\left(4 x + \sqrt{x^{2} + 9}\right)^{2}}\right)}{\left(4 x + \sqrt{x^{2} + 9}\right)^{3}}

Problem 2

Using SymPy, compute 14x2+3x+5dx.\int_{-\infty}^{\infty}\frac{1}{4 x^{2} + 3 x + 5}\,dx.

expr = 1 / (4*x**2 + 3*x + 5) expr.integrate((x,-oo,oo))
271π71\frac{2 \sqrt{71} \pi}{71}

Problem 3

Using the midpoint rule, estimate 23sin(x2)dx\displaystyle\int_{2}^{3}\sin(x^{2})\,dx by computing M10M_{10}. You may copy relevant code from the "Quadrature in Python" notes on Blackboard. If you do so, be sure to use NumPy's version of the sine function instead of SymPy's version of the sine function.

import numpy as np # define a midpoints function since we'll need it a couple times midpoint = lambda x: ( x[1:] + x[:-1] ) / 2 def midpoint_rule(f, lower, upper, n): x_vals = np.linspace(lower, upper, n + 1) # define Delta X delta_x = ( upper - lower ) / n # define midpoints midpoints = midpoint(x_vals) # compute approximation # width * height areas = delta_x * f(midpoints) return areas.sum() f = lambda x: np.sin(x**2) # define our function for this integral midpoint_rule(f, 2, 3, 10)
0.030010607817955004-0.030010607817955004

Problem 4

Let ak=1k!k=(k!)1/k.a_{k} = \frac{1}{\sqrt[k]{k!}} = (k!)^{-1/k}. Using SymPy, find limkak\lim\limits_{k\to\infty}a_{k}.

k = Symbol('k') expr = (factorial(k)**(-1/k)) limit(expr, k , oo)
00

Problem 5

Find the first five nonzero terms of the Taylor series for sin(x)\sin(\sqrt{x}) centered at a=π2a = \pi^{2}.

series(sin(sqrt(x)), x0 = pi**2, n =6)
xπ22π+(xπ2)28π3+(116π5+148π3)(xπ2)3+(164π5+5128π7)(xπ2)4+(xπ2)5(7256π913840π5+3256π7)+O((xπ2)6;xπ2)- \frac{x - \pi^{2}}{2 \pi} + \frac{\left(x - \pi^{2}\right)^{2}}{8 \pi^{3}} + \left(- \frac{1}{16 \pi^{5}} + \frac{1}{48 \pi^{3}}\right) \left(x - \pi^{2}\right)^{3} + \left(- \frac{1}{64 \pi^{5}} + \frac{5}{128 \pi^{7}}\right) \left(x - \pi^{2}\right)^{4} + \left(x - \pi^{2}\right)^{5} \left(- \frac{7}{256 \pi^{9}} - \frac{1}{3840 \pi^{5}} + \frac{3}{256 \pi^{7}}\right) + O\left(\left(x - \pi^{2}\right)^{6}; x\rightarrow \pi^{2}\right)