Return to computing page for the first course APMA0330
Return to computing page for the second course APMA0340
Return to computing page for the fourth course APMA0360
Return to Mathematica tutorial for the first course APMA0330
Return to Mathematica tutorial for the second course APMA0340
Return to Mathematica tutorial for the fourth course APMA0360
Return to the main page for the course APMA0330
Return to the main page for the course APMA0340
Return to the main page for the course APMA0360
Introduction to Linear Algebra with Mathematica
where subscripts indicate partial derivatives. For example, \( \displaystyle \quad u_t = \frac{\partial u}{\partial t} . \quad \)
The heat equation contains (phisical) real parameters, so α > 0 and γ ≥ 0.
All functions in the heat equation \eqref{eqHeat.1}, boundary condition \eqref{eqHeat.2}, and the initial condition \eqref{eqHeat.3} are assumed to be in the Hilbert space ℌ². Also all derivatives (ut, uxx) are assumed to be continuous in the open domain 0 < x < ∞, 0 < t < ∞
Example 1:
Let us consider the Neumann problem on the half-line with homogeneous boundary conditions:
We reduce the given IBVP to an IVP on the whole line by extending the initial data u₀(x) to the
negative half-axis in such a fashion that the boundary condition is automatically satisfied.
Notice that if ψ(s) is an even function, i.e., ψ(−x) = ψ(,i>x), then its derivative function will be odd.
Indeed, differentiating in the definition of the even function, we get −ψ′(−x) = ψ′(x), which is the
same as ψ′(−x) = −ψ′(x). Hence, for an arbitrary even function ψ(x), ψ′(0) = 0. It is now clear that
extending the initial data so that the resulting function is even will produce solutions to the IVP on the
whole line that automatically satisfy the Neumann condition of (9).
We define the even extension of u₀(x),
\[
\mathfrak{\phi_{\mathrm{even}}}(x) = \begin{cases}
u_0 (x), &\quad\mbox{for }\ x> 0 ,
\\
u_0 (-x), &\quad\mbox{for }\ x \le 0 ,
\end{cases}
\]
and consider the following IVP on the whole line
\[
\begin{split}
v_t &= \alpha\,v_{xx} , \qquad -\infty < x < \infty , \quad 0 < t < \infty ,
\\
v_x (x, 0) = \mathfrak{\phi_{\mathrm{even}}}(x) .
\end{split}
\tag{1.2}
\]
It is clear that the solution v(x, t) of the IVP (1.1) will be even in x, since the difference [v(−x, tv(x, t)]
solves the heat equation and has zero initial data. We then use the solution formula for the IVP on the
whole line to write
\[
v(x,t) = \int_{-\infty}^{\infty} S(x-\xi , t)\,\mathfrak{\phi_{\mathrm{even}}}(\xi )\,{\text d}\xi .
\]
Then function
\[
w(x,t) = v(x,t) \big\vert_{x\ge 0} .
\]
solves the IBVP (1.1), and use
the expression for the heat kernel, as well as the definition (1.2), to write the solution formula as follows:
\[
w(x,t) = \frac{1}{\sqrt{4\pi\alpha t}} \int_0^{\infty} \left[ e^{-(x-\xi )^2 /(4\alpha t)} + e^{-(x+\xi )^2 /(4\alpha t)} \right] u_0 (\xi )\,{\text d}\xi .
\]
In terms of heat conduction, the Neumann condition in (1.1) means that there is no heat exchange
between the rod and the environment (recall that the heat flux is proportional to the spatial derivative
of the temperature). The physical interpretation of formula for w is that the integrand is the contribution
of u₀(ξ) plus an additional contribution, which comes from the lack of heat transfer to the points of the
rod with negative coordinates.
As a numerical example, we take u₀(x) = χ[0, R], the characteristic function of interval [0, R]. The the solution of corresponding IBVP (1.1) becomes
\begin{align*}
u(x,t) &= \frac{1}{\sqrt{4\pi\alpha t}} \int_0^R \left[ e^{-(x-\xi )^2 /(4\alpha t)} + e^{-(x+\xi )^2 /(4\alpha t)} \right] {\text d}\xi
\\
&= \frac{1}{\sqrt{\pi}} \int_{-x/\sqrt{4\alpha t}}^{(R-x)/\sqrt{4\alpha t}} e^{-p^2} {\text d}p + \frac{1}{\sqrt{\pi}} \int_{x/\sqrt{4\alpha t}}^{(R+x)/\sqrt{4\alpha t}} e^{-q^2} {\text d}q ,
\end{align*}
where we made the changes of variables
\[
p = \frac{\xi -x}{\sqrt{4\alpha t}} , \qquad q = \frac{\xi +x}{\sqrt{4\alpha t}} .
\]
Using the error function, we simplify
\[
w(x,t) = \mbox{erf}\left( \frac{R-x}{\sqrt{4\alpha t}} \right) + \mbox{erf}\left( \frac{R+x}{\sqrt{4\alpha t}} \right) + C ,
\]
where C is an arbitrary constant.
■
End of Example 1
To solve the given initial boundary value problem, we use the cosine Fourier transformation. So we multiply the differential equation \eqref{eqHeat.1} and the initial condition \eqref{eqHeat.3} by cosine (kx) and integrate with respect to x from 0 to ∞. This results in the equation
Boyd, J.P. and Flyer, N., Compatibility conditions for time-dependent partial differential equations and the rate of convergence of Chebyshev and Fourier spectral methods, Computer Methods in Applied Mechanics and Engineering, 1999, Volume 175, Issues 3–4, Pages 281--309. https://doi.org/10.1016/S0045-7825(98)00358-2
Chatziafratis, A., Boundary behaviour of the solution of the heat equation on the half line via the Fokas unified transform method, 2024,
https://doi.org/10.48550/arXiv.2401.08331
Chatziafratis, A., Fokas, A., Aifantis, E.C., Variations of heat equation on the half-line via the Fokas method, 2024,
First published: 08 September 2024
https://doi.org/10.1002/mma.10303
Chatziafratis, A., Mantzavinos, D., Boundary behavior for the heat equation on the half-line, 2022, https://doi.org/10.1002/mma.8245
Return to Mathematica page
Return to the main page (APMA0340)
Return to the Part 1 Basic Concepts
Return to the Part 2 Fourier Series
Return to the Part 3 Integral Transformations
Return to the Part 4 Parabolic PDEs
Return to the Part 5 Hyperbolic PDEs
Return to the Part 6 Elliptic PDEs
Return to the Part 6P Potential Theory
Return to the Part 7 Numerical Methods