Improved Symbolics in Maple V Release 5

 Many improvements to the symbolic capabilities of Maple have been made in Release 5.  A brief description of these improvements follows.

General

 • The gcd command now can manipulate radicals, radical extensions, and in some cases,  can attempt to deal with transcendental expressions. (Care must be exercised if non-rational subexpressions are algebraically dependent, but many common cases will work.)
 > gcd( sin( x ), cos( x ), 'a', 'b' );
 ${1}$ (1)
 > a;
 ${\mathrm{sin}}{}\left({x}\right)$ (2)
 > b;
 ${\mathrm{cos}}{}\left({x}\right)$ (3)
 • The gcd command takes advantage of (partially) factored inputs and can thus return some partially factored results.
 • The commands seq, add, and mul work better with infinities.
 > readlib( addcoords )( cnew, [ t1, t2 ], [ ( t1^2 - 1 ) / t2, ( t2^3 - 1 ) / t1 ] );
 > plot( sqrt( x ), x = -10 .. 10, coords = cnew );
 • The coefficients of x^infinity and x^-infinity, in a polynomial, are $0$:
 > coeff(p(x),x,infinity);
 ${0}$ (4)
 > coeff(p(x),x,-infinity);
 ${0}$ (5)
 • The degree and ldegree commands now behave correctly with respect to the zero polynomial.
 > degree( 0, x );
 ${-}{\mathrm{\infty }}$ (6)
 > ldegree( 0, x );
 ${\mathrm{\infty }}$ (7)
 • The dsolve command has been rewritten to use Lie's symmetry methods by default, resulting in a remarkable improvement in its performance and functionality. Also dsolve is now fully integrated with the odeadvisor command (see DEtools,Lie).
 > ODE[1] := diff(y(x),x)=(y(x)-x*ln(x))^2/(x^2) + ln(x);
 ${{\mathrm{ODE}}}_{{1}}{≔}\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right){=}\frac{{\left({y}{}\left({x}\right){-}{x}{}{\mathrm{ln}}{}\left({x}\right)\right)}^{{2}}}{{{x}}^{{2}}}{+}{\mathrm{ln}}{}\left({x}\right)$ (8)
 $\left[\left[{\mathrm{_1st_order}}{,}{\mathrm{_with_linear_symmetries}}\right]{,}{\mathrm{_Riccati}}\right]$ (9)
 > DEtools[symgen](ODE[1]);         # ODE symmetries
 $\left[{\mathrm{_ξ}}{=}{x}{,}{\mathrm{_η}}{=}{x}{+}{y}\right]$ (10)
 > dsolve(ODE[1], can);
 ${y}{}\left({x}\right){=}{-}\frac{{x}{}\left({-}{2}{}\sqrt{{5}}{}{\mathrm{ln}}{}\left({x}\right){+}{5}{}{\mathrm{tanh}}{}\left(\frac{\left({\mathrm{ln}}{}\left({x}\right){+}{\mathrm{_C1}}\right){}\sqrt{{5}}}{{2}}\right){-}\sqrt{{5}}\right){}\sqrt{{5}}}{{10}}$ (11)
 A high order example solved using symmetries (see dsolve,Lie)
 > ODE[2] := diff(y(x),x,x)*diff(y(x),x)*y(x)*x^6 - 2*diff(y(x),x)^3*x^6 + 2*diff(y(x),x)^2*y(x)*x^5+y(x)^5;
 ${{\mathrm{ODE}}}_{{2}}{≔}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{x}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right){}{y}{}\left({x}\right){}{{x}}^{{6}}{-}{2}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}^{{3}}{}{{x}}^{{6}}{+}{2}{}{\left(\frac{{ⅆ}}{{ⅆ}{x}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{y}{}\left({x}\right)\right)}^{{2}}{}{y}{}\left({x}\right){}{{x}}^{{5}}{+}{{y}{}\left({x}\right)}^{{5}}$ (12)
 > ans := dsolve(ODE[2], gon2);
 ${\mathrm{ans}}{≔}{y}{}\left({x}\right){=}\frac{{3}{}{{x}}^{{2}}}{{2}{}\sqrt{{x}{}\left({\mathrm{_C1}}{}{x}{+}{1}\right)}{}\sqrt{{2}}{}{\mathrm{_C1}}{}{x}{-}{3}{}{\mathrm{_C2}}{}{{x}}^{{2}}{+}{2}{}\sqrt{{2}}{}\sqrt{{x}{}\left({\mathrm{_C1}}{}{x}{+}{1}\right)}}$ (13)
 • dsolve now uses ODESolStruc to convey reductions of order of high order ODEs.
 • The evala command has improved performance and functionality.
 • The functions factors and eliminate are now readlib defined.
 • The value command understands more functions: DESol, RESol, Hypergeom, Eval, Intat.
 > Eval( sin(x), x = Pi );
 $\genfrac{}{}{0}{}{{\mathrm{sin}}{}\left({x}\right)}{\phantom{{x}{=}{\mathrm{\pi }}}}{|}\genfrac{}{}{0}{}{\phantom{{\mathrm{sin}}{}\left({x}\right)}}{{x}{=}{\mathrm{\pi }}}$ (14)
 > value( (14) );
 ${0}$ (15)
 • The galois command has been improved. The Galois groups of polynomials of degree up to 8 can now be computed.
 Additionally, galois now returns more information about the groups it computes, including the order and sign (indicating whether the group is contained in the alternating group of the same degree). The form of generators has also changed; they are represented as Maple strings written in disjoint cycle notation.
 > readlib( galois ): with( group ):
 > p := sum( (-1)^i * x^(2*i) - i, i=0..4);
 ${p}{≔}{{x}}^{{8}}{-}{{x}}^{{6}}{+}{{x}}^{{4}}{-}{{x}}^{{2}}{-}{9}$ (16)
 > Grec := galois( p );
 ${\mathrm{Grec}}{≔}{"8T44"}{,}\left\{{"\left[2^4\right]S\left(4\right)"}\right\}{,}{"-"}{,}{384}{,}\left\{{"\left(4 8\right)"}{,}{"\left(1 8\right)\left(4 5\right)"}{,}{"\left(1 2 3 8\right)\left(4 5 6 7\right)"}\right\}$ (17)
 > member( permgroup( degree( p, x ), {[]} ), DerivedS( permgroup( degree( p, x ), Grec[5] ) ) ); # is p(x) solvable by radicals?
 ${\mathrm{true}}$ (18)
 • The sum command has been improved. Moenck's algorithm has been replaced with Abramov's algorithm. Performance is better and simpler representations are often achieved.
 • Handling of the incomplete GAMMA function by expand has been improved.
 • The performance of lattice has been improved.
 • The testeq command is faster and more powerful.
 • The optimizer (for expressions and computation sequences and simple maple procedures), optimize, has been improved. There is also a new option, tryhard{optimize}.
 > a := 'a': b := 'b': c := 'c':
 > f := proc(a,b,c)         local   r,s;         r := a * b + a * c;         s := c * b + c^2;         r - s; end;
 ${f}{:=}{\mathbf{proc}}\left({a}{,}{b}{,}{c}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{local}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{r}{,}{s}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{r}{:=}{b}{*}{a}{+}{c}{*}{a}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{s}{:=}{c}{*}{b}{+}{c}{^}{2}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{r}{-}{s}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (19)
 > codegen[optimize]( f );
 ${\mathbf{proc}}\left({a}{,}{b}{,}{c}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{local}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{t4}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{t4}}{:=}{c}{^}{2}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{b}{*}{a}{+}{c}{*}{a}{-}{c}{*}{b}{-}{\mathrm{t4}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (20)
 > codegen[optimize]( f, 'tryhard' );
 ${\mathbf{proc}}\left({a}{,}{b}{,}{c}\right)\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{local}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{result}}{,}{\mathrm{t1}}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{t1}}{:=}{b}{+}{c}{;}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathrm{result}}{:=}{a}{*}{\mathrm{t1}}{-}{c}{*}{\mathrm{t1}}\phantom{\rule[-0.0ex]{0.5em}{0.0ex}}{\mathbf{end proc}}$ (21)
 > f := 'f':
 • The directory separator for the machine currently running Maple can be found using kernelopts(dirsep)
 • To see the effect of optimization, we can use the cost function on the computation sequence from the body of f.
 > cs := [ r = a * b + a * c, s = c * b + c^2 ];
 ${\mathrm{cs}}{≔}\left[{r}{=}{b}{}{a}{+}{c}{}{a}{,}{s}{=}{c}{}{b}{+}{{c}}^{{2}}\right]$ (22)
 > codegen[optimize]( cs );
 ${r}{=}{b}{}{a}{+}{c}{}{a}{,}{\mathrm{t4}}{=}{{c}}^{{2}}{,}{s}{=}{c}{}{b}{+}{\mathrm{t4}}$ (23)
 > codegen[cost]( (23) );
 ${2}{}{\mathrm{additions}}{+}{4}{}{\mathrm{multiplications}}{+}{3}{}{\mathrm{assignments}}$ (24)
 > codegen[optimize]( cs, 'tryhard' );
 ${\mathrm{t2}}{=}{b}{+}{c}{,}{r}{=}{\mathrm{t2}}{}{a}{,}{s}{=}{\mathrm{t2}}{}{c}$ (25)
 > codegen[cost]( (25) );
 ${\mathrm{additions}}{+}{3}{}{\mathrm{assignments}}{+}{2}{}{\mathrm{multiplications}}$ (26)

Evaluation (eval, evala)

 • Evaluation at a point, using the second argument of eval, has been added.  Note that this is defined quite generally, and can deal with expressions where subs was incorrect.
 > eval( sin(t - Pi/2), t = Pi );
 ${1}$ (27)
 > eval( x/sin(x), x=0);
 > int(f(x),x=-infinity..infinity);
 ${{\int }}_{{-}{\mathrm{\infty }}}^{{\mathrm{\infty }}}{f}{}\left({x}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{x}$ (28)
 > eval( (28), f=(t->exp(-t^2)));
 $\sqrt{{\mathrm{\pi }}}$ (29)
 • Functions with special support for evaluation at a point:
 diff, Diff,
 int, Int,
 sum, Sum,
 the inttrans functions and piecewise.
 > eval( int( sin( t ), t = 0 .. x ), x = Pi/2 );
 ${1}$ (30)
 > eval( int( f( t ), t = 0 .. x ), t = a );
 ${{\int }}_{{0}}^{{x}}{f}{}\left({t}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{t}$ (31)
 > eval( diff( abs(x), x ), x = 0 );
 > eval( diff( abs(x), x ), x = 1 );
 ${1}$ (32)
 In addition, a new command, intat, for "evaluating integrals at a point" has been added.
 > intat(F(a),a =r) = int(F(r),r);
 ${{\int }}_{{}}^{{r}}{F}{}\left({a}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{a}{=}{\int }{F}{}\left({r}\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{r}$ (33)
 > Intat(diff(F(z),z,z),z=G(x))=intat(diff(F(z),z,z),z=G(x));
 ${{\int }}_{{}}^{{G}{}\left({x}\right)}\left(\frac{{{ⅆ}}^{{2}}}{{ⅆ}{{z}}^{{2}}}\phantom{\rule[-0.0ex]{0.4em}{0.0ex}}{F}{}\left({z}\right)\right)\phantom{\rule[-0.0ex]{0.3em}{0.0ex}}{ⅆ}{z}{=}{\mathrm{D}}{}\left({F}\right)$