iconEuler Examples

Examples in Maxima Mode

Maxima Examples

>maximamode on
Maxima mode is on (compatibility mode)
>ratsimp(1/a+1/a^2-1/a^3)
                               2
                              a  + a - 1
                              ----------
                                   3
                                  a

>radcan(sqrt(2)/sqrt(4))
                                  1
                               -------
                               sqrt(2)

>radcan(log(100)/log(10))
                                  2

>factor(a^3-a*b^2-a^2*b+b^3)
                                  2
                           (b - a)  (b + a)

>expand((1+1/x)^5), ratsimp(%)
                      5   10   10   5    1
                      - + -- + -- + -- + -- + 1
                      x    2    3    4    5
                          x    x    x    x


                  5      4       3       2
                 x  + 5 x  + 10 x  + 10 x  + 5 x + 1
                 -----------------------------------
                                  5
                                 x

>trigsimp(expand((sin(x)+cos(x))^5))
               4           2                       5
       (- 4 cos (x) + 8 cos (x) + 1) sin(x) - 4 cos (x) + 5 cos(x)

>trigexpand(cos(3*x))
                         3                  2
                      cos (x) - 3 cos(x) sin (x)

>trigreduce(cos(x)^3*sin(x)), trigrat(cos(x)^3/sin(x)^2)
                        sin(4 x) + 2 sin(2 x)
                        ---------------------
                                  8


                          cos(3 x) + 3 cos(x)
                        - -------------------
                            2 cos(2 x) - 2

>rectform(log(1+%i))
                            log(2)   I pi
                            ------ + ----
                              2       4

>sum(k^3, k, 1, N) | simpsum, factor(%)
                             4      3    2
                            N  + 2 N  + N
                            --------------
                                  4


                              2        2
                             N  (N + 1)
                             -----------
                                  4

>product(4*n^2/(4*n^2-1),n,1,1000); 2*float(%)
                          3.140807746030395

>solve(x^3-3*x^2+4=0,x), map(rhs,%)
                           [x = - 1, x = 2]


                               [- 1, 2]

>solve([a+b=4,a-b+c=5,a+c=1],[a,b,c]), at(a+b+c,%[1])
                     [[a = 8, b = - 4, c = - 7]]


                                 - 3

>solve([a+b+c=1,a+2*a+3*c=1],[a,b]), at(a,%[1])
                               3 c - 1      2
                       [[a = - -------, b = -]]
                                  3         3


                                3 c - 1
                              - -------
                                   3

>ode2('diff(y,x)=y+x^2,y,x), solve(at(%,[x=0,y=1])=1,%c)
                          2             - x        x
                 y = ((- x  - 2 x - 2) E    + %c) E


                               [%c = 3]

>diff(x^x,x), diff(x^x,x,2)
                            x
                           x  (log(x) + 1)


                       x             2    x - 1
                      x  (log(x) + 1)  + x

>integrate(x*sin(x),x), at(%,x=%pi)-at(%,x=0)
                          sin(x) - x cos(x)


                                  pi

>integrate(x*sin(x),x,0,%pi)
                                  pi

>quad_qags(x^x,x,0,1), %[1]
          [0.78343051071213, 3.3514857555871913E-11, 231, 0]


                           0.78343051071213

>limit(x^x,x,0,plus)
                                  1

>limit(x*sin(1/x),x,inf)
                                  1

>tlimit(x*((1+1/x)^x-%e),x,inf)
                                   E
                                 - -
                                   2

>powerseries(log(x),x,1)
                        inf
                        ====        i1        i1
                        \      (- 1)   (x - 1)
                      -  >     -----------------
                        /             i1
                        ====
                        i1 = 1

>subst(t,x+1,x^2+x+1), ratsubst(t,x+1,x^2+x+1)
                               2
                              x  + x + 1


                               2
                              t  - t + 1

>factor(x^4-1), gfactor(x^4-1)
                                         2
                       (x - 1) (x + 1) (x  + 1)


                   (x - 1) (x + 1) (x - I) (x + I)

>polarform(1+%i), rectform(%)
                                     I pi
                                     ----
                                      4
                            sqrt(2) E


                                I + 1

>float(sin(1+%i))
                0.63496391478474 I + 1.298457581415977

>log(a*b)-log(a)+log(a^c), % | logexpand=super
                     log(a) c + log(a b) - log(a)


                          log(a) c + log(b)

>logcontract(2*log(a)+3*log(b))
                                   2  3
                              log(a  b )

>exponentialize(sinh(1)+cosh(1)), ratsimp(%)
                              - 1        - 1
                         E + E      E - E
                         -------- + --------
                            2          2


                                  E

>maximamode off
Maxima mode is off

Examples Homepage