Conversion of High Time Order PDE to First Order
Description
Examples
As mentioned on the pdsolve/numeric page, before numerical solution of time based PDE systems containing higher than first order derivatives, the system is converted to an equivalent first order system for solution.
The standard method of doing this is to introduce new variables that take the place of the derivatives that are higher than first order in time, and by defining these new variables through equations that are first order in time.
The primary reason for this page is to explain that though this approach is straightforward to automate, it is not always the best solution. Other solutions, however, require reformulation of the input PDE or system, including any initial or boundary conditions, so often this is best done manually. See the second example below.
From the examples below, it appears as though the choice of lowering the maximal differential order in x is the best strategy for the first case, while lowering the error introduced in the boundary conditions is the best strategy for the second case.
This behavior can vary based on any aspect of the problem, the PDE, the initial conditions, or the boundary conditions.
In addition, in some cases the lowering of the differential order may be difficult due to mixed derivative terms or difficult boundary and initial conditions.
The PDE
diff⁡u⁡x,t,t,t=diff⁡u⁡x,t,x,x+diff⁡u⁡x,t,x,t
∂2∂t2u⁡x,t=∂2∂x2u⁡x,t+∂2∂t∂xu⁡x,t
is converted to first order by introducing a new variable v⁡x,t which is defined by
v⁡x,t=diff⁡u⁡x,t,t
v⁡x,t=∂∂tu⁡x,t
Use of this new variable in the input system results in the first order system:
diff⁡u⁡x,t,t=v⁡x,t,diff⁡v⁡x,t,t=diff⁡u⁡x,t,x,x+diff⁡v⁡x,t,x
∂∂tu⁡x,t=v⁡x,t,∂∂tv⁡x,t=∂2∂x2u⁡x,t+∂∂xv⁡x,t
As a further example, for a PDE containing a fourth time derivative of a dependent variable, three new variables need to be introduced to bring the system to first order.
Consider the following PDE, initial conditions, and boundary conditions (the linear biharmonic equation for a bar with rigidly fixed ends):
PDE≔diff⁡u⁡x,t,t,t=−110⁢diff⁡u⁡x,t,x,x,x,x
PDE≔∂2∂t2u⁡x,t=−∂4∂x4u⁡x,t10
Init≔u⁡x,0=uv⁡x,D2⁡u⁡x,0=0
Bdry≔u⁡0,t=0,D1⁡u⁡0,t=0,u⁡1,t=0,D1⁡u⁡1,t=0
The automatic approach reformulates this input as follows.
PDE1≔diff⁡u⁡x,t,t=v⁡x,t,diff⁡v⁡x,t,t=−110⁢diff⁡u⁡x,t,x,x,x,x
PDE1≔∂∂tu⁡x,t=v⁡x,t,∂∂tv⁡x,t=−∂4∂x4u⁡x,t10
Init1≔u⁡x,0=uv⁡x,v⁡x,0=0
Bdry1≔u⁡0,t=0,D1⁡u⁡0,t=0,u⁡1,t=0,D1⁡u⁡1,t=0
Alternatively, you can reformulate this system as follows:
PDE2≔diff⁡v⁡x,t,t=310⁢diff⁡u⁡x,t,x,diff⁡u⁡x,t,t=−13⁢diff⁡v⁡x,t,x,x,x
PDE2≔∂∂tv⁡x,t=3⁢∂∂xu⁡x,t10,∂∂tu⁡x,t=−∂3∂x3v⁡x,t3
Init2≔u⁡x,0=uv⁡x,v⁡x,0=0
Bdry2≔u⁡0,t=0,v⁡0,t=0,u⁡1,t=0,v⁡1,t=0
which may be a good choice as all boundary conditions are of the 'point'='value' form (so there will be no error introduced by discretization).
As yet another alternative:
PDE3≔diff⁡v⁡x,t,t=310⁢diff⁡u⁡x,t,x,x,diff⁡u⁡x,t,t=−13⁢diff⁡v⁡x,t,x,x
PDE3≔∂∂tv⁡x,t=3⁢∂2∂x2u⁡x,t10,∂∂tu⁡x,t=−∂2∂x2v⁡x,t3
Init3≔u⁡x,0=uv⁡x,v⁡x,0=0
Bdry3≔u⁡0,t=0,D1⁡u⁡0,t=0,u⁡1,t=0,D1⁡u⁡1,t=0
which may be a good choice because the system has the lowest possible maximal differential order in x.
Compare the error of the solutions obtained from these equivalent systems over the range t=0..5 for fixed step sizes.
Note: Use a uv⁡x for which you have an approximate solution.
apxsol≔0.504413⁢cosh⁡4.73⁢x−cos⁡4.73⁢x⁢cos⁡7.07505⁢t+0.495587⁢sin⁡4.73⁢x−sinh⁡4.73⁢x⁢cos⁡7.07505⁢t
uv⁡x≔eval⁡apxsol,t=0
uv⁡x≔0.504413⁢cosh⁡4.73⁢x−0.504413⁢cos⁡4.73⁢x+0.495587⁢sin⁡4.73⁢x−0.495587⁢sinh⁡4.73⁢x
pds1≔pdsolve⁡PDE1,Bdry1,Init1,numeric,timestep=132,spacestep=164
pds1 ≔ moduleexportplot,plot3d,animate,value,settings;...end module
pds2≔pdsolve⁡PDE2,Bdry2,Init2,numeric,timestep=132,spacestep=164
pds2 ≔ moduleexportplot,plot3d,animate,value,settings;...end module
pds3≔pdsolve⁡PDE3,Bdry3,Init3,numeric,timestep=132,spacestep=164
pds3 ≔ moduleexportplot,plot3d,animate,value,settings;...end module
pl1≔pds1:-plot⁡u⁡x,t−apxsol,color=red,t=5:pl2≔pds2:-plot⁡u⁡x,t−apxsol,color=blue,t=5:pl3≔pds3:-plot⁡u⁡x,t−apxsol,color=green,t=5:plotsdisplay⁡pl1,pl2,pl3
Now using a different approximate solution:
apxsol≔0.5000168⁢cosh⁡10.99561⁢x−cos⁡10.99561⁢x⁢cos⁡38.23301⁢t+0.5⁢sin⁡10.99561⁢x−sinh⁡10.99561⁢x⁢cos⁡38.23301⁢t
uv⁡x≔0.5000168⁢cosh⁡10.99561⁢x−0.5000168⁢cos⁡10.99561⁢x+0.5⁢sin⁡10.99561⁢x−0.5⁢sinh⁡10.99561⁢x
pds1≔pdsolve⁡PDE1,Bdry1,Init1,numeric,timestep=164,spacestep=164
pds2≔pdsolve⁡PDE2,Bdry2,Init2,numeric,timestep=164,spacestep=164
pds3≔pdsolve⁡PDE3,Bdry3,Init3,numeric,timestep=164,spacestep=164
See Also
pdsolve
pdsolve/numeric
plot
plot3d
plots[animate]
Download Help Document