Taylor Expansion with 2 variables
|
12-30-2019, 01:27 AM
Post: #1
|
|||
|
|||
Taylor Expansion with 2 variables
I'm sharing a little function I wrote that returns the Taylor expansion of functions of two variables. The Taylor function included in the prime only works for single variable functions.
Function definition: PHP Code: taylor2d(ff,vars,exppt,ordr) For example, to return the second order polynomial that approximates the function sin(2x)+cos(y) at the point x=0, y=0: PHP Code: taylor2d(sin(2x)+cos(y),[x,y],[0,0],2) You can also use this function to find the equation of the tangential plane to a surface. Since the tangential plane is a first order approximation, just set the parameter ordr to 1: PHP Code: taylor2d(ln(2*x+y),[x,y],[-1,3],1) PHP Code: 2x+y-1 PHP Code: #cas |
|||
« Next Oldest | Next Newest »
|
Messages In This Thread |
Taylor Expansion with 2 variables - hamorabi - 12-30-2019 01:27 AM
|
User(s) browsing this thread: 1 Guest(s)