1 /* Original version of this file copyright 1999 by Michael Wester,
2 * and retrieved from http://www.math.unm.edu/~wester/demos/PDEs/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 /* ---------- Partial Differential Equations ---------- */
21 if apply("+", map(lambda([e], if e # 0 then 1 else 0), l)) >= 2
27 /* A very simple PDE => g(x) + h(y) for arbitrary functions g and h */
28 'diff(f, x, 1, y, 1) = 0;
29 errcatch(pl_symmetry([lhs(%) - rhs(%)], [f], [x, y], [], ['diff(f, x)]));
30 /* Heat equation: the fundamental solution is 1/sqrt(4 pi t) exp(-x^2/[4 t]).
31 If f(x, t) and a(x, t) are solutions, the most general solution obtainable
32 from f(x, t) by group transformations is of the form u(x, t) = a(x, t)
33 + 1/sqrt(1 + 4 e6 t) exp(e3 - [e5 x + e6 x^2 - e5^2 t]/[1 + 4 e6 t])
34 f([e^(-e4) (x - 2 e5 t)]/[1 + 4 e6 t] - e1, [e^(-2 e4) t]/[1 + 4 e6 t] - e2)
35 See Peter J. Olver, _Applications of Lie Groups to Differential Equations_,
36 Second Edition, Springer Verlag, 1993, p. 120 (an excellent book). See also
38 'diff(u, t) = 'diff(u, x, 2);
39 q: pl_symmetry([lhs(%) - rhs(%)], [u], [x, t], [], ['diff(u, t)]);
40 assume(u > 0, %x1 > 0, %x2 > 0, 4*%n2 > 1)$
43 forget(u > 0, %x1 > 0, %x2 > 0, 4*%n2 > 1)$
45 /* Potential equation on a circular disk---a separable PDE
46 => v(r, theta) = a[0] + sum(a[n] r^n cos(n theta), n = 1..infinity)
47 + sum(b[n] r^n sin(n theta), n = 1..infinity) */
48 1/r * diff(r * diff(v(r, theta), r), r)
49 + 1/r^2 * diff(v(r, theta), theta, 2) = 0;
50 subst(v, v(r, theta), %);
51 pl_symmetry([lhs(%) - rhs(%)], [v], [r, theta], [], ['diff(v, theta, 2)]);
53 remfunction(pde_solns)$