matlab实现下公式的taylor级数展开

y=L^2/(L+x1*d1+x2*d2)^2实现x1,x2的一阶展开,即a+b*x1+c*x2的形式。希望能显示结果... y=L^2/(L+x1*d1+x2*d2)^2实现x1,x2的一阶展开,即a+b*x1+c*x2的形式。希望能显示结果 展开
 我来答
iwantt
推荐于2018-05-07 · TA获得超过2800个赞
知道小有建树答主
回答量:430
采纳率:100%
帮助的人:420万
展开全部
你好,很简单,只要用taylor函数就可以

syms x2 x1 d1 d2 L
y=L^2/(L+x1*d1+x2*d2)^2;
f = taylor(y)

f =

L^2/(L + d2*x2)^2 - (2*L^2*d1*x1)/(L + d2*x2)^3 + (3*L^2*d1^2*x1^2)/(L + d2*x2)^4 - (4*L^2*d1^3*x1^3)/(L + d2*x2)^5 + (5*L^2*d1^4*x1^4)/(L + d2*x2)^6 - (6*L^2*d1^5*x1^5)/(L + d2*x2)^7

>>

下面是matlab提供的关于taylor 函数的一些帮助,可以通过 doc taylor 调出来

Examples
Compute the Maclaurin series expansions of these functions:
syms x
taylor(exp(x))
taylor(sin(x))
taylor(cos(x))
ans =
x^5/120 + x^4/24 + x^3/6 + x^2/2 + x + 1

ans =
x^5/120 - x^3/6 + x

ans =
x^4/24 - x^2/2 + 1

Compute the Taylor series expansions around x = 1 for these functions. The default expansion point is 0. To specify a different expansion point, use ExpansionPoint:
syms x
taylor(log(x), x, 'ExpansionPoint', 1)
ans =
x - (x - 1)^2/2 + (x - 1)^3/3 - (x - 1)^4/4 + (x - 1)^5/5 - 1

Alternatively, specify the expansion point as the third argument of taylor:
taylor(acot(x), x, 1)
ans =
pi/4 - x/2 + (x - 1)^2/4 - (x - 1)^3/12 + (x - 1)^5/40 + 1/2

Compute the Maclaurin series expansion for this function. The default truncation order is 6. Taylor series approximation of this function does not have a fifth-degree term, so taylor approximates this function with the fourth-degree polynomial:
syms x
f = sin(x)/x;
t6 = taylor(f)
t6 =
x^4/120 - x^2/6 + 1

Use Order to control the truncation order. For example, approximate the function up to the orders 8 and 10:
t8 = taylor(f, 'Order', 8)
t10 = taylor(f, 'Order', 10)
t8 =
- x^6/5040 + x^4/120 - x^2/6 + 1

t10 =
x^8/362880 - x^6/5040 + x^4/120 - x^2/6 + 1
幸运的申朋朋
推荐于2016-10-02
知道答主
回答量:2
采纳率:0%
帮助的人:2.3万
展开全部
  在(m,n)处泰勒展开:y(x1,x2)=y(m,n)+yx1(m,n)*x1+yx2(m,n)+。。。

  结果:y=L^2/(L+m*d1+n*d2)^2 - 2*L^2*d1*(x1-m)/(L+m*d1+n*d2)^3 - 2*L^2*d2*(x2-n)/(L+m*d1+n*d2)^3
  若m=n=0,y=1 - 2*d1*x1/L - 2*d2*x2/L
  即: a=1
b= - 2*d1/L
c= - 2*d2/L
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式