updates/R5/symbolic - Maple Help

Online Help

All Products    Maple    MapleSim


Home : Support : Online Help : updates/R5/symbolic

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

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;

sinx

(2)

b;

cosx

(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.

• 

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

(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 );

(6)

ldegree( 0, x );

(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);

ODE1ⅆⅆxyx=yxxlnx2x2+lnx

(8)

DEtools[odeadvisor](ODE[1]);

_1st_order,_with_linear_symmetries,_Riccati

(9)

DEtools[symgen](ODE[1]);         # ODE symmetries

_ξ=x,_η=x+y

(10)

dsolve(ODE[1], can);

yx=x25lnx+5tanhlnx+_C1525510

(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;

ODE2ⅆ2ⅆx2yxⅆⅆxyxyxx62ⅆⅆxyx3x6+2ⅆⅆxyx2yxx5+yx5

(12)

ans := dsolve(ODE[2], gon2);

ansyx=3x22x_C1x+12_C1x3_C2x2+22x_C1x+1

(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 );

sinxx=π|sinxx=π

(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);

px8x6+x4x29

(16)

Grec := galois( p );

Grec8T44,[2^4]S(4),-,384,(4 8),(1 8)(4 5),(1 2 3 8)(4 5 6 7)

(17)

member( permgroup( degree( p, x ), {[]} ), DerivedS( permgroup( degree( p, x ), Grec[5] ) ) ); # is p(x) solvable by radicals?

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:=proca,b,clocalr,s;r:=b*a+c*a;s:=c*b+c^2;rsend proc

(19)

codegen[optimize]( f );

proca,b,clocalt4;t4:=c^2;b*a+c*ac*bt4end proc

(20)

codegen[optimize]( f, 'tryhard' );

proca,b,clocalresult,t1;t1:=b+c;result:=a*t1c*t1end 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 ];

csr=ba+ca,s=cb+c2

(22)

codegen[optimize]( cs );

r=ba+ca,t4=c2,s=cb+t4

(23)

codegen[cost]( (23) );

2additions+4multiplications+3assignments

(24)

codegen[optimize]( cs, 'tryhard' );

t2=b+c,r=t2a,s=t2c

(25)

codegen[cost]( (25) );

additions+3assignments+2multiplications

(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);

Error, numeric exception: division by zero

int(f(x),x=-infinity..infinity);

fxⅆx

(28)

eval( (28), f=(t->exp(-t^2)));

π

(29)
• 

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 );

1

(30)

eval( int( f( t ), t = 0 .. x ), t = a );

0xftⅆt

(31)

eval( diff( abs(x), x ), x = 0 );

Error, (in `simpl/abs`) abs is not differentiable at 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);

rFaⅆa=Frⅆr

(33)

Intat(diff(F(z),z,z),z=G(x))=intat(diff(F(z),z,z),z=G(x));

Gxⅆ2ⅆz2Fzⅆz=DF