Taylor Expansion with 2 variables - Printable Version +- HP Forums (https://www.hpmuseum.org/forum) +-- Forum: HP Software Libraries (/forum-10.html) +--- Forum: HP Prime Software Library (/forum-15.html) +--- Thread: Taylor Expansion with 2 variables (/thread-14267.html) |
Taylor Expansion with 2 variables - hamorabi - 12-30-2019 01:27 AM 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 |