Last active
November 1, 2018 08:23
-
-
Save balthild/87017fb8512865235f41d21707a192ac to your computer and use it in GitHub Desktop.
Try implementing Taylor Series in expreduce
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Higher order derivatives *) | |
Dn[expr_, {x_, n_}] := Nest[D[#, x]&, expr, n] | |
(* This function will not work until corywalker/expreduce#183 is fixed *) | |
TaylorSeries[exp_, {x_, p_, order_}] := | |
Sum[(Dn[exp, {x, n}] /. x->p) * (x-p)^n / (n!), {n, 0, order}] + O[x-p]^(l+1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment