Sponsored links: Algebra eBooks
 

Related

tex

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

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

tex(eq2);

Calculate

tex

f(x,y):=(a*x^2 + b*x*y);

tex(f(x,y));

Calculate

tex

f1:[1,2,3,4];

f2:[2,5,7,-2];

f3:[-1,5,6,7];

Calculate

tex

f(alpha):=(1/9)*(8*al...

tex(f(alpha));

Calculate

tex

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

tex(f(x));

? tex;

Calculate

tex

? ?? tex;

Calculate

tex

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

Calculate

tex

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

tex(f(x));

Calculate

tex

tex((mo-(2*mo-ma)*t)/...

Calculate

tex

Run Example
(%i1)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"]);
Run Example
f(x):=exp(x)/cos(x);
                                        exp(x)
(%o1)                           f(x) := ------
                                        cos(x)
(%i2) P4(x):=taylor(f(x), x, 0, 4);
(%o2)                   P4(x) := taylor(f(x), x, 0, 4)
(%i3) P7(x):=taylor(f(x), x, 0, 7);
(%o3)                   P7(x) := taylor(f(x), x, 0, 7)
(%i4) P9(x):=taylor(f(x), x, 0, 9);
(%o4)                   P9(x) := taylor(f(x), x, 0, 9)
(%i5) P14(x):=taylor(f(x), x, 0, 17);
(%o5)                  P14(x) := taylor(f(x), x, 0, 17)
(%i6) fortran(P4(x));
      x**4/2.0E+0+2.0E+0*x**3/3.0E+0+x**2+x+1
(%o6)                                done
(%i7) fortran(P7(x));
      1.3E+1*x**7/1.05E+2+1.9E+1*x**6/9.0E+1+3.0E+0*x**5/1.0E+1+x**4/2.0
     1   E+0+2.0E+0*x**3/3.0E+0+x**2+x+1
(%o7)                                done
(%i8) fortran(P9(x));
      1.63E+2*x**9/3.24E+3+3.1E+1*x**8/3.6E+2+1.3E+1*x**7/1.05E+2+1.9E+1
     1   *x**6/9.0E+1+3.0E+0*x**5/1.0E+1+x**4/2.0E+0+2.0E+0*x**3/3.0E+0+
     2   x**2+x+1
(%o8)                                done
(%i9) fortran(P14(x));
      1.886573641E+9*x**17/1.389404016E+12+1.90065457E+8*x**16/8.1729648
     1   E+10+8.14939E+5*x**15/2.43243E+8+3.908059E+6*x**14/6.810804E+8+
     2   2.4373E+4*x**13/2.9484E+6+3.211E+3*x**12/2.268E+5+1.2721E+4*x**
     3   11/6.237E+5+3.961E+3*x**10/1.134E+5+1.63E+2*x**9/3.24E+3+3.1E+1
     4   *x**8/3.6E+2+1.3E+1*x**7/1.05E+2+1.9E+1*x**6/9.0E+1+3.0E+0*x**5
     5   /1.0E+1+x**4/2.0E+0+2.0E+0*x**3/3.0E+0+x**2+x+1
(%o9)                                done
(%i10) tex(P4(x));
$$1+x+x^2+{{2\,x^3}\over{3}}+{{x^4}\over{2}}+\cdots $$
(%o10)                               false
(%i11) tex(P7(x));
$$1+x+x^2+{{2\,x^3}\over{3}}+{{x^4}\over{2}}+{{3\,x^5}\over{10}}+{{19
 \,x^6}\over{90}}+{{13\,x^7}\over{105}}+\cdots $$
(%o11)                               false
(%i12) tex(P9(x));
$$1+x+x^2+{{2\,x^3}\over{3}}+{{x^4}\over{2}}+{{3\,x^5}\over{10}}+{{19
 \,x^6}\over{90}}+{{13\,x^7}\over{105}}+{{31\,x^8}\over{360}}+{{163\,
 x^9}\over{3240}}+\cdots $$
(%o12)                               false
(%i13) tex(P14(x));
$$1+x+x^2+{{2\,x^3}\over{3}}+{{x^4}\over{2}}+{{3\,x^5}\over{10}}+{{19
 \,x^6}\over{90}}+{{13\,x^7}\over{105}}+{{31\,x^8}\over{360}}+{{163\,
 x^9}\over{3240}}+{{3961\,x^{10}}\over{113400}}+{{12721\,x^{11}
 }\over{623700}}+{{3211\,x^{12}}\over{226800}}+{{24373\,x^{13}}\over{
 2948400}}+{{3908059\,x^{14}}\over{681080400}}+{{814939\,x^{15}
 }\over{243243000}}+{{190065457\,x^{16}}\over{81729648000}}+{{
 1886573641\,x^{17}}\over{1389404016000}}+\cdots $$
(%o13)                               false
(%i14) plot2d ([P4(x),P7(x),P9(x),P14(x),f(x)], [x, -4, 4], [y, -4, 4],[color, green, blue, black, magenta, red],[legend, "T4", "T7", "T9", "T14", "exp(x)/cos(x)"],[axes,true], [xlabel,"X"] , [ylabel,"Y"]);
plotplot2d ([P4(x),P7(x),P9(x),P14(x),f(x)], [x, -4, 4], [y, -4, 4],[color, green, blue, black, magenta, red],[legend, "T4", "T7", "T9", "T14", "exp(x)/cos(x)"],[axes,true], [xlabel,"X"] , [ylabel,"Y"]);

Related Help

Help for Tex