1 /* Original version of this file copyright 1999 by Michael Wester,
2 * and retrieved from http://www.math.unm.edu/~wester/demos/ZeroEquivalence/problems.macsyma
5 * Released under the terms of the GNU General Public License, version 2,
6 * per message dated 2007-06-03 from Michael Wester to Robert Dodier
7 * (contained in the file wester-gpl-permission-message.txt).
9 * See: "A Critique of the Mathematical Abilities of CA Systems"
10 * by Michael Wester, pp 25--60 in
11 * "Computer Algebra Systems: A Practical Guide", edited by Michael J. Wester
12 * and published by John Wiley and Sons, Chichester, United Kingdom, 1999.
14 /* ----------[ M a c s y m a ]---------- */
15 /* ---------- Initialization ---------- */
18 /* ---------- Determining Zero Equivalence ---------- */
19 /* The following expressions are all equal to zero */
20 sqrt(997) - (997^3)^(1/6);
21 sqrt(999983) - (999983^3)^(1/6);
23 (2^(1/3) + 4^(1/3))^3 - 6*(2^(1/3) + 4^(1/3)) - 6;
25 cos(x)^3 + cos(x)*sin(x)^2 - cos(x);
27 /* See Joel Moses, ``Algebraic Simplification: A Guide for the Perplexed'',
28 _Communications of the Association of Computing Machinery_, Volume 14,
29 Number 8, August 1971, 527--537. This expression is zero if Re(x) is
30 contained in the interval ((4 n - 1)/2 pi, (4 n + 1)/2 pi) for n an integer:
31 ..., (-5/2 pi, -3/2 pi), (-pi/2, pi/2), (3/2 pi, 5/2 pi), ... */
32 expr: log(tan(1/2*x + %pi/4)) - asinh(tan(x));
33 radcan(exponentialize(logcontract(logarc(expr))));
34 q: logcontract(trigsimp(halfangles(trigexpand(logarc(expr)))));
35 assume(-%pi/2 < x, x < %pi/2)$
37 forget(-%pi/2 < x, x < %pi/2)$
38 /* Use a roundabout method---show that expr is a constant equal to zero */
40 radcan(exponentialize(dexpr));
41 q: factor(trigreduce(dexpr));
42 assume(-%pi/2 < x, x < %pi/2)$
44 forget(-%pi/2 < x, x < %pi/2)$
46 remvalue(expr, dexpr, q)$
47 log((2*sqrt(r) + 1)/sqrt(4*r + 4*sqrt(r) + 1));
48 logcontract(radcan(%));
49 (4*r + 4*sqrt(r) + 1)^(sqrt(r)/(2*sqrt(r) + 1))
50 * (2*sqrt(r) + 1)^(1/(2*sqrt(r) + 1)) - 2*sqrt(r) - 1;
52 /* [Gradshteyn and Ryzhik 9.535(3)] */
53 2^(1 - z)*gamma(z)*zeta(z)*cos(z*%pi/2) - %pi^z*zeta(1 - z);