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
Evaluation (eval, evala)
Simplification (simplify)
Conversions (convert)
New Functions
Changes to Functions
The Integrator
The Differential Equation solvers
Pattern Matcher
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
a;
sin⁡x
b;
cos⁡x
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.
Two-dimensional coordinate systems can be added using addcoords.
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
coeff(p(x),x,-infinity);
The degree and ldegree commands now behave correctly with respect to the zero polynomial.
degree( 0, x );
−∞
ldegree( 0, x );
∞
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);
ODE1≔ⅆⅆxy⁡x=y⁡x−x⁢ln⁡x2x2+ln⁡x
DEtools[odeadvisor](ODE[1]);
_1st_order,_with_linear_symmetries,_Riccati
DEtools[symgen](ODE[1]); # ODE symmetries
_ξ=x,_η=x+y
dsolve(ODE[1], can);
y⁡x=−x⁢−2⁢5⁢ln⁡x+5⁢tanh⁡ln⁡x+_C1⁢52−5⁢510
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;
ODE2≔ⅆ2ⅆx2y⁡x⁢ⅆⅆxy⁡x⁢y⁡x⁢x6−2⁢ⅆⅆxy⁡x3⁢x6+2⁢ⅆⅆxy⁡x2⁢y⁡x⁢x5+y⁡x5
ans := dsolve(ODE[2], gon2);
ans≔y⁡x=3⁢x22⁢x⁢_C1⁢x+1⁢2⁢_C1⁢x−3⁢_C2⁢x2+2⁢2⁢x⁢_C1⁢x+1
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 );
sin⁡xx=π|sin⁡xx=π
value( (14) );
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≔x8−x6+x4−x2−9
Grec := galois( p );
Grec≔8T44,[2^4]S(4),-,384,(4 8),(1 8)(4 5),(1 2 3 8)(4 5 6 7)
member( permgroup( degree( p, x ), {[]} ), DerivedS( permgroup( degree( p, x ), Grec[5] ) ) ); # is p(x) solvable by radicals?
true
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:=proca,b,clocalr,s;r:=b*a+c*a;s:=c*b+c^2;r − send proc
codegen[optimize]( f );
proca,b,clocalt4;t4:=c^2;b*a+c*a − c*b − t4end proc
codegen[optimize]( f, 'tryhard' );
proca,b,clocalresult,t1;t1:=b+c;result:=a*t1 − c*t1end proc
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 ];
cs≔r=b⁢a+c⁢a,s=c⁢b+c2
codegen[optimize]( cs );
r=b⁢a+c⁢a,t4=c2,s=c⁢b+t4
codegen[cost]( (23) );
2⁢additions+4⁢multiplications+3⁢assignments
codegen[optimize]( cs, 'tryhard' );
t2=b+c,r=t2⁢a,s=t2⁢c
codegen[cost]( (25) );
additions+3⁢assignments+2⁢multiplications
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 );
eval( x/sin(x), x=0);
Error, numeric exception: division by zero
int(f(x),x=-infinity..infinity);
∫−∞∞f⁡xⅆx
eval( (28), f=(t->exp(-t^2)));
π
Functions with special support for evaluation at a point:
diff, Diff,
int, Int,
limit, Limit,
product, Product,
sum, Sum,
the inttrans functions and piecewise.
eval( int( sin( t ), t = 0 .. x ), x = Pi/2 );
eval( int( f( t ), t = 0 .. x ), t = a );
∫0xf⁡tⅆt
eval( diff( abs(x), x ), x = 0 );
Error, (in `simpl/abs`) abs is not differentiable at 0
eval( diff( abs(x), x ), x = 1 );
In addition, a new command, intat, for "evaluating integrals at a point" has been added.
intat(F(a),a =r) = int(F(r),r);
∫rF⁡aⅆa=∫F⁡rⅆr
Intat(diff(F(z),z,z),z=G(x))=intat(diff(F(z),z,z),z=G(x));
∫G⁡xⅆ2ⅆz2F⁡zⅆz=D⁡F