1 /* Original version of this file copyright 1999 by Michael Wester,
2 * and retrieved from http://www.math.unm.edu/~wester/demos/Limits/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 /* ---------- Limits ---------- */
19 /* Start with a famous example => e */
20 'limit((1 + 1/n)^n, n, inf);
23 limit((1 - cos(x))/x^2, x, 0);
24 /* See Dominik Gruntz, _On Computing Limits in a Symbolic Manipulation System_,
25 Ph.D. dissertation, Swiss Federal Institute of Technology, Zurich,
26 Switzerland, 1996. => 5 */
27 limit((3^x + 5^x)^(1/x), x, inf);
29 limit(log(x)/(log(x) + sin(x)), x, inf);
30 /* => - e^2 [Gruntz] */
31 'limit((exp(x*exp(-x)/(exp(-x) + exp(-2*x^2/(x + 1)))) - exp(x))/x, x, inf);
34 'limit(x*log(x)*log(x*exp(x) - x^2)^2/log(log(x^2 + 2*exp(exp(3*x^3*log(x))))),
37 /* => 1/e [Knopp, p. 73] */
38 limit(1/n * n!^(1/n), n, inf);
39 /* Rewrite the above problem slightly => 1/e */
40 limit(1/n * gamma(n + 1)^(1/n), n, inf);
41 /* => 1 [Gradshteyn and Ryzhik 8.328(2)] */
43 limit(gamma(z + a)/gamma(z)*exp(-a*log(z)), z, inf);
46 limit(gamma(z + a)/gamma(z)*exp(-a*log(z)), z, inf);
48 /* => e^z [Gradshteyn and Ryzhik 9.121(8)] */
49 limit(hgfred([1, k], [1], z/k), k, inf);
50 /* => Euler's_constant [Gradshteyn and Ryzhik 9.536] */
51 limit(zeta(x) - 1/(x - 1), x, 1);
52 /* => gamma(x) [Knopp, p. 385] */
53 'limit(n^x/(x * 'product((1 + x/k), k, 1, n)), n, inf);
59 /* See Angus E. Taylor and W. Robert Mann, _Advanced Calculus_, Second Edition,
60 Xerox College Publishing, 1972, p. 125 => 1 */
61 limit(x * integrate(exp(-t^2), t, 0, x)/(1 - exp(-x^2)), x, 0);
63 [limit(x/abs(x), x, 0, minus), limit(x/abs(x), x, 0, plus)];
64 /* => pi/2 [Richard Q. Chen] */
65 limit(atan(-log(x)), x, 0, plus);