aboutsummaryrefslogtreecommitdiff
path: root/src/input/heat.input.pamphlet
blob: 11e75b007e171ae0f264f1a3e76978d7d0706d4c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
\documentclass{article}
\usepackage{axiom}
\begin{document}
\title{\$SPAD/src/input heat.input}
\author{The Axiom Team}
\maketitle
\begin{abstract}
\end{abstract}
\eject
\tableofcontents
\eject
\section{License}
<<license>>=
--Copyright The Numerical Algorithms Group Limited 1996.
@
<<*>>=
<<license>>
-- ----------[ A x i o m ]----------
-- ---------- Initialization ----------
)set messages autoload off
)set quit unprotected
-- This is the heat equation
u:= operator('u)
heat:= D(u(x, t), t) - D(u(x, t), x, 2) = 0
-- This is the similarity form of the proposed solution
f:= operator('f)
s:= rule(u(x, t) == f(x/sqrt(t))/sqrt(t))
-- Apply s to the heat equation
s(lhs(heat)) = 0
-- Change to the similarity variable z = x/sqrt(t)
subst(lhs(%), x = z*sqrt(t)) = 0
-- Eliminate the denominator
% * denom(lhs(%))
-- Now, solve the ordinary differential equation
eq:=%
solve(%, f, z=0,[k1,k2])
-- Finally, transform back to the original variables
subst(%, z = x/sqrt(t))/sqrt(t)
-- If we set k2 = 0 and k1 = 1/(2*sqrt(%pi)) in the previous expression,
-- we will obtain the usual fundamental solution of the heat equation
subst(%, [k2 = 0, k1 = 1/(2*sqrt(%pi))])
@
\eject
\begin{thebibliography}{99}
\bibitem{1} nothing
\end{thebibliography}
\end{document}