small problem with the manual.



 

> > RJF --- take a look at this, does this look reasonable?

Not really.  Ratdiff(expr,a+b) is just something random.  It happens to be
the same as ratdiff(expr,b). I don't know why you picked it, unless it was
to illustrate the lack of error checking.


Here's an explanation.

Ratdiff is a function that is intended for use only on polynomials or ratios
of polynomials in simple independent symbolic variables.  It does not use
any knowledge of exponential, trigonometric, or other functions. It only
knows about +, *, -, / and integer powers. Its second argument should be a
simple symbolic variable that occurs in expr.  In exchange for your
agreement to use ratdiff on this simple class of functions, ratdiff will
compute the derivative blazingly fast. It is especially fast if expr is in
CRE form, and you want it simplified to CRE form, because that is what it
will return.
If ratdiff is given a general form input, it will convert it to CRE form,
compute the derivative, and convert back to general form.

To illustrate its use, try this:
showtime:all$
z: rat( (a+b+c+d)^40)$ 
ze: ratexpand(z)$
ratdiff(z,c)$   observe the time.. I see 0.22 seconds on my system
diff(ze,c)$     observe the time.. I gave up waiting.

.......................





> 
>  -- Function: ratdiff (<expr>, <x>)
>      Differentiates the rational expression <expr> with 
> respect to <x>.
>      <expr> must be a ratio of polynomials or a polynomial in 
> <x>.  The
>      argument <x> may be a variable or a subexpression of <expr>.
> 
>      The result is equivalent to `diff', although perhaps in a
>      different form.  `ratdiff' may be faster than `diff', 
> for rational
>      expressions.
> 
>      `ratdiff' returns a canonical rational expression (CRE) if `expr'
>      is a CRE.  Otherwise, `ratdiff' returns a general expression.
> 
>      `ratdiff' considers only the dependence of <expr> on <x>, and
>      ignores any dependencies established by `depends'.
> 
>      Example:
> 
>           (%i1) expr: (4*x^3 + 10*x - 11)/(x^5 + 5);
>                                      3
>                                   4 x  + 10 x - 11
>           (%o1)                   ----------------
>                                         5
>                                        x  + 5
>           (%i2) ratdiff (expr, x);
>                               7       5       4       2
>                            8 x  + 40 x  - 55 x  - 60 x  - 50
>           (%o2)          - ---------------------------------
>                                     10       5
>                                    x   + 10 x  + 25
>           (%i3) expr: f(x)^3 - f(x)^2 + 7;
>                                    3       2
>           (%o3)                   f (x) - f (x) + 7
>           (%i4) ratdiff (expr, f(x));
>                                      2
>           (%o4)                   3 f (x) - 2 f(x)
>           (%i5) expr: (a + b)^3 + (a + b)^2;
>                                         3          2
>           (%o5)                  (b + a)  + (b + a)
>           (%i6) ratdiff (expr, a + b);
>                               2                    2
>           (%o6)            3 b  + (6 a + 2) b + 3 a  + 2 a
> 
> 
> Robert Dodier
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>