General solution option for PDEs and new methods for solving PDEs with Boundary Conditions
New options in pdsolve for users to ask for a general solution to PDEs and to know whether a solution from pdsolve is general. Also, many more partial differential equations with boundary condition (PDE and BC) problems can now be solved.
New userinfo and generalsolution option in pdsolve
PDE&BC in semi-infinite domains for which a bounded solution is sought can now also be solved via Laplace transforms
More PDE&BC problems in bounded spatial domains can now be solved via eigenfunction (Fourier) expansions
Another method for linear PDE&BC with spatial initial conditions
More PDE&BC problems solved via first finding the PDE's general solution.
More PDE&BC problems are now solved by using a Fourier transform.
PDE&BC problems that used to require the option HINT = `+` to be solved are now solved automatically
For a PDE of order N in 1 unknown depending on M independent variables, a general solution involves N arbitrary functions of M-1 arguments. Using differential algebra techniques, we have extended pdsolve's capabilities to identify a general solution for DE systems, even when the system involves ODEs and PDEs, algebraic equations, inequations, and/or mathematical functions.
The examples below show the new generalsolution option, as well as a new userinfo that displays whether a solution that is returned is or is not a general solution. The examples are all of differential equation systems but the same userinfo and generalsolution option work as well in the case of a single PDE.
Example 1.
Solve the determining PDE system for the infinitesimals of the symmetry generator of example 11 from Kamke's book. Tell whether the solution computed is a general solution.
restart: infolevelpdsolve ≔ 3
infolevelpdsolve≔3
The PDE system satisfied by the symmetries of Kamke's ODE example number 11 is
sys__1≔∂2∂y2ξ⁡x,y=0,∂2∂y2η⁡x,y−2⁢∂2∂y∂xξ⁡x,y=0,3⁢xr⁢yn⁢∂∂yξ⁡x,y⁢a+2⁢∂2∂y∂xη⁡x,y−∂2∂x2ξ⁡x,y=0,2⁢∂∂xξ⁡x,y⁢xr⁢yn⁢a−xr⁢yn⁢∂∂yη⁡x,y⁢a+η⁡x,y⁢a⁢xr⁢yn⁢ny+ξ⁡x,y⁢a⁢xr⁢r⁢ynx+∂2∂x2η⁡x,y=0:
This is a second order linear PDE system, with two unknowns η⁡x,y,ξ⁡x,y and four equations. Its general solution is given by the following, where we now can tell that the solution is a general one by reading the last line of the userinfo. Note that because the system is overdetermined, a general solution in this case does not involve any arbitrary function
sol__1≔pdsolvesys__1
-> Solving ordering for the dependent variables of the PDE system: [xi(x,y), eta(x,y)] -> Solving ordering for the independent variables (can be changed using the ivars option): [x, y] tackling triangularized subsystem with respect to xi(x,y) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to eta(x,y) <- Returning a *general* solution
sol__1≔η⁡x,y=−_C1⁢y⁢r+2n−1,ξ⁡x,y=_C1⁢x
Next we indicate to pdsolve that n and r are parameters of the problem, and that we want a solution for n≠1, making more difficult to identify by eye whether the solution returned is a general one. Again the last line of the userinfo indicates that pdsolve's solution is indeed a general one
sys__1.1 ≔ op⁡sys__1,n≠1
sys__1.1≔∂2∂y2ξ⁡x,y=0,∂2∂y2η⁡x,y−2⁢∂2∂x∂yξ⁡x,y=0,3⁢xr⁢yn⁢∂∂yξ⁡x,y⁢a+2⁢∂2∂x∂yη⁡x,y−∂2∂x2ξ⁡x,y=0,2⁢∂∂xξ⁡x,y⁢xr⁢yn⁢a−xr⁢yn⁢∂∂yη⁡x,y⁢a+η⁡x,y⁢a⁢xr⁢yn⁢ny+ξ⁡x,y⁢a⁢xr⁢r⁢ynx+∂2∂x2η⁡x,y=0,n≠1
sol__1.1≔pdsolvesys__1.1,parameters=n,r
-> Solving ordering for the dependent variables of the PDE system: [r, n, xi(x,y), eta(x,y)] -> Solving ordering for the independent variables (can be changed using the ivars option): [x, y] tackling triangularized subsystem with respect to r tackling triangularized subsystem with respect to n tackling triangularized subsystem with respect to xi(x,y) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to eta(x,y) tackling triangularized subsystem with respect to r tackling triangularized subsystem with respect to n tackling triangularized subsystem with respect to xi(x,y) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to eta(x,y) tackling triangularized subsystem with respect to r tackling triangularized subsystem with respect to n tackling triangularized subsystem with respect to xi(x,y) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to eta(x,y) tackling triangularized subsystem with respect to n tackling triangularized subsystem with respect to xi(x,y) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to eta(x,y) tackling triangularized subsystem with respect to n tackling triangularized subsystem with respect to xi(x,y) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to eta(x,y) tackling triangularized subsystem with respect to xi(x,y) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to eta(x,y) <- Returning a *general* solution
sol__1.1≔n=2,r=−5,η⁡x,y=y⁢_C1⁢x+3⁢_C2,ξ⁡x,y=x⁢_C1⁢x+_C2,n=2,r=−207,η⁡x,y=−2⁢−6⁢x2⁢_C2−98⁢x87⁢_C2⁢a⁢y−147⁢_C1⁢a⁢x⁢y343⁢x⁢a,ξ⁡x,y=_C1⁢x+_C2⁢x87,n=2,r=−157,η⁡x,y=−−49⁢_C1⁢a⁢x⁢y−147⁢x67⁢_C2⁢a⁢y+12⁢_C2⁢x343⁢x⁢a,ξ⁡x,y=_C1⁢x+_C2⁢x67,n=2,r=r,η⁡x,y=−_C1⁢y⁢r+2,ξ⁡x,y=_C1⁢x,n=−r−3,r=r,η⁡x,y=y⁢4⁢_C1⁢x+2⁢_C2+_C1⁢x+_C2⁢rr+4,ξ⁡x,y=x⁢_C1⁢x+_C2,n=n,r=r,η⁡x,y=−_C1⁢y⁢r+2n−1,ξ⁡x,y=_C1⁢x
map⁡pdetest,sol__1.1,sys__1.1
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Example 2.
Compute the solution of the following (linear) overdetermined system involving two PDEs, three unknown functions, one of which depends on 2 variables and the other two depend on only 1 variable.
sys__2≔−∂2∂r2F⁡r,s+∂2∂s2F⁡r,s+ⅆⅆrH⁡r+ⅆⅆsG⁡s+s=0,∂2∂r2F⁡r,s+2⁢∂2∂r∂sF⁡r,s+∂2∂s2F⁡r,s−ⅆⅆrH⁡r+ⅆⅆsG⁡s−r=0:
The solution for the unknowns G, H, is given by the following expression, where again determining whether this solution, that depends on 3 arbitrary functions, _F1s, _F2r, _F3s−r, is or is not a general solution, is non-obvious.
sol__2≔pdsolvesys__2
-> Solving ordering for the dependent variables of the PDE system: [F(r,s), H(r), G(s)] -> Solving ordering for the independent variables (can be changed using the ivars option): [r, s] tackling triangularized subsystem with respect to F(r,s) First set of solution methods (general or quasi general solution) Trying differential factorization for linear PDEs ... differential factorization successful. First set of solution methods successful tackling triangularized subsystem with respect to H(r) tackling triangularized subsystem with respect to G(s) <- Returning a *general* solution
sol__2≔F⁡r,s=_F1⁡s+_F2⁡r+_F3⁡s−r−r2⁢r−3⁢s12,G⁡s=−s24−ⅆⅆs_F1⁡s+_C2,H⁡r=−r24+ⅆⅆr_F2⁡r+_C1
pdetest⁡sol__2, sys__2
0,0
Example 3.
Compute the solution of the following nonlinear system, consisting of Burgers' equation and a possible potential.
sys__3≔∂∂tu⁡x,t+2⁢u⁡x,t⁢∂∂xu⁡x,t−∂2∂x2u⁡x,t=0,∂∂tvx,t=−v⁡x,t⁢∂∂xu⁡x,t+v⁡x,t⁢u⁡x,t2,∂∂xvx,t=−u⁡x,t⁢v⁡x,t:
We see that in this case the solution returned is not a general solution but two particular ones; again the information is in the last line of the userinfo displayed
sol__3≔pdsolvesys__3,u,v
-> Solving ordering for the dependent variables of the PDE system: [v(x,t), u(x,t)] -> Solving ordering for the independent variables (can be changed using the ivars option): [x, t] tackling triangularized subsystem with respect to v(x,t) tackling triangularized subsystem with respect to u(x,t) First set of solution methods (general or quasi general solution) Second set of solution methods (complete solutions) Trying methods for second order PDEs Third set of solution methods (simple HINTs for separating variables) PDE linear in highest derivatives - trying a separation of variables by * HINT = * Fourth set of solution methods Trying methods for second order linear PDEs Preparing a solution HINT ... Trying HINT = _F1(x)*_F2(t) Fourth set of solution methods Preparing a solution HINT ... Trying HINT = _F1(x)+_F2(t) Trying travelling wave solutions as power series in tanh ... * Using tau = tanh(t*C[2]+x*C[1]+C[0]) * Equivalent ODE system: {C[1]^2*(tau^2-1)^2*diff(diff(u(tau),tau),tau)+(2*C[1]^2*(tau^2-1)*tau+C[2]*(tau^2-1)+2*u(tau)*C[1]*(tau^2-1))*diff(u(tau),tau)} * Ordering for functions: [u(tau)] * Cases for the upper bounds: [[n[1] = 1]] * Power series solution [1]: {u(tau) = tau*A[1,1]+A[1,0]} * Solution [1] for {A[i, j], C[k]}: [[A[1,1] = 0], [A[1,0] = -1/2*C[2]/C[1], A[1,1] = -C[1]]] travelling wave solutions successful. tackling triangularized subsystem with respect to v(x,t) First set of solution methods (general or quasi general solution) Trying differential factorization for linear PDEs ... Trying methods for PDEs "missing the dependent variable" ... Second set of solution methods (complete solutions) Trying methods for second order PDEs Third set of solution methods (simple HINTs for separating variables) PDE linear in highest derivatives - trying a separation of variables by * HINT = * Fourth set of solution methods Trying methods for second order linear PDEs Preparing a solution HINT ... Trying HINT = _F1(x)*_F2(t) Third set of solution methods successful tackling triangularized subsystem with respect to u(x,t) <- Returning a solution that *is not the most general one*
sol__3≔u⁡x,t=−_C2⁢tanh⁡_C2⁢x+_C3⁢t+_C1−_C32⁢_C2,v⁡x,t=0,u⁡x,t=−_c1⁢ⅇ_c1⁢x2⁢_C1−_C2ⅇ_c1⁢x2⁢_C1+_C2,v⁡x,t=_C3⁢ⅇ_c1⁢t⁢_C1⁢ⅇ_c1⁢x+_C3⁢ⅇ_c1⁢t⁢_C2ⅇ_c1⁢x
mappdetest, sol__3,sys__3
0,0,0,0,0,0
This example is also good for illustrating the other related new feature: one can now request to pdsolve to only compute a general solution (it will return NULL if it cannot achieve that). Turn OFF userinfos and try with this example
infolevelpdsolve ≔ 1:
This returns NULL:
pdsolve⁡sys__3,u,v,generalsolution
Example 4.
Another where the solution returned is particular, this time for a linear system, conformed by 38 PDEs, also from differential equation symmetry analysis
sys__4≔∂∂uξ1⁡x,y,z,t,u=0,∂∂xξ1⁡x,y,z,t,u−∂∂yξ2⁡x,y,z,t,u=0,∂∂uξ2⁡x,y,z,t,u=0,−∂∂yξ1⁡x,y,z,t,u−∂∂xξ2⁡x,y,z,t,u=0,∂∂uξ3⁡x,y,z,t,u=0,∂∂xξ1⁡x,y,z,t,u−∂∂zξ3⁡x,y,z,t,u=0,−∂∂yξ3⁡x,y,z,t,u−∂∂zξ2⁡x,y,z,t,u=0,−∂∂zξ1⁡x,y,z,t,u−∂∂xξ3⁡x,y,z,t,u=0,∂∂uξ4⁡x,y,z,t,u=0,∂∂tξ3⁡x,y,z,t,u−∂∂zξ4⁡x,y,z,t,u=0,∂∂tξ2⁡x,y,z,t,u−∂∂yξ4⁡x,y,z,t,u=0,∂∂tξ1⁡x,y,z,t,u−∂∂xξ4⁡x,y,z,t,u=0,−∂∂xξ1⁡x,y,z,t,u+∂∂tξ4⁡x,y,z,t,u=0,∂2∂y2η1⁡x,y,z,t,u+∂2∂z2η1⁡x,y,z,t,u−∂2∂t2η1⁡x,y,z,t,u+∂2∂x2η1⁡x,y,z,t,u=0,∂2∂u2η1⁡x,y,z,t,u=0,∂2∂u∂xη1⁡x,y,z,t,u+∂2∂x2ξ1⁡x,y,z,t,u=0,∂2∂x∂yξ1⁡x,y,z,t,u+∂2∂u∂yη1⁡x,y,z,t,u=0,−∂2∂y2ξ1⁡x,y,z,t,u+∂2∂u∂xη1⁡x,y,z,t,u=0,∂2∂x∂zξ1⁡x,y,z,t,u+∂2∂u∂zη1⁡x,y,z,t,u=0,∂2∂y∂zξ1⁡x,y,z,t,u=0,−∂2∂z2ξ1⁡x,y,z,t,u+∂2∂u∂xη1⁡x,y,z,t,u=0,−∂2∂t∂uη1⁡x,y,z,t,u−∂2∂t∂xξ1⁡x,y,z,t,u=0,∂2∂t∂yξ1⁡x,y,z,t,u=0,∂2∂t∂zξ1⁡x,y,z,t,u=0,∂2∂t2ξ1⁡x,y,z,t,u+∂2∂u∂xη1⁡x,y,z,t,u=0,−∂2∂z2ξ2⁡x,y,z,t,u+∂2∂u∂yη1⁡x,y,z,t,u=0,∂2∂t∂zξ2⁡x,y,z,t,u=0,∂2∂t2ξ2⁡x,y,z,t,u+∂2∂u∂yη1⁡x,y,z,t,u=0,∂2∂t2ξ3⁡x,y,z,t,u+∂2∂u∂zη1⁡x,y,z,t,u=0,∂3∂u∂x2η1⁡x,y,z,t,u=0,∂3∂u∂x∂yη1⁡x,y,z,t,u=0,∂3∂u∂y2η1⁡x,y,z,t,u=0,∂3∂u∂x∂zη1⁡x,y,z,t,u=0,∂3∂u∂y∂zη1⁡x,y,z,t,u=0,∂3∂u∂z2η1⁡x,y,z,t,u=0,∂3∂t∂u∂xη1⁡x,y,z,t,u=0,∂3∂t∂u∂yη1⁡x,y,z,t,u=0,∂3∂t∂u∂zη1⁡x,y,z,t,u=0:
There are 38 coupled equations
nops⁡sys__4
38
When requesting a general solution pdsolve returns NULL:
pdsolvesys__4,generalsolution
A solution that is not a general one, is however computed by default if calling pdsolve without the generalsolution option. In this case again the last line of the userinfo indicates that the solution returned is not a general solution
infolevelpdsolve ≔ 3
sol__4≔pdsolvesys__4
-> Solving ordering for the dependent variables of the PDE system: [eta[1](x,y,z,t,u), xi[1](x,y,z,t,u), xi[2](x,y,z,t,u), xi[3](x,y,z,t,u), xi[4](x,y,z,t,u)] -> Solving ordering for the independent variables (can be changed using the ivars option): [t, x, y, z, u] tackling triangularized subsystem with respect to eta[1](x,y,z,t,u) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful -> Solving ordering for the dependent variables of the PDE system: [_F1(x,y,z,t), _F2(x,y,z,t)] -> Solving ordering for the independent variables (can be changed using the ivars option): [t, x, y, z, u] tackling triangularized subsystem with respect to _F1(x,y,z,t) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful -> Solving ordering for the dependent variables of the PDE system: [_F3(x,y,z), _F4(x,y,z)] -> Solving ordering for the independent variables (can be changed using the ivars option): [x, y, z, t] tackling triangularized subsystem with respect to _F3(x,y,z) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to _F4(x,y,z) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful -> Solving ordering for the dependent variables of the PDE system: [_F5(y,z), _F6(y,z)] -> Solving ordering for the independent variables (can be changed using the ivars option): [y, z, x] tackling triangularized subsystem with respect to _F5(y,z) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to _F6(y,z) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful -> Solving ordering for the dependent variables of the PDE system: [_F7(z), _F8(z)] -> Solving ordering for the independent variables (can be changed using the ivars option): [z, y] tackling triangularized subsystem with respect to _F7(z) tackling triangularized subsystem with respect to _F8(z) tackling triangularized subsystem with respect to _F2(x,y,z,t) First set of solution methods (general or quasi general solution) Trying differential factorization for linear PDEs ... Trying methods for PDEs "missing the dependent variable" ... Second set of solution methods (complete solutions) Third set of solution methods (simple HINTs for separating variables) PDE linear in highest derivatives - trying a separation of variables by * HINT = * Fourth set of solution methods Preparing a solution HINT ... Trying HINT = _F3(x)*_F4(y)*_F5(z)*_F6(t) Third set of solution methods successful
tackling triangularized subsystem with respect to xi[1](x,y,z,t,u) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful -> Solving ordering for the dependent variables of the PDE system: [_F1(x,z,t), _F2(x,z,t)] -> Solving ordering for the independent variables (can be changed using the ivars option): [t, x, z, y] tackling triangularized subsystem with respect to _F1(x,z,t) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to _F2(x,z,t) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful -> Solving ordering for the dependent variables of the PDE system: [_F3(x,t), _F4(x,t)] -> Solving ordering for the independent variables (can be changed using the ivars option): [t, x, z] tackling triangularized subsystem with respect to _F3(x,t) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to _F4(x,t) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful -> Solving ordering for the dependent variables of the PDE system: [_F5(x), _F6(x)] -> Solving ordering for the independent variables (can be changed using the ivars option): [x, t] tackling triangularized subsystem with respect to _F5(x) tackling triangularized subsystem with respect to _F6(x) tackling triangularized subsystem with respect to xi[2](x,y,z,t,u) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative.
First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful -> Solving ordering for the dependent variables of the PDE system: [_F1(t), _F2(t)] -> Solving ordering for the independent variables (can be changed using the ivars option): [t, z] tackling triangularized subsystem with respect to _F1(t) tackling triangularized subsystem with respect to _F2(t) tackling triangularized subsystem with respect to xi[3](x,y,z,t,u) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful tackling triangularized subsystem with respect to xi[4](x,y,z,t,u) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. First set of solution methods successful <- Returning a solution that *is not the most general one*
sol__4≔η1⁡x,y,z,t,u=_C13⁢_C10⁢ⅇ_c3⁢z2+_C11⁢_C8⁢ⅇ_c2⁢y2+_C9⁢_C6⁢ⅇ_c1⁢x2+_C7⁢cos⁡−_c1−_c2−_c3⁢t+_C12⁢_C10⁢ⅇ_c3⁢z2+_C11⁢_C8⁢ⅇ_c2⁢y2+_C9⁢_C6⁢ⅇ_c1⁢x2+_C7⁢sin⁡−_c1−_c2−_c3⁢t+u⁢ⅇ_c1⁢x⁢ⅇ_c2⁢y⁢ⅇ_c3⁢z⁢_C1⁢t+_C2⁢x+_C3⁢y+_C4⁢z+_C5ⅇ_c1⁢x⁢ⅇ_c2⁢y⁢ⅇ_c3⁢z,ξ1⁡x,y,z,t,u=−x2⁢_C22+−2⁢_C1⁢t−2⁢_C3⁢y−2⁢_C4⁢z+2⁢_C17⁢x2+−t2+y2+z2⁢_C22+_C16⁢t+_C15⁢z+_C14⁢y+_C18,ξ2⁡x,y,z,t,u=−_C3⁢y22+−2⁢_C1⁢t−2⁢_C2⁢x−2⁢_C4⁢z+2⁢_C17⁢y2+−t2+x2+z2⁢_C32+_C20⁢t+_C19⁢z−_C14⁢x+_C21,ξ3⁡x,y,z,t,u=−_C4⁢z22+−2⁢_C1⁢t−2⁢_C2⁢x−2⁢_C3⁢y+2⁢_C17⁢z2+−t2+x2+y2⁢_C42+_C22⁢t−_C19⁢y−_C15⁢x+_C23,ξ4⁡x,y,z,t,u=−_C1⁢t22+−2⁢_C2⁢x−2⁢_C3⁢y−2⁢_C4⁢z+2⁢_C17⁢t2+−x2−y2−z2⁢_C12+_C20⁢y+_C22⁢z+_C16⁢x+_C24
pdetest⁡sol__4,sys__4
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
Example 5.
Finally, the new userinfos also indicates whether a solution is a general solution when working with PDEs that involve anticommutative variables set using the Physics package
with⁡Physics,Setup
Setup
Set first θ and Q as suffixes for variables of type/anticommutative (see Setup)
Setup⁡anticommutativepre=Q,θ
* Partial match of 'anticommutativepre' against keyword 'anticommutativeprefix'
anticommutativeprefix=Q,_λ,θ
A PDE system example with two unknown anticommutative functions of four variables, two commutative and two anticommutative; to avoid redundant typing in the input that follows and redundant display of information on the screen let's use PDEtools:-diff_table and PDEtools:-declare
PDEtools:-declare⁡Q⁡x,y,θ1,θ2
Q⁡x,y,θ1,θ2⁢will now be displayed as⁢Q
q≔PDEtools:-diff_table⁡Q⁡x,y,θ1,θ2
q≔table⁡symmetric,Physics/diff,=Q
Consider the system formed by these two PDEs (because of the q diff_table just defined, we can enter derivatives directly using the function's name indexed by the differentiation variables)
pde1≔qx,y,θ1+qx,y,θ2−qy,θ1,θ2=0
pde1≔Qx,y,θ1+Qx,y,θ2−Qy,θ1,θ2=0
pde2≔qθ1=0
pde2≔Qθ1=0
The solution returned for this system is indeed a general solution
pdsolve⁡pde1,pde2
-> Solving ordering for the dependent variables of the PDE system: [_F4(x,y), _F2(x,y), _F3(x,y)] -> Solving ordering for the independent variables (can be changed using the ivars option): [x, y] tackling triangularized subsystem with respect to _F4(x,y) tackling triangularized subsystem with respect to _F2(x,y) tackling triangularized subsystem with respect to _F3(x,y) First set of solution methods (general or quasi general solution) Trying simple case of a single derivative. HINT = _F6(x)+_F5(y) Trying HINT = _F6(x)+_F5(y) HINT is successful First set of solution methods successful <- Returning a *general* solution
Q=_F1⁡x,y⁢_λ1+_F6⁡x+_F5⁡y⁢θ2
This solution involves an anticommutative constant _λ2, analogous to the commutative constants _Cn where n is an integer.
Maple is now able to solve more PDE&BC problems via Laplace transforms.
Laplace transforms act to change derivatives with respect to one of the independent variables of the domain into multiplication operations in the transformed domain. After applying a Laplace transform to the original problem, we can simplify the problem using the transformed BC, then solve the problem in the transformed domain, and finally apply the inverse Laplace transform to arrive at the final solution. It is important to remember to give pdsolve any necessary restrictions on the variables and constants of the problem, by means of the "assuming" command.
A new feature is that we can now tell pdsolve that the dependent variable is bounded, by means of the optional argument HINT = boundedseries.
restart:
To display special functions using textbook notation, use extended typesetting and enable the typesetting of mathematical functions
interfacetypesetting = extended: Typesetting:-EnableTypesetRuleTypesetting:-SpecialFunctionRules:
Consider the problem of a falling cable lying on a table that is suddenly removed (cf. David J. Logan's Applied Partial Differential Equations p.115).
pde1≔∂2∂t2u⁡x,t=c2⁢∂2∂x2u⁡x,t−g: iv1≔ux,0=0,u0,t=0,D2ux,0=0:
If we ask pdsolve to solve this problem without the condition of boundedness of the solution, we obtain:
pdsolvepde1,iv1assuming0<t,0<x,0<c
u⁡x,t=g⁢c⁢t−x2⁢θ⁡c⁢t−xc−c2⁢g⁢t2−2⁢invlaplace⁡ⅇs⁢xc⁢_F1⁡s,s,t+2⁢invlaplace⁡ⅇ−s⁢xc⁢_F1⁡s,s,t2⁢c2
If we now ask for a bounded solution, by means of the option HINT = boundedseries, pdsolve simplifies the problem accordingly.
ans1≔pdsolve⁡pde1,iv1,HINT=boundedseriesassuming0<t,0<x,0<c
ans1≔u⁡x,t=g⁢θ⁡t−xc⁢c⁢t−x2−c2⁢t22⁢c2
And we can check this answer against the original problem, if desired:
pdetest⁡ans1,pde1,iv1assuming0<t,0<x,0<c
0,0,0,0
How it works, step by step
Let us see the process this problem is solved by pdsolve, step by step.
First, the Laplace transform is applied to the PDE:
withinttrans:
transformed_PDE≔laplace⁡lhs−rhspde1,t,s
transformed_PDE≔s2⁢laplace⁡u⁡x,t,t,s−D2⁡u⁡x,0−s⁢u⁡x,0−c2⁢ⅆ2ⅆx2laplace⁡u⁡x,t,t,s+gs
and the result is simplified using the initial conditions:
simplified_transformed_PDE≔evaltransformed_PDE,iv1
simplified_transformed_PDE≔s2⁢laplace⁡u⁡x,t,t,s−c2⁢ⅆ2ⅆx2laplace⁡u⁡x,t,t,s+gs
Next, we call the function "laplace(u(x,t),t,s)" by the new name U:
eq_U≔subs⁡laplaceux,t,t,s=Ux,s,simplified_transformed_PDE
eq_U≔s2⁢U⁡x,s−c2⁢∂2∂x2U⁡x,s+gs
And this equation, which is really an ODE, is solved:
solution_U≔dsolve⁡eq_U,Ux,s
solution_U≔U⁡x,s=ⅇ−s⁢xc⁢_F2⁡s+ⅇs⁢xc⁢_F1⁡s−gs3
Now, since we want a BOUNDED solution, the term with the positive exponential must be zero, and we are left with:
bounded_solution_U≔subs⁡coeff⁡rhs⁡solution_U,ⅇs⋅xc=0,solution_U
bounded_solution_U≔U⁡x,s=ⅇ−s⁢xc⁢_F2⁡s−gs3
Now, the initial solution must also be satisfied. Here it is, in the transformed domain:
Laplace_BC≔laplace⁡u0,t,t,s=0
Laplace_BC≔laplace⁡u⁡0,t,t,s=0
Or, in the new variable U,
Laplace_BC_U≔U0,s=0
Laplace_BC_U≔U⁡0,s=0
And by applying it to bounded_solution_U, we find the relationship
simplifysubs⁡x=0,rhs⁡bounded_solution_U=0
_F2⁡s⁢s3−gs3=0
isolate⁡,indets,unknown1
_F2⁡s=gs3
so that our solution now becomes
bounded_solution_U≔subs⁡,bounded_solution_U
bounded_solution_U≔U⁡x,s=ⅇ−s⁢xc⁢gs3−gs3
to which we now apply the inverse Laplace transform to obtain the solution to the problem:
u⁡x,t=invlaplace⁡rhsbounded_solution_U,s,tassuming0<x,0<t,0<c
u⁡x,t=g⁢−t2+θ⁡t−xc⁢c⁢t−x2c22
Four other related examples
A few other examples:
pde2≔∂2∂t2ux,t=c2⁢∂2∂x2u⁡x,t:iv2≔u⁡x,0=0,u⁡0,t=g⁡t,D2⁡u⁡x,0=0:
ans2≔pdsolve⁡pde2,iv2,HINT=boundedseriesassuming0<t,0<x,0<c
ans2≔u⁡x,t=θ⁡t−xc⁢g⁡c⁢t−xc
pdetest⁡ans2,pde2,iv2assuming0<t,0<x,0<c
pde3≔∂∂tux,t=k⁢∂2∂x2u⁡x,t:iv3≔u⁡x,0=0,u⁡0,t=1:
ans3≔pdsolvepde3,iv3,HINT=boundedseriesassuming 0<t,0<x,0<k;
ans3≔u⁡x,t=1−erf⁡x2⁢t⁢k
pdetest⁡ans3,pde3,iv32
pde4≔∂∂tux,t=k⁢∂2∂x2u⁡x,t:iv4≔u⁡x,0=μ,u0,t=λ:
ans4≔pdsolve⁡pde4,iv4,HINT=boundedseriesassuming0<t,0<x,0<k
ans4≔u⁡x,t=−λ+μ⁢erf⁡x2⁢t⁢k+λ
pdetest⁡ans4,pde4,iv42
The following is an example from David J. Logan's Applied Partial Differential Equations p.76:
pde5≔∂∂tux,t=∂2∂x2ux,t:iv5≔u⁡x,0=0,u⁡0,t=f⁡t:
ans5≔pdsolve⁡pde5,iv5,HINT=boundedseriesassuming0<t,0<x
ans5≔u⁡x,t=x⁢∫0tf⁡_U1⁢ⅇ−x24⁢t−4⁢_U1t−_U132ⅆ_U12⁢π
The code for solving PDE&BC problems in bounded spatial domains has been expanded. The method works by separating the variables by product, so that the problem is transformed into an ODE system (with initial and/or boundary conditions), and for one of the variables it is a Sturm-Liouville problem (a type of eigenvalue problem) which has infinitely many solutions - hence the infinite series representation of the solutions.
Here is a simple example for the heat equation:
pde__6 ≔ ∂∂tux,t=k⁢∂2∂x2u⁡x,t:iv__6 ≔ u0,t=0,ul,t=0:
ans__6≔pdsolvepde__6,iv__6assuming 0<l;
ans__6≔u⁡x,t=∑n=1∞⁡_C1⁡n⁢sin⁡n⁢π⁢xl⁢ⅇ−k⁢π2⁢n2⁢tl2
pdetest ans__6, pde__6, iv__6;
0,0,0
Now, consider the displacements of a string governed by the wave equation, where c is a constant (cf. Logan p.28).
pde__7≔∂2∂t2ux,t=c2⁢∂2∂x2u⁡x,t:iv__7≔u⁡0,t=0,ul,t=0:
ans__7≔pdsolvepde__7,iv__7assuming 0<l;
ans__7≔u⁡x,t=∑n=1∞⁡sin⁡n⁢π⁢xl⁢_C1⁡n⁢sin⁡c⁢n⁢π⁢tl+_C5⁡n⁢cos⁡c⁢n⁢π⁢tl
pdetestans__7, pde__7, iv__7;
Another wave equation problem (cf. Logan p.130):
pde__8≔∂2∂t2ux,t−c2⁢∂2∂x2u⁡x,t=0:iv__8≔u⁡0,t=0,D2⁡u⁡x,0=0,D1⁡u⁡l,t=0,ux,0=fx:
ans__8≔pdsolvepde__8,iv__8,u⁡x,tassuming 0≤x,x≤l;
ans__8≔u⁡x,t=∑n=1∞⁡2⁢∫0lf⁡x⁢sin⁡π⁢1+2⁢n⁢x2⁢lⅆx⁢sin⁡π⁢1+2⁢n⁢x2⁢l⁢cos⁡c⁢π⁢1+2⁢n⁢t2⁢ll
pdetestans__8, pde__8, iv__81..3;
Here is a problem with periodic boundary conditions (cf. Logan p.131). The function ux,t stands for the concentration of a chemical dissolved in water within a tubular ring of circumference 2 l. The initial concentration is given by fx, and the variable x is the arc-length parameter that varies from 0 to 2 l.
pde__9≔∂∂tux,t=M⁢∂2∂x2u⁡x,t:iv__9≔u⁡0,t=u⁡2⁢l,t,D1⁡u⁡0,t=D1⁡u⁡2⁢l,t,ux,0=fx:
ans__9≔pdsolvepde__9,iv__9,u⁡x,tassuming 0≤x,x≤2⁢l;
ans__9≔u⁡x,t=2⁢∑n=1∞⁡∫02⁢lf⁡x⁢cos⁡n⁢π⁢xlⅆx⁢cos⁡n⁢π⁢xl+∫02⁢lf⁡x⁢sin⁡n⁢π⁢xlⅆx⁢sin⁡n⁢π⁢xl⁢ⅇ−M⁢π2⁢n2⁢tl2l⁢l+∫02⁢lf⁡xⅆx2⁢l
pdetestans__9, pde__9;
0
The following problem is for heat flow with both boundaries insulated (cf. Logan p.166, 3rd edition)
pde__10≔∂∂tux,t=k⁢∂2∂x2u⁡x,t:iv__10≔D1⁡u⁡0,t=0,D1⁡u⁡l,t=0,ux,0=fx:
ans__10≔pdsolve⁡pde__10,iv__10,u⁡x,tassuming0≤x,x≤l;
ans__10≔u⁡x,t=∑n=1∞⁡2⁢∫0lf⁡x⁢cos⁡n⁢π⁢xlⅆx⁢cos⁡n⁢π⁢xl⁢ⅇ−k⁢π2⁢n2⁢tl2l⁢l+∫0lf⁡xⅆxl
pdetestans__10,pde__10, iv__101..2;
This is a problem in a bounded domain with the presence of a source. A source term represents an outside influence in the system and leads to an inhomogeneous PDE (cf. Logan p.149):
pde__11≔∂2∂t2u⁡x,t−c2⁢∂2∂x2u⁡x,t=px,t:iv__11≔u0,t=0,uπ,t=0,ux,0=0,D2ux,0=0:
ans__11 ≔ pdsolvepde__11, iv__11, ux,t;
ans__11≔u⁡x,t=∫0t∑n=1∞⁡2⁢∫0πp⁡x,τ1⁢sin⁡n⁢xⅆx⁢sin⁡n⁢x⁢sin⁡c⁢n⁢t−τ1π⁢n⁢cⅆτ1
Current pdetest is unable to verify that this solution cancels the pde__11 mainly because it currently fails in identifying that there is a fourier expansion in it, but its subroutines for testing the boundary conditions work well with this problem
pdetest_BC ≔ `pdetest/BC`:
pdetest_BCans__11, iv__11, ux, t;
Consider a heat absorption-radiation problem in the bounded domain 0≤x≤2, t≥0:
pde__12≔∂∂tux,t=∂2∂x2ux,t:iv__12≔ux,0=fx,D1u0,t+u0,t=0,D1u2,t+u2,t=0:
ans__12≔pdsolve⁡pde__12,iv__12,u⁡x,tassuming0≤xand x≤2,0≤t;
ans__12≔u⁡x,t=∑n=1∞⁡∫02f⁡x⁢sin⁡n⁢π⁢x2ⅆx⁢sin⁡n⁢π⁢x2+∫02f⁡x⁢cos⁡n⁢π⁢x2ⅆx⁢cos⁡n⁢π⁢x2⁢ⅇ−π2⁢n2⁢t4
pdetestans__12,pde__12;
Consider the nonhomogeneous wave equation problem (cf. Logan p.213, 3rd edition):
pde__13≔∂2∂t2ux,t=A⁢x+∂2∂x2ux,t:iv__13≔u⁡0,t=0,u⁡1,t=0,u⁡x,0=0,D2⁡ux,0=0:
ans__13 ≔ pdsolvepde__13, iv__13;
ans__13≔u⁡x,t=∫0t∑n=1∞⁡2⁢A⁢∫01x⁢sin⁡n⁢π⁢xⅆx⁢sin⁡n⁢π⁢x⁢sin⁡n⁢π⁢t−τ1n⁢πⅆτ1
pdetest_BCans__13, iv__13,ux,t;
Consider the following Schrödinger equation with zero potential energy (cf. Logan p.30):
pde__14≔I⁢h⁢∂∂tf⁡x,t=−h2⁢∂2∂x2f⁡x,t2⁢m:iv__14≔f0,t=0,fd,t=0:
ans__14≔pdsolvepde__14,iv__14assuming 0<d;
ans__14≔f⁡x,t=∑n=1∞⁡_C1⁡n⁢sin⁡n⁢π⁢xd⁢ⅇ−I2⁢h⁢π2⁢n2⁢td2⁢m
pdetestans__14,pde__14, iv__14;
This method is for problems of the form
∂∂tw=Mw, wx__i,0=fx__i
or
∂2∂t2w=Mw, wx__i,0=fx__i, ∂∂twt=0|∂∂twt=0=gx__i
where M is an arbitrary linear differential operator of any order which only depends on the spatial variables x__i.
Here are some examples:
pde__15≔∂∂t⁢wx1,x2,x3,t−∂2∂x2⁢∂x1⁢w⁡x1,x2,x3,t−∂2∂x3⁢∂x1⁢w⁡x1,x2,x3,t−∂2∂x32⁢w⁡x1,x2,x3,t+∂2∂x3⁢∂x2⁢wx1,x2,x3,t=0:iv__15≔wx1,x2,x3,0=x15⁢x2⁢x3:
pdsolvepde__15,iv__15;
w⁡x1,x2,x3,t=20⁢x2⁢x320−t20⁢x12+t⁢x2+x3⁢x14+t2⁢x13
pdetest%,pde__15,iv__15;
Here are two examples for which the derivative with respect to t is of the second order, and two initial conditions are given:
pde__16≔∂2∂t2⁢w⁡x1,x2,x3,t=∂2∂x2⁢∂x1⁢w⁡x1,x2,x3,t+∂2∂x3⁢∂x1⁢w⁡x1,x2,x3,t+∂2∂x32⁢w⁡x1,x2,x3,t−∂2∂x3⁢∂x2⁢w⁡x1,x2,x3,t:iv__16≔w⁡x1,x2,x3,0=x13⁢x22+x3,D4⁡wx1,x2,x3,0=−x2⁢x3+x1:
pdsolvepde__16,iv__16;
w⁡x1,x2,x3,t=x13⁢x22+x3−t⁢x2⁢x3+t⁢x1+3⁢t2⁢x2⁢x12+16⁢t3+12⁢t4⁢x1
pdetest%,pde__16,iv__16;
pde__17≔∂2∂t2⁢w⁡x1,x2,x3,t=∂2∂x2⁢∂x1⁢w⁡x1,x2,x3,t+∂2∂x3⁢∂x1⁢w⁡x1,x2,x3,t+∂2∂x32⁢w⁡x1,x2,x3,t−∂2∂x3⁢∂x2⁢w⁡x1,x2,x3,t:iv__17≔w⁡x1,x2,x3,0=x13⁢x32+sin⁡x1,D4⁡w⁡x1,x2,x3,0=cosx1−x2 x3:
pdsolvepde__17,iv__17;
w⁡x1,x2,x3,t=t4⁢x12+t2⁢x13+3⁢t2⁢x12⁢x3+x13⁢x32+t36−t⁢x2⁢x3+cos⁡x1⁢t+sin⁡x1
pdetest%,pde__17,iv__17;
The following are examples of PDE&BC problems for which pdsolve is successful in first calculating the PDE's general solution, and then fitting the initial or boundary condition to it.
pde__18≔∂2∂x2ux,y+∂2∂y2ux,y=0:iv__18≔u⁡0,y=sin⁡yy:
If we ask pdsolve to solve the problem, we get:
ans__18 ≔ pdsolvepde__18,iv__18;
ans__18≔u⁡x,y=sin⁡−y+I⁢x+_F2⁡y−I⁢x⁢y−I⁢x+−y+I⁢x⁢_F2⁡y+I⁢x−y+I⁢x
and we can check this answer by using pdetest:
pdetestans__18,pde__18,iv__18;
How it works, step by step:
The general solution for just the PDE is:
gensol ≔ pdsolvepde__18;
gensol≔u⁡x,y=_F1⁡y−I⁢x+_F2⁡y+I⁢x
Substituting in the condition iv__18, we get:
u⁡0,y=sin⁡yy
gensol_with_condition ≔ evalrhsgensol,x=0=rhsiv__18;
gensol_with_condition≔_F1⁡y+_F2⁡y=sin⁡yy
We then isolate one of the functions above (we can choose either one, in this case), convert it into a function operator, and then apply it to gensol
_F1 = unapplysolve,_F1y,y
_F1=y↦−_F2⁡y⁢y−sin⁡yy
evalgensol,
u⁡x,y=−_F2⁡y−I⁢x⁢y−I⁢x+sin⁡−y+I⁢xy−I⁢x+_F2⁡y+I⁢x
Three other related examples
pde__19≔∂2∂x2ux,y+12⁢∂2∂y2u⁡x,y=0:iv__19≔u0,y=sin⁡yy:
pdsolvepde__19,iv__19;
u⁡x,y=2⁢sin⁡−y+I⁢2⁢x2+−I⁢2⁢x+2⁢y⁢_F2⁡y−I⁢2⁢x2+I⁢2⁢x−2⁢y⁢_F2⁡y+I⁢2⁢x2I⁢2⁢x−2⁢y
pdetest%,pde__19,iv__19;
pde__20≔∂2∂x2ux,y+12⁢∂2∂y2u⁡x,y=0:iv__20≔u⁡x,0=sin⁡xx:
pdsolvepde__20,iv__20;
u⁡x,y=2⁢sinh⁡2⁢I⁢2⁢x−2⁢y2−_F2⁡−y+I⁢2⁢x2−_F2⁡y+I⁢2⁢x2⁢I⁢2⁢x−2⁢yI⁢2⁢x−2⁢y
pdetest%,pde__20,iv__20;
pde__21≔∂2∂r2u⁡r,t+∂∂ru⁡r,tr+∂2∂t2u⁡r,tr2=0:iv__21≔u3,t=sin6⁢t:
ans__21 ≔ pdsolvepde__21, iv__21;
ans__21≔u⁡r,t=−_F2⁡−2⁢I⁢ln⁡3+I⁢ln⁡r+t+sin⁡−6⁢I⁢ln⁡3+6⁢I⁢ln⁡r+6⁢t+_F2⁡−I⁢ln⁡r+t
pdetestans__21,pde__21, iv__21;
Consider the following problem with an initial condition:
pde__22≔∂∂tux,t=∂2∂x2u⁡x,t+m:iv__22≔ux,0=sinx:
pdsolve can solve this problem directly:
ans__22 ≔ pdsolvepde__22,iv__22;
ans__22≔u⁡x,t=sin⁡x⁢ⅇ−t+t⁢m
pdetestans__22,pde__22,iv__22;
Similarly to the Laplace transform method, we start the solution process by first applying the Fourier transform to the PDE:
transformed_PDE ≔ fourierlhs−rhspde__22=0,x,s;
transformed_PDE≔−2⁢m⁢π⁢Dirac⁡s+s2⁢fourier⁡u⁡x,t,x,s+ⅆⅆtfourier⁡u⁡x,t,x,s=0
Next, we call the function "fourier(u(x,t),x,s1)" by the new name U:
transformed_PDE_U≔subsfourierux,t,x,s=Ut,s,transformed_PDE;
transformed_PDE_U≔−2⁢m⁢π⁢Dirac⁡s+s2⁢U⁡t,s+∂∂tU⁡t,s=0
solution_U≔dsolvetransformed_PDE_U,Ut,s;
solution_U≔U⁡t,s=2⁢m⁢π⁢Dirac⁡s⁢t+_F1⁡s⁢ⅇ−s2⁢t
Now, we apply the Fourier transform to the initial condition iv__22:
u⁡x,0=sin⁡x
transformed_IC ≔ fourieriv__22,x,s;
transformed_IC≔fourier⁡u⁡x,0,x,s=I⁢π⁢−Dirac⁡s−1+Dirac⁡s+1
transformed_IC_U≔U0,s=rhstransformed_IC;
transformed_IC_U≔U⁡0,s=I⁢π⁢−Dirac⁡s−1+Dirac⁡s+1
Now, we evaluate solution_U at t = 0:
solution_U_at_IC ≔ evalsolution_U,t=0;
solution_U_at_IC≔U⁡0,s=_F1⁡s
and substitute the transformed initial condition into it:
evalsolution_U_at_IC,transformed_IC_U;
I⁢π⁢−Dirac⁡s−1+Dirac⁡s+1=_F1⁡s
Putting this into our solution_U, we get
evalsolution_U,rhs=lhs;
U⁡t,s=2⁢m⁢π⁢Dirac⁡s⁢t+I⁢π⁢−Dirac⁡s−1+Dirac⁡s+1⁢ⅇ−s2⁢t
Finally, we apply the inverse Fourier transformation to this,
solution ≔ ux,t =invfourierrhs,s,x;
solution≔u⁡x,t=sin⁡x⁢ⅇ−t+t⁢m
The following are two examples of PDE&BC problems which used to require the option HINT = `+` in order to be solved. This is now done automatically within pdsolve.
pde__23≔∂2∂r2u⁡r,t+∂∂ru⁡r,tr+∂2∂t2u⁡r,tr2=0:iv__23≔u1,t=0,u2,t=5:
ans__23 ≔ pdsolvepde__23, iv__23;
ans__23≔u⁡r,t=5⁢ln⁡rln⁡2
pdetestans__23,pde__23, iv__23;
pde__24≔∂2∂y2ux,y+∂2∂x2ux,y=6⁢x−6 y:iv__24≔ux,0=x3+11⁢x+1,ux,2=x3+11⁢x−7,u0,y=−y3+1,u4,y=−y3+109:
ans__24 ≔ pdsolvepde__24,iv__24;
ans__24≔u⁡x,y=x3−y3+11⁢x+1
pdetestans__24,pde__24, iv__24;
0,0,0,0,0
Download Help Document