【问题标题】:How to expand in taylor series a composition of functions?如何在泰勒级数中展开函数组合?
【发布时间】:2019-06-15 16:25:45
【问题描述】:

我想在 taylor 系列中扩展一个类型的函数:f(x+f(x))x=a 周围的情况下 f(a)=0

(%i1) atvalue(f(x),[x=a],0)$

直接微积分产生:

(%i2) taylor(f(x+f(x)),x,a,2);

(%o2)/T/ f(a)+(at('diff(f(f(x)+x),x,1),x=a))*(x-a)+((at('diff(f(f(x)+x),x,2),x=a))*(x-a)^2)/2+...

如果我定义一个中间函数:

(%i3)define(tf(x),taylor(f(x),x,a,2))$

然后我得到泰勒级数的展开:

(%i4) taylor(f(x+tf(x)),x,a,2);

(%o4) 0+...

我希望得到以下结果: f(1+f'(a))f'(a)(x-a)+(x-a)^2 f''(a)[f'(a)+(1+f'(a))^2/2]+o(x-a)^2

我该如何解决这个问题?

【问题讨论】:

    标签: maxima taylor-series


    【解决方案1】:

    您可以使用gradef 来简化符号。

    gradef(f(x),  f1(x)) $
    gradef(f1(x), f2(x)) $
    
    atvalue(f(x), x = a,  0) $
    
    e: f(x+f(x)) $
    e: taylor(e, x, a, 2) $
    e: expand(e, 0, 0)$ /* 'taylor' form to ordinar expression */
    e: ev(e, nouns);    /* f(a) to 0 */
    

    返回

              2                                          2
           (f1 (a) f2(a) + 3 f1(a) f2(a) + f2(a)) (x - a)
    (%o7) -----------------------------------------------
                                  2
                                                              2
                                                         + (f1 (a) + f1(a)) (x - a)
    

    【讨论】:

    • 好的,在这种情况下很清楚!但是,是否可以评估泰勒展开式中的简化 f(a)=0?例如,如果我想在泰勒级数中扩展函数 1/f(x+f(x))
    【解决方案2】:

    解决方法如下:

    
    
        gradef(f(x),  f1(x)) $
        gradef(f1(x), f2(x)) $
        atvalue(f(x), x = a,  0) $
    
        e: f(x+f(x)) $
        e: taylor(e, x, a, 2) $
        e: expand(e, 0, 0)$ /* 'taylor' form to ordinar expression*/
        e: ev(e, nouns);    /* f(a) to 0 */
        taylor(e,x,a,2); /* Becomes again a taylor serie which could be reused*/
    
    

    例如,如果我想找到定义的Steffensen method的顺序,对于函数f,它是C^2和f(a)=0,f'(a)!=0,通过:

    
    
        Sf(x)=x-f(x)^2/(f(x+f(x)-f(x))
    
    

    如果我直接围绕 a 展开这个函数,我会得到:

    
    
    
    Sf(x)=a+(x-a)-(f1(a)^2*(x-a)^2)/f(a)+...
    

    因为 f(a)=0 而发散。

    所以这必须分两步进行。首先我扩大分母:

    
    
        den:f(x+f(x))-f(x)$
        t:taylor(den,x,a,2);
        t: expand(t, 0, 0)$
        t: ev(t, nouns)$
        t:taylor(t,x,a,2);
    
    

    然后我展开函数Sf:

    
    
        Sf:x-f(x)^2/(t)$/*Introducing the taylor serie of den*/
        taylor(Sf,x,a,2);
    
    

    提供想要的结果:

    
    
        Sf(x)=a+((f1(a)+1)*f2(a)*(x-a)^2)/(2*f1(a))+...
    
    

    【讨论】:

      猜你喜欢
      • 2017-06-14
      • 2013-10-09
      • 2011-12-06
      • 2014-06-11
      • 2017-04-02
      • 2016-01-24
      • 1970-01-01
      • 2021-07-10
      • 1970-01-01
      相关资源
      最近更新 更多