Next: The Solve Commands Up: Maple: An Introduction Previous: Simplification Commands

Calculus Commands

Experiment with the integration, differentiation and summation commands. The Maple syntax for these functions and examples is as follows.


> diff(ln(x),x);
                                      1/x

> diff(arcsin(a*x),x);
                                        a
                                 --------------
                                       2  2 1/2
                                 (1 - a  x )

> int(x*ln(x),x);
                                  2              2
                             1/2 x  ln(x) - 1/4 x

> int(sqrt(1-x^2),x);
                                   2 1/2
                       1/2 x (1 - x )    + 1/2 arcsin(x)

> int(ln(x),x=1..2);
                                 - 1 + 2 ln(2)

> sum(n^2,n);
                                 3        2
                            1/3 n  - 1/2 n  + 1/6 n

> sum(a^k,k=1..n);
                                 (n + 1)
                                a            a
                                -------- - -----
                                  a - 1    a - 1

In the case of indefinite integration, you can test whether Maple's answer is right by differentiating the integral and subtracting in from the integrand. The difference should be zero! But Maple may not recognize that the difference is zero immediately. You may have to help Maple simplify the difference to 0. You can make use of expand and simplify. Example:


> f := (x^3+2*x^2-x)/(x^3-x^2+x-1);
                                     3      2
                                    x  + 2 x  - x
                              f := ---------------
                                    3    2
                                   x  - x  + x - 1

> int(f,x);
                                               2
                           x + ln(x - 1) + ln(x  + 1)

> diff(",x);
                                    1          x
                              1 + ----- + 2 ------
                                  x - 1      2
                                            x  + 1

> simplify("-f);
                                       0


bondaren@thsun1.jinr.ru