Sponsored links: Algebra eBooks
 

Related

tex

tex(vollkommen);

Calculate

tex

tex (''2/2/2);

Calculate

tex

tex((1/2*x^3-1/6*x^2*...

eq2:(1/2*x^3-1/6*x^2*...

tex(eq2);

Calculate

tex

tex(x/2);

Calculate

tex

f(x):=(1/9)*(8*x + 2*...

tex(f(x));

? tex;

Calculate

tex

g(alpha) := (1/9)*(8*...

tex(g(alpha));

d: alpha^3;

Calculate

tex

tex(Int(1/(x^4+1),x));

Calculate

tex

m:[[1,2,3],[4,5,6]];

tex(m);

Calculate

tex

tex( A = ([1,0,1],[1,...

Calculate

tex

tex(a=[2,3,6]);

Calculate

tex

Run Example
(%i1)factorC(_f,_z):=block([s,n,m,fp,j],fp:1,/* This commented code was meant to use themore robust solver to_poly_solve, but I couldn't understand how to handle multiplicitiesss:args(to_poly_solve(_f,_z)),s:create_list(ss[k][1],k,1,length(ss)),*/s:solve(_f,_z),m:multiplicities,n:length(s),for j:1 thru n do  if lhs(s[j])#0  then fp:fp*(_z-(rhs(s[j])))^m[j], fp:fp*divide(_f,fp)[1],fp);
(%o1) factorC(_f, _z) := block([s, n, m, fp, j], fp : 1, s : solve(_f, _z), 
m : multiplicities, n : length(s), for j thru n 
                                             m
                                              j
do if lhs(s ) # 0 then fp : fp (_z - rhs(s ))  , fp : fp divide(_f, fp) , fp)
           j                              j                            1
(%i2) partfracC(_f,_z):=block([d,fd],d:denom(_f),fd:factorC(d,_z),partfrac(1/fd,_z));
(%o2) partfracC(_f, _z) := block([d, fd], d : denom(_f), fd : factorC(d, _z), 
                                                                       1
                                                              partfrac(--, _z))
                                                                       fd
(%i3) O:partfracC(1/(x^5-1)^4,x);
               4 %i %pi           2 %i %pi             2 %i %pi
               --------           --------           - --------
                  5                  5                    5
(%o3) (41992 %e         + 42160 %e         + 42076 %e
             4 %i %pi                  4 %i %pi         2 %i %pi            4 %i %pi            4 %i %pi
           - --------                  --------         --------          - --------            --------
                5                         5                5                   5                   5
 + 41824 %e           + 42328)/((625 %e         - 625 %e         + 1875 %e           - 1875) (%e         x
 - 1))
           4 %i %pi          2 %i %pi            2 %i %pi            4 %i %pi
           --------          --------          - --------          - --------
              5                 5                   5                   5
 + (1082 %e         + 1018 %e         + 1114 %e           + 1114 %e
                    2 %i %pi           2 %i %pi           4 %i %pi
                    --------         - --------         - --------
                       5                  5                  5
 + 1082)/((- 1250 %e         + 625 %e           + 625 %e          )
    4 %i %pi
    --------
       5           2
 (%e         x - 1) )
        4 %i %pi        2 %i %pi          2 %i %pi          4 %i %pi
        --------        --------        - --------        - --------
           5               5                 5                 5
   28 %e         + 20 %e         + 12 %e           + 20 %e           + 20
 + ----------------------------------------------------------------------
                   2 %i %pi         4 %i %pi     4 %i %pi
                 - --------         --------     --------
                      5                5            5           3
          (625 %e           - 625 %e        ) (%e         x - 1)
               4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
               --------         --------         - --------         - --------
                  5                5                  5                  5
 + 1/((- 125 %e         - 125 %e         - 125 %e           - 125 %e
           4 %i %pi                      4 %i %pi          2 %i %pi
           --------                      --------          --------
              5           4                 5                 5
 + 500) (%e         x - 1) ) - (- 1544 %e         - 1880 %e
          2 %i %pi           4 %i %pi
        - --------         - --------
             5                  5
 - 32 %e           - 368 %e           - 956)
            4 %i %pi          2 %i %pi            2 %i %pi            4 %i %pi     2 %i %pi
            --------          --------          - --------          - --------     --------
               5                 5                   5                   5            5
/((- 4375 %e         - 6875 %e         + 6875 %e           + 4375 %e          ) (%e         x - 1))
         4 %i %pi         2 %i %pi          2 %i %pi          4 %i %pi
         --------         --------        - --------        - --------
            5                5                 5                 5
 + (42 %e         + 170 %e         + 42 %e           - 54 %e           + 170)
           4 %i %pi          2 %i %pi           2 %i %pi            4 %i %pi
           --------          --------         - --------          - --------
              5                 5                  5                   5
/((- 625 %e         + 1875 %e         - 625 %e           - 2500 %e           + 1875)
    2 %i %pi
    --------
       5           2
 (%e         x - 1) )
        4 %i %pi       2 %i %pi          2 %i %pi         4 %i %pi
        --------       --------        - --------       - --------
           5              5                 5                5
 - (4 %e         - 4 %e         - 12 %e           + 4 %e           - 12)
         4 %i %pi           2 %i %pi           4 %i %pi           2 %i %pi
         --------         - --------         - --------           --------
            5                  5                  5                  5           3
/((625 %e         - 625 %e           + 625 %e           - 625) (%e         x - 1) )
       2 %i %pi           4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
     - --------           --------         --------         - --------         - --------
          5                  5                5                  5                  5
 + %e          /((- 125 %e         - 125 %e         + 500 %e           - 125 %e
           2 %i %pi
           --------
              5           4
 - 125) (%e         x - 1) )
            4 %i %pi           2 %i %pi             2 %i %pi
            --------           --------           - --------
               5                  5                    5
 - (41824 %e         + 42076 %e         + 42160 %e
             4 %i %pi                  4 %i %pi         2 %i %pi            4 %i %pi
           - --------                  --------         --------          - --------
                5                         5                5                   5
 + 41992 %e           + 42328)/((625 %e         - 625 %e         + 1875 %e           - 1875) (x
     4 %i %pi
     --------
        5
 - %e        ))
           4 %i %pi          2 %i %pi            2 %i %pi            4 %i %pi
           --------          --------          - --------          - --------
              5                 5                   5                   5
 + (1114 %e         + 1082 %e         + 1082 %e           + 1114 %e
                    2 %i %pi           2 %i %pi           4 %i %pi
                    --------         - --------         - --------
                       5                  5                  5
 + 1018)/((- 1250 %e         + 625 %e           + 625 %e          )
        4 %i %pi
        --------
           5     2
 (x - %e        ) )
        4 %i %pi        2 %i %pi          2 %i %pi          4 %i %pi
        --------        --------        - --------        - --------
           5               5                 5                 5
   20 %e         + 20 %e         + 20 %e           + 12 %e           + 28
 - ----------------------------------------------------------------------
                    2 %i %pi         4 %i %pi         4 %i %pi
                  - --------         --------         --------
                       5                5                5     3
           (625 %e           - 625 %e        ) (x - %e        )
       4 %i %pi           4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
     - --------           --------         --------         - --------         - --------
          5                  5                5                  5                  5
 + %e          /((- 125 %e         - 125 %e         - 125 %e           - 125 %e
               4 %i %pi
               --------
                  5     4
 + 500) (x - %e        ) )
         4 %i %pi         2 %i %pi            2 %i %pi           4 %i %pi
         --------         --------          - --------         - --------
            5                5                   5                  5
 - (32 %e         + 956 %e         + 1544 %e           + 368 %e
                    4 %i %pi          2 %i %pi            2 %i %pi            4 %i %pi
                    --------          --------          - --------          - --------
                       5                 5                   5                   5
 + 1880)/((- 4375 %e         - 6875 %e         + 6875 %e           + 4375 %e          ) (x
     2 %i %pi
     --------
        5
 - %e        ))
          4 %i %pi        2 %i %pi          2 %i %pi           4 %i %pi
          --------        --------        - --------         - --------
             5               5                 5                  5
 + (170 %e         + 42 %e         + 42 %e           + 170 %e           - 54)
           4 %i %pi          2 %i %pi           2 %i %pi            4 %i %pi
           --------          --------         - --------          - --------
              5                 5                  5                   5
/((- 625 %e         + 1875 %e         - 625 %e           - 2500 %e           + 1875)
        2 %i %pi
        --------
           5     2
 (x - %e        ) )
          4 %i %pi        2 %i %pi         2 %i %pi         4 %i %pi
          --------        --------       - --------       - --------
             5               5                5                5
 - (- 4 %e         + 12 %e         + 4 %e           - 4 %e           + 12)
         4 %i %pi           2 %i %pi           4 %i %pi               2 %i %pi
         --------         - --------         - --------               --------
            5                  5                  5                      5     3
/((625 %e         - 625 %e           + 625 %e           - 625) (x - %e        ) )
       4 %i %pi           4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
     - --------           --------         --------         - --------         - --------
          5                  5                5                  5                  5
 + %e          /((- 125 %e         - 125 %e         + 500 %e           - 125 %e
               2 %i %pi
               --------
                  5     4
 - 125) (x - %e        ) )
         4 %i %pi         2 %i %pi           2 %i %pi          4 %i %pi
         --------         --------         - --------        - --------
            5                5                  5                 5
   120 %e         + 120 %e         - 132 %e           + 36 %e           + 36
 - -------------------------------------------------------------------------
                4 %i %pi         2 %i %pi            2 %i %pi
                --------         --------          - --------
                   5                5                   5
         (625 %e         + 625 %e         - 1250 %e          ) (x - 1)
        4 %i %pi        2 %i %pi          2 %i %pi         4 %i %pi
        --------        --------        - --------       - --------
           5               5                 5                5
   36 %e         + 36 %e         - 60 %e           + 4 %e           + 4
 + --------------------------------------------------------------------
             4 %i %pi         2 %i %pi            2 %i %pi
             --------         --------          - --------
                5                5                   5             2
      (625 %e         + 625 %e         - 1250 %e          ) (x - 1)
        4 %i %pi          4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
        --------          --------         --------         - --------         - --------
           5                 5                5                  5                  5
 - (8 %e        )/((500 %e         - 125 %e         - 125 %e           - 125 %e
                      4 %i %pi
                      --------
               3         5
 - 125) (x - 1) ) + %e
         4 %i %pi         2 %i %pi           2 %i %pi           4 %i %pi
         --------         --------         - --------         - --------
            5                5                  5                  5
/((500 %e         - 125 %e         - 125 %e           - 125 %e           - 125)
        4
 (x - 1) )
(%i4) tex(O);
$${{41992\,e^{{{4\,i\,\pi}\over{5}}}+42160\,e^{{{2\,i\,\pi}\over{5}}}
 +42076\,e^ {- {{2\,i\,\pi}\over{5}} }+41824\,e^ {- {{4\,i\,\pi
 }\over{5}} }+42328}\over{\left(625\,e^{{{4\,i\,\pi}\over{5}}}-625\,e
 ^{{{2\,i\,\pi}\over{5}}}+1875\,e^ {- {{4\,i\,\pi}\over{5}} }-1875
 \right)\,\left(e^{{{4\,i\,\pi}\over{5}}}\,x-1\right)}}+{{1082\,e^{{{
 4\,i\,\pi}\over{5}}}+1018\,e^{{{2\,i\,\pi}\over{5}}}+1114\,e^ {- {{2
 \,i\,\pi}\over{5}} }+1114\,e^ {- {{4\,i\,\pi}\over{5}} }+1082}\over{
 \left(-1250\,e^{{{2\,i\,\pi}\over{5}}}+625\,e^ {- {{2\,i\,\pi}\over{
 5}} }+625\,e^ {- {{4\,i\,\pi}\over{5}} }\right)\,\left(e^{{{4\,i\,
 \pi}\over{5}}}\,x-1\right)^2}}+{{28\,e^{{{4\,i\,\pi}\over{5}}}+20\,e
 ^{{{2\,i\,\pi}\over{5}}}+12\,e^ {- {{2\,i\,\pi}\over{5}} }+20\,e
 ^ {- {{4\,i\,\pi}\over{5}} }+20}\over{\left(625\,e^ {- {{2\,i\,\pi
 }\over{5}} }-625\,e^{{{4\,i\,\pi}\over{5}}}\right)\,\left(e^{{{4\,i
 \,\pi}\over{5}}}\,x-1\right)^3}}+{{1}\over{\left(-125\,e^{{{4\,i\,
 \pi}\over{5}}}-125\,e^{{{2\,i\,\pi}\over{5}}}-125\,e^ {- {{2\,i\,\pi
 }\over{5}} }-125\,e^ {- {{4\,i\,\pi}\over{5}} }+500\right)\,\left(e
 ^{{{4\,i\,\pi}\over{5}}}\,x-1\right)^4}}-{{-1544\,e^{{{4\,i\,\pi
 }\over{5}}}-1880\,e^{{{2\,i\,\pi}\over{5}}}-32\,e^ {- {{2\,i\,\pi
 }\over{5}} }-368\,e^ {- {{4\,i\,\pi}\over{5}} }-956}\over{\left(-
 4375\,e^{{{4\,i\,\pi}\over{5}}}-6875\,e^{{{2\,i\,\pi}\over{5}}}+6875
 \,e^ {- {{2\,i\,\pi}\over{5}} }+4375\,e^ {- {{4\,i\,\pi}\over{5}} }
 \right)\,\left(e^{{{2\,i\,\pi}\over{5}}}\,x-1\right)}}+{{42\,e^{{{4
 \,i\,\pi}\over{5}}}+170\,e^{{{2\,i\,\pi}\over{5}}}+42\,e^ {- {{2\,i
 \,\pi}\over{5}} }-54\,e^ {- {{4\,i\,\pi}\over{5}} }+170}\over{\left(
 -625\,e^{{{4\,i\,\pi}\over{5}}}+1875\,e^{{{2\,i\,\pi}\over{5}}}-625
 \,e^ {- {{2\,i\,\pi}\over{5}} }-2500\,e^ {- {{4\,i\,\pi}\over{5}} }+
 1875\right)\,\left(e^{{{2\,i\,\pi}\over{5}}}\,x-1\right)^2}}-{{4\,e
 ^{{{4\,i\,\pi}\over{5}}}-4\,e^{{{2\,i\,\pi}\over{5}}}-12\,e^ {- {{2
 \,i\,\pi}\over{5}} }+4\,e^ {- {{4\,i\,\pi}\over{5}} }-12}\over{
 \left(625\,e^{{{4\,i\,\pi}\over{5}}}-625\,e^ {- {{2\,i\,\pi}\over{5
 }} }+625\,e^ {- {{4\,i\,\pi}\over{5}} }-625\right)\,\left(e^{{{2\,i
 \,\pi}\over{5}}}\,x-1\right)^3}}+{{e^ {- {{2\,i\,\pi}\over{5}} }
 }\over{\left(-125\,e^{{{4\,i\,\pi}\over{5}}}-125\,e^{{{2\,i\,\pi
 }\over{5}}}+500\,e^ {- {{2\,i\,\pi}\over{5}} }-125\,e^ {- {{4\,i\,
 \pi}\over{5}} }-125\right)\,\left(e^{{{2\,i\,\pi}\over{5}}}\,x-1
 \right)^4}}-{{41824\,e^{{{4\,i\,\pi}\over{5}}}+42076\,e^{{{2\,i\,\pi
 }\over{5}}}+42160\,e^ {- {{2\,i\,\pi}\over{5}} }+41992\,e^ {- {{4\,i
 \,\pi}\over{5}} }+42328}\over{\left(625\,e^{{{4\,i\,\pi}\over{5}}}-
 625\,e^{{{2\,i\,\pi}\over{5}}}+1875\,e^ {- {{4\,i\,\pi}\over{5}} }-
 1875\right)\,\left(x-e^{{{4\,i\,\pi}\over{5}}}\right)}}+{{1114\,e^{
 {{4\,i\,\pi}\over{5}}}+1082\,e^{{{2\,i\,\pi}\over{5}}}+1082\,e^ {- 
 {{2\,i\,\pi}\over{5}} }+1114\,e^ {- {{4\,i\,\pi}\over{5}} }+1018
 }\over{\left(-1250\,e^{{{2\,i\,\pi}\over{5}}}+625\,e^ {- {{2\,i\,\pi
 }\over{5}} }+625\,e^ {- {{4\,i\,\pi}\over{5}} }\right)\,\left(x-e^{
 {{4\,i\,\pi}\over{5}}}\right)^2}}-{{20\,e^{{{4\,i\,\pi}\over{5}}}+20
 \,e^{{{2\,i\,\pi}\over{5}}}+20\,e^ {- {{2\,i\,\pi}\over{5}} }+12\,e
 ^ {- {{4\,i\,\pi}\over{5}} }+28}\over{\left(625\,e^ {- {{2\,i\,\pi
 }\over{5}} }-625\,e^{{{4\,i\,\pi}\over{5}}}\right)\,\left(x-e^{{{4\,
 i\,\pi}\over{5}}}\right)^3}}+{{e^ {- {{4\,i\,\pi}\over{5}} }}\over{
 \left(-125\,e^{{{4\,i\,\pi}\over{5}}}-125\,e^{{{2\,i\,\pi}\over{5}}}
 -125\,e^ {- {{2\,i\,\pi}\over{5}} }-125\,e^ {- {{4\,i\,\pi}\over{5}}
  }+500\right)\,\left(x-e^{{{4\,i\,\pi}\over{5}}}\right)^4}}-{{32\,e
 ^{{{4\,i\,\pi}\over{5}}}+956\,e^{{{2\,i\,\pi}\over{5}}}+1544\,e^ {- 
 {{2\,i\,\pi}\over{5}} }+368\,e^ {- {{4\,i\,\pi}\over{5}} }+1880
 }\over{\left(-4375\,e^{{{4\,i\,\pi}\over{5}}}-6875\,e^{{{2\,i\,\pi
 }\over{5}}}+6875\,e^ {- {{2\,i\,\pi}\over{5}} }+4375\,e^ {- {{4\,i\,
 \pi}\over{5}} }\right)\,\left(x-e^{{{2\,i\,\pi}\over{5}}}\right)}}+
 {{170\,e^{{{4\,i\,\pi}\over{5}}}+42\,e^{{{2\,i\,\pi}\over{5}}}+42\,e
 ^ {- {{2\,i\,\pi}\over{5}} }+170\,e^ {- {{4\,i\,\pi}\over{5}} }-54
 }\over{\left(-625\,e^{{{4\,i\,\pi}\over{5}}}+1875\,e^{{{2\,i\,\pi
 }\over{5}}}-625\,e^ {- {{2\,i\,\pi}\over{5}} }-2500\,e^ {- {{4\,i\,
 \pi}\over{5}} }+1875\right)\,\left(x-e^{{{2\,i\,\pi}\over{5}}}
 \right)^2}}-{{-4\,e^{{{4\,i\,\pi}\over{5}}}+12\,e^{{{2\,i\,\pi
 }\over{5}}}+4\,e^ {- {{2\,i\,\pi}\over{5}} }-4\,e^ {- {{4\,i\,\pi
 }\over{5}} }+12}\over{\left(625\,e^{{{4\,i\,\pi}\over{5}}}-625\,e
 ^ {- {{2\,i\,\pi}\over{5}} }+625\,e^ {- {{4\,i\,\pi}\over{5}} }-625
 \right)\,\left(x-e^{{{2\,i\,\pi}\over{5}}}\right)^3}}+{{e^ {- {{4\,i
 \,\pi}\over{5}} }}\over{\left(-125\,e^{{{4\,i\,\pi}\over{5}}}-125\,e
 ^{{{2\,i\,\pi}\over{5}}}+500\,e^ {- {{2\,i\,\pi}\over{5}} }-125\,e
 ^ {- {{4\,i\,\pi}\over{5}} }-125\right)\,\left(x-e^{{{2\,i\,\pi
 }\over{5}}}\right)^4}}-{{120\,e^{{{4\,i\,\pi}\over{5}}}+120\,e^{{{2
 \,i\,\pi}\over{5}}}-132\,e^ {- {{2\,i\,\pi}\over{5}} }+36\,e^ {- {{4
 \,i\,\pi}\over{5}} }+36}\over{\left(625\,e^{{{4\,i\,\pi}\over{5}}}+
 625\,e^{{{2\,i\,\pi}\over{5}}}-1250\,e^ {- {{2\,i\,\pi}\over{5}} }
 \right)\,\left(x-1\right)}}+{{36\,e^{{{4\,i\,\pi}\over{5}}}+36\,e^{
 {{2\,i\,\pi}\over{5}}}-60\,e^ {- {{2\,i\,\pi}\over{5}} }+4\,e^ {- {{
 4\,i\,\pi}\over{5}} }+4}\over{\left(625\,e^{{{4\,i\,\pi}\over{5}}}+
 625\,e^{{{2\,i\,\pi}\over{5}}}-1250\,e^ {- {{2\,i\,\pi}\over{5}} }
 \right)\,\left(x-1\right)^2}}-{{8\,e^{{{4\,i\,\pi}\over{5}}}}\over{
 \left(500\,e^{{{4\,i\,\pi}\over{5}}}-125\,e^{{{2\,i\,\pi}\over{5}}}-
 125\,e^ {- {{2\,i\,\pi}\over{5}} }-125\,e^ {- {{4\,i\,\pi}\over{5}}
  }-125\right)\,\left(x-1\right)^3}}+{{e^{{{4\,i\,\pi}\over{5}}}
 }\over{\left(500\,e^{{{4\,i\,\pi}\over{5}}}-125\,e^{{{2\,i\,\pi
 }\over{5}}}-125\,e^ {- {{2\,i\,\pi}\over{5}} }-125\,e^ {- {{4\,i\,
 \pi}\over{5}} }-125\right)\,\left(x-1\right)^4}}$$
(%o4)                                false
(%i5) 
Run Example
f(x):=exp(-x^2);
                                              2
(%o1)                          f(x) := exp(- x )
(%i2) tex( expand( integrate( (x-y-l)*f(x), x, l+y, inf) ));
$${{\sqrt{\pi}\,y\,\mathrm{erf}\left(y+l\right)}\over{2}}+{{\sqrt{\pi
 }\,l\,\mathrm{erf}\left(y+l\right)}\over{2}}+{{e^{-y^2-2\,l\,y-l^2}
 }\over{2}}-{{\sqrt{\pi}\,y}\over{2}}-{{\sqrt{\pi}\,l}\over{2}}$$
(%o2)                                false
(%i3) tex(integrate( expand( integrate( (x-y-l)*f(x), x, l+y, inf) * f(y)),y, -inf,inf));
$$\int_{-\infty }^{\infty }{{{\sqrt{\pi}\,y\,e^ {- y^2 }\,
 \mathrm{erf}\left(y+l\right)}\over{2}}+{{\sqrt{\pi}\,l\,e^ {- y^2 }
 \,\mathrm{erf}\left(y+l\right)}\over{2}}-{{\sqrt{\pi}\,y\,e^ {- y^2
  }}\over{2}}-{{\sqrt{\pi}\,l\,e^ {- y^2 }}\over{2}}+{{e^{-2\,y^2-2\,
 l\,y-l^2}}\over{2}}\;dy}$$
(%o3)                                false
(%i4) integrate( expand( integrate( (x-y-l)*f(x), x, l+y, inf) * f(y)),y, -inf,inf);
       inf                     2                               2
      /                     - y                             - y
      [       sqrt(%pi) y %e     erf(y + l)   sqrt(%pi) l %e     erf(y + l)
(%o4) I      (----------------------------- + -----------------------------
      ]                     2                               2
      /
       - inf
                             2                    2          2            2
                          - y                  - y      - 2 y  - 2 l y - l
            sqrt(%pi) y %e       sqrt(%pi) l %e       %e
          - ------------------ - ------------------ + ---------------------) dy
                    2                    2                      2
(%i5) integrate( y*exp(-y^2), y, -inf,inf);
(%o5)                                  0
(%i6) integrate( exp(-y^2)*erf(y+l),y,-inf,inf );
                           inf
                          /           2
                          [        - y
(%o6)                     I      %e     erf(y + l) dy
                          ]
                          /
                           - inf
(%i7) integrate( y*exp(-y^2),y,-inf,inf);
(%o7)                                  0
(%i8) integrate( exp(-y^2),y,-inf,inf);
(%o8)                              sqrt(%pi)
(%i9) integrate( exp(-(y+l)^2),y,-inf,inf);
(%o9)                              sqrt(%pi)
(%i10) romberg(exp(-y^2)*erf(y+l),y,-inf,inf);
                              2
                           - y
(%o10)           romberg(%e     erf(y + l), y, - 1.0 inf, inf)
(%i11) 
Run Example
f(x):= log(x+1);
(%o1)                         f(x) := log(x + 1)
(%i2) T4(x):=taylor(f(x), x, 0, 4);
(%o2)                   T4(x) := taylor(f(x), x, 0, 4)
(%i3) T7(x):=taylor(f(x), x, 0, 7);
(%o3)                   T7(x) := taylor(f(x), x, 0, 7)
(%i4) T11(x):=taylor(f(x), x, 0, 11);
(%o4)                  T11(x) := taylor(f(x), x, 0, 11)
(%i5) T16(x):=taylor(f(x), x, 0, 16);
(%o5)                  T16(x) := taylor(f(x), x, 0, 16)
(%i6) fortran(T4(x));
      -x**4/4.0E+0+x**3/3.0E+0-x**2/2.0E+0+x
(%o6)                                done
(%i7) fortran(T7(x));
      x**7/7.0E+0-x**6/6.0E+0+x**5/5.0E+0-x**4/4.0E+0+x**3/3.0E+0-x**2/2
     1   .0E+0+x
(%o7)                                done
(%i8) fortran(T11(x));
      x**11/1.1E+1-x**10/1.0E+1+x**9/9.0E+0-x**8/8.0E+0+x**7/7.0E+0-x**6
     1   /6.0E+0+x**5/5.0E+0-x**4/4.0E+0+x**3/3.0E+0-x**2/2.0E+0+x
(%o8)                                done
(%i9) fortran(T16(x));
      -x**16/1.6E+1+x**15/1.5E+1-x**14/1.4E+1+x**13/1.3E+1-x**12/1.2E+1+
     1   x**11/1.1E+1-x**10/1.0E+1+x**9/9.0E+0-x**8/8.0E+0+x**7/7.0E+0-x
     2   **6/6.0E+0+x**5/5.0E+0-x**4/4.0E+0+x**3/3.0E+0-x**2/2.0E+0+x
(%o9)                                done
(%i10) tex(T4(x));
$$x-{{x^2}\over{2}}+{{x^3}\over{3}}-{{x^4}\over{4}}+\cdots $$
(%o10)                               false
(%i11) tex(T7(x));
$$x-{{x^2}\over{2}}+{{x^3}\over{3}}-{{x^4}\over{4}}+{{x^5}\over{5}}-
 {{x^6}\over{6}}+{{x^7}\over{7}}+\cdots $$
(%o11)                               false
(%i12) tex(T11(x));
$$x-{{x^2}\over{2}}+{{x^3}\over{3}}-{{x^4}\over{4}}+{{x^5}\over{5}}-
 {{x^6}\over{6}}+{{x^7}\over{7}}-{{x^8}\over{8}}+{{x^9}\over{9}}-{{x
 ^{10}}\over{10}}+{{x^{11}}\over{11}}+\cdots $$
(%o12)                               false
(%i13) tex(T16(x));
$$x-{{x^2}\over{2}}+{{x^3}\over{3}}-{{x^4}\over{4}}+{{x^5}\over{5}}-
 {{x^6}\over{6}}+{{x^7}\over{7}}-{{x^8}\over{8}}+{{x^9}\over{9}}-{{x
 ^{10}}\over{10}}+{{x^{11}}\over{11}}-{{x^{12}}\over{12}}+{{x^{13}
 }\over{13}}-{{x^{14}}\over{14}}+{{x^{15}}\over{15}}-{{x^{16}}\over{
 16}}+\cdots $$
(%o13)                               false
(%i14) plot2d ([f(x),T4(x),T7(x),T11(x),T16(x)],[x, -1.5, 1.5],[y, -4, 2],[legend, "log(1+x)", "y=T4", "y=T7", "y=T11", "y=T16"],[gnuplot_preamble,"set key left"]);
plotplot2d ([f(x),T4(x),T7(x),T11(x),T16(x)],[x, -1.5, 1.5],[y, -4, 2],[legend, "log(1+x)", "y=T4", "y=T7", "y=T11", "y=T16"],[gnuplot_preamble,"set key left"]);

Related Help

Help for Tex