Guest User

Untitled

a guest
Feb 21st, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.21 KB | None | 0 0
  1. def fTaylor(f, x0, x1, steps):
  2. a = 0
  3. approx = 0
  4. for n in range(steps):
  5. df = f.diff(n)
  6. approx = approx + (df(a).n()/factorial(n))*((x1-x0)**n)
  7. n = n + 1
  8. return approx
Add Comment
Please, Sign In to add comment