matlab如何对某个式子泰勒展开?
发布网友
发布时间:2022-03-25 19:53
我来回答
共2个回答
热心网友
时间:2022-03-25 21:23
taylor(f,n,'v',a) 输入参量f为待展开函数的符号表达式 n取正整数,f被展开成最高次幂为(n-1)的幂级数 v是指定的变量名称,缺省时为x或t a表示函数f在x=a点展开 缺省a表示在0点展开,即为麦克劳林级数,此时省略n则默认n=6.
热心网友
时间:2022-03-25 22:41
TAYLOR Taylor series expansion.
TAYLOR(f) is the fifth order Maclaurin polynomial approximation to f.
Three additional parameters can be specified, in almost any order.
TAYLOR(f,n) is the (n-1)-st order Maclaurin polynomial.
TAYLOR(f,a) is the Taylor polynomial approximation about point a.
TAYLOR(f,x) uses the independent variable x instead of FINDSYM(f).
Examples:
taylor(exp(-x)) returns
1-x+1/2*x^2-1/6*x^3+1/24*x^4-1/120*x^5
taylor(log(x),6,1) returns
x-1-1/2*(x-1)^2+1/3*(x-1)^3-1/4*(x-1)^4+1/5*(x-1)^5
taylor(sin(x),pi/2,6) returns
1-1/2*(x-1/2*pi)^2+1/24*(x-1/2*pi)^4
taylor(x^t,3,t) returns
1+log(x)*t+1/2*log(x)^2*t^2