A concise tutorial on mathematical tools in Linux (II)

Source: Internet
Author: User

Triangle operation
(%i1) trigexpand(sin(10*x+y));
(%o1)                 cos(10 x) sin(y) + sin(10 x) cos(y)
(%i2) trigexpand(sin(2*x));
(%o2)                           2 cos(x) sin(x)
(%i3) trigsimp(2*cos(x)^2+sin(x)^2);
                                     2
(%o3)                             cos (x) + 1
(%i4) trigreduce(-sin(x)^2+3*cos(x)^2+x);
                      cos(2 x)      cos(2 x)   1        1
(%o4)                 -------- + 3 (-------- + -) + x - -
                         2             2       2        2

Algebraic reasoning
(%i1) assume(x>0,y<-1,z>=0);
(%o1)                      [x > 0, y < - 1, z >= 0]
(%i2) assume(a<b and b<c);
(%o2)                           [b > a, c > b]
(%i3) facts();
(%o3)               [x > 0, - 1 > y, z >= 0, b > a, c > b]
(%i4) is(a>c);
(%o4)                                false
(%i5) is(z-y>0);
(%o5)                                true
(%i6) is(z-x>0);

Maxima was unable to evaluate the predicate:
z - x > 0
-- an error.  Quitting.  To debug this try debugmode(true);
(%i7) prederror:false;
(%o7)                                false
(%i8) is(z-x>0);
(%o8)                               unknown
(%i9) forget(a<b);
(%o9)                               [b > a]
(%i10) is(a>c);
(%o10)                              unknown

Level Calculation
(%i1) sum(i,i,1,5);
(%o1)                                 15
(%i2) sum(i^2,i,1,5);
(%o2)                                 55
(%i3) sum(1/2^i,i,1,inf);
                                   inf
                                   ====
                                   /     1
(%o3)                               >    --
                                   /      i
                                   ====  2
                                   i = 1
(%i4) sum(1/2^i,i,1,inf),simpsum;
(%o4)                                  1
(%i5) sum(1/i^2,i,1,inf),simpsum;
                                        2
                                     %pi
(%o5)                                ----
                                      6
(%i6) sum(1/i,i,1,inf),simpsum;
(%o6)                                 inf

Calculus
(%i1) limit(1/x,x,inf);
(%o1)                                  0
(%i2) limit(sin(x)/x,x,0);
(%o2)                                  1
(%i3) limit(sin(x),x,inf);
(%o3)                                 ind
(%i4) diff(3*x^2+x+5/x,x);
                                       5
(%o4)                            6 x - -- + 1
                                        2
                                       x
(%i5) diff(sin(x)*tan(x),x);
                                           2
(%o5)                   cos(x) tan(x) + sec (x) sin(x)
(%i6) diff(%e^(a*x),x);
                                        a x
(%o6)                               a %e
(%i7) integrate(sin(x)^3,x);
                                  3
                               cos (x)
(%o7)                          ------- - cos(x)
                                  3
(%i8) integrate(x^3,x,1,3);
(%o8)                                 20
(%i9) taylor(%e^x,x,0,3);
                                     2    3
                                    x    x
(%o9)/T/                    1 + x + -- + -- + . . .
                                    2    6
(%i10) taylor(sin(x),x,0,5);
                                  3    5
                                 x    x
(%o10)/T/                    x - -- + --- + . . .
                                 6    120
(%i11) taylor(sqrt(x+1),x,1,3);
                                                     2                  3
                    sqrt(2) (x - 1)   sqrt(2) (x - 1)    sqrt(2) (x - 1)
(%o11)/T/ sqrt(2) + --------------- - ---------------- + ----------------
                           4                 32                128
                                                                        + . . .
(%i12) ratsimp(%);
                      3              2
             sqrt(2) x  - 7 sqrt(2) x  + 43 sqrt(2) x + 91 sqrt(2)
(%o12)       -----------------------------------------------------
                                      128

Matrix Operations
(%i1) f[i,j]:=i+j;
(%o1)                           f     := i + j
                                 i, j
(%i2) genmatrix(f,3,3);
                                  [ 2  3  4 ]
                                  [         ]
(%o2)                             [ 3  4  5 ]
                                  [         ]
                                  [ 4  5  6 ]
(%i3) g[i,j]:=i-2^j;
                                              j
(%o3)                           g     := i - 2
                                 i, j
(%i4) genmatrix(g,3,3);
                               [ - 1  - 3  - 7 ]
                               [               ]
(%o4)                          [  0   - 2  - 6 ]
                               [               ]
                               [  1   - 1  - 5 ]
(%i5) %o2+%o4;
                                 [ 1  0  - 3 ]
                                 [           ]
(%o5)                            [ 3  2  - 1 ]
                                 [           ]
                                 [ 5  4   1  ]
(%i6) %o2.%o4;
                               [ 2  - 16  - 52 ]
                               [               ]
(%o6)                          [ 2  - 22  - 70 ]
                               [               ]
                               [ 2  - 28  - 88 ]
(%i7) %o2^^3;
                               [ 360  474  588 ]
                               [               ]
(%o7)                          [ 474  624  774 ]
                               [               ]
                               [ 588  774  960 ]
(%i8) x:matrix([17, 3],[-8, 11]);
                                  [ 17   3  ]
(%o8)                             [         ]
                                  [ - 8  11 ]
(%i9) x^^-1;
                                [ 11      3  ]
                                [ ---  - --- ]
                                [ 211    211 ]
(%o9)                           [            ]
                                [  8    17   ]
                                [ ---   ---  ]
                                [ 211   211  ]

For more information, see the official documentation:
Http://maxima.sourceforge.net/docs/manual/en/maxima.html

Be honest
Please indicate the source of the post

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.