(C1) FUNCSOLVE((N+1)*FOO(N)-(N+3)*FOO(N+1)/(N+1) = (N-1)/(N+2),FOO(N)); N (D1) FOO(N) = --------------- (N + 1) (N + 2)
Warning: this is a very rudimentary implementation--many safety checks and obvious generalizations are missing.
(C1) X+Z=Y$ (C2) 2*A*X-Y=2*A**2$ (C3) Y-2*Z=2$ (C4) LINSOLVE([D1,D2,D3],[X,Y,Z]),GLOBALSOLVE:TRUE; SOLUTION (E4) X : A + 1 (E5) Y : 2 A (E6) Z : A - 1 (D6) [E4, E5, E6]
(C1) POLY1:X**10-2*X**4+1/2$ (C2) NROOTS(POLY1,-6,9.1); RAT REPLACED 0.5 BY 1/2 = 0.5 (D2) 4
ROOTSCONTRACT(SQRT(X)*Y^(3/2)) ==> SQRT(X*Y^3)
When RADEXPAND is TRUE and DOMAIN is REAL (their defaults), ROOTSCONTRACT converts ABS into SQRT, e.g.
ROOTSCONTRACT(ABS(X)*SQRT(Y)) ==> SQRT(X^2*Y)
There is an option ROOTSCONMODE (default value TRUE), affecting ROOTSCONTRACT as follows:
Problem Value of Result of applying ROOTSCONMODE ROOTSCONTRACT X^(1/2)*Y^(3/2) FALSE (X*Y^3)^(1/2) X^(1/2)*Y^(1/4) FALSE X^(1/2)*Y^(1/4) X^(1/2)*Y^(1/4) TRUE (X*Y^(1/2))^(1/2) X^(1/2)*Y^(1/3) TRUE X^(1/2)*Y^(1/3) X^(1/2)*Y^(1/4) ALL (X^2*Y)^(1/4) X^(1/2)*Y^(1/3) ALL (X^3*Y^2)^(1/6)
The above examples and more may be tried out by typing
When ROOTSCONMODE is FALSE, ROOTSCONTRACT contracts only wrt rational number exponents whose denominators are the same. The key to the ROOTSCONMODE:TRUE$ examples is simply that 2 divides into 4 but not into 3. ROOTSCONMODE:ALL$ involves taking the lcm (least common multiple) of the denominators of the exponents. ROOTSCONTRACT uses RATSIMP in a manner similar to LOGCONTRACT (see the manual).