First Last - SymPy


In [ ]:
%matplotlib inline

import numpy as np
import matplotlib.pyplot as plt
import sympy as sp
$$ \Large {\displaystyle f(x)=3e^{-{\frac {x^{2}}{8}}}} \sin(x/3)$$
  • Find the first four terms of the Taylor expansion of the above equation
  • Make a plot of the function
  • Plot size 10 in x 4 in
  • X limts -5, 5
  • Y limits -2, 2
  • Over-plot the 1-term Taylor expansion using a different color
  • Over-plot the 2-term Taylor expansion using a different color
  • Over-plot the 3-term Taylor expansion using a different color
  • Over-plot the 4-term Taylor expansion using a different color

In [ ]:
sp.init_printing()

x = sp.symbols('x')

my_x = np.linspace(-10,10,100)

In [ ]:

Due Wed Nov 29 - Noon

  • Make sure to change the filename to your name!
  • Make sure to change the Title to your name!
  • File -> Download as -> HTML (.html)
  • upload your .html and .ipynb file to the class Canvas page

In [ ]: