These are collection of PDE problems solved analytically and animated. Most of the animations where done in Mathematica, some in Maple and Matlab.
Animations moved to This page
Animations moved to This page
Animations moved to This page
BC
Initial conditions
Where
Solution
Using Cole-Hopf, let
Substituting (2) into (3) gives
But
And
Therefore
And
Using the above in the RHS of (5) gives
Integrating both side w.r.t.
Where
Then
But from (6A), we see that
But from (6B), we see that
Which is the heat PDE. The original BC and initial conditions are now transformed to
Integrating gives
Since
(7) is now used to transform the initial conditions. When
Since from (6B),
To transform the boundary conditions,
But
Similarly, when
Which gives
Hence the heat PDE to solve is
BC
Initial conditions
The above heat PDE is now solved for
So in summary, there are two transformations needed. Going from
Let
With transformed boundary conditions
And transformed initial conditions
This heat PDE is standard and has known solution by separation of variables which is
Or, since
Where
And
The after integral has no closed form solution. Hence the solution is
But
But I do not know what
This was solved numerically in Matlab.
The equations to solve are the following on the unit square in 2D.
Using
Initial conditions,
Boundary conditions are homogeneous Neumann for
The equations to solve are the following on the unit square in 2D.
Using
Initial conditions,
Boundary conditions are homogeneous Neumann for
Heat PDE
Left side | Right side | |
|
|
|
|
triangle | No | |
|
|
|
No | |
|
|
|
No | |
|
|
|
|
|
|
| | No | |
| | | No | |
|
|
|
No | |
|
|
|
No | |
|
|
0 | |
|
|
|
|
No | |
Heat PDE
Left side | Right side | initial condition | |
|
analytical solution |
| | | | | |
(TO DO) Heat PDE for periodic conditions
For eigenvalue
ClearAll[y,x,L]; op={-y''[x] ,DirichletCondition[y[x]==0,x==0], DirichletCondition[y[x]==0,x==L]}; (*or simply*) op={-y''[x],DirichletCondition[y[x]==0,True]}; eig=DEigenvalues[op,y[x],{x,0,L},5]
FindSequenceFunction[eig,n]
For eigenfunctions
ClearAll[y,x,L]; op={-y''[x] ,DirichletCondition[y[x]==0,x==0], DirichletCondition[y[x]==0,x==L]}; eigf=Last@DEigensystem[op,y[x],{x,0,L},5]
FullSimplify[FindSequenceFunction[eigf,n]];
For eigenvalue
ClearAll[y,x,L]; op={-y''[x]+NeumannValue[0,True]}; eig=DEigenvalues[op,y[x],{x,0,L},5]
FindSequenceFunction[eig,n]
ClearAll[y,x,L]; op={-y''[x]+NeumannValue[0,True]}; eigf=Last@DEigensystem[op,y[x],{x,0,L},5]
FullSimplify[FindSequenceFunction[eigf, n]];
For eigenvalue
ClearAll[y,x,L]; op={-y''[x]+NeumannValue[0,x==0],DirichletCondition[y[x]==0,x==L]}; eig=DEigenvalues[op,y[x],{x,0,L},6] \begin{MMAinline} \[ \left\{\frac{\pi^2}{4 L^2},\frac{9 \pi^2}{4 L^2},\frac{25 \pi^2}{4 L^2}% ,\frac{49 \pi^2}{4 L^2},\frac{81 \pi^2}{4 L^2},\frac{121 \pi^2}{4 L^2}\right\} \] \begin{MMAinline} Simplify[FindSequenceFunction[eig,n]]
For eigenfunctions
eigf=Last@DEigensystem[op,y[x],{x,0,L},7]
FullSimplify[FindSequenceFunction[eigf,n]];
Eigenvalue are the same as above
ClearAll[y,x,L]; op={-y''[x]+NeumannValue[0,x==L],DirichletCondition[y[x]==0,x==0]}; eig=DEigenvalues[op,y[x],{x,0,L},6]
FindSequenceFunction[eig,n]
For eigenfunctions
eigf=Last@DEigensystem[op,y[x],{x,0,L},6]
FullSimplify[FindSequenceFunction[eigf, n]];
For eigenvalue
(*can only find them numerially*) ClearAll[y,x]; op={-y''[x]+NeumannValue[y[x],x==1],DirichletCondition[y[x]==0,x==0]}; eig=DEigenvalues[op,y[x],{x,0,1},6]//N (* {4.11586,24.1393,63.6591,122.889,201.851,300.55}*) NSolve[Tan[Sqrt[lam]]+Sqrt[lam]==0&& 0<lam<130,lam] (*{{lam->4.11586},{lam->24.1393},{lam->63.6591},{lam->122.889}}*)
For eigenfunctions
ClearAll[y,x]; op={-y''[x]+NeumannValue[y[x],x==1],DirichletCondition[y[x]==0,x==0]}; eig=Last@DEigensystem[op,y[x],{x,0,1},6]//N
For eigenvalue
(*can only find them numerially. Notice the sign difference now. *) ClearAll[y,x]; op={-y''[x]+NeumannValue[-y[x],x==0],DirichletCondition[y[x]==0,x==1]}; eig=DEigenvalues[op,y[x],{x,0,1},6]//N (* {0.,20.1908,59.6814,118.914,197.924,296.774}*) NSolve[Tan[Sqrt[lam]]-Sqrt[lam]==0&& 0<=lam<130,lam] (*{{lam->0.},{lam->20.1907},{lam->59.6795},{lam->118.9},{lam->197.858}% ,{lam->296.554}}*)
For eigenfunctions, mathematica only gives plots, so not shown.
For eigenvalue
ClearAll[y,x,L]; op={-y''[x],DirichletCondition[y[x]==0,x==-L],DirichletCondition[y[x]==0,x==L]}% ; eig=DEigenvalues[op,y[x],{x,-L,L},6]
Simplify[FindSequenceFunction[eig,n]]
For eigenfunctions
eigf= Last@DEigensystem[op,y[x],{x,-L,L},6]
FullSimplify[FindSequenceFunction[eigf,n]]; Assuming[Element[n,Integers]&&Element[L,Reals],FullSimplify[