Partial Differential Equations: Exact Solutions Subject to Boundary Conditions
This document gives examples of Fourier series and integral transform (Laplace and Fourier) solutions to problems involving a PDE and boundary and/or initial conditions. It also describes how, for certain problems, pdsolve can automatically adjust the arbitrary functions and constants entering the solution of the partial differential equations (PDEs) such that the boundary conditions (BCs) are satisfied.
Two Examples Solved Automatically and Step-by-step
Example 1: Adjusting an Arbitrary Function _F1(...)
A substance convecting through a tube at velocity c (for example, a radioactive decaying chemical dissolved in water) has its density u⁡x,t modeled by a convection-decay type of equation
where the size of λ indicates how fast the substance is decaying. In this case, the boundary condition is a generic function of x indicating the value of the density at t=0.
The following is an exact solution for pde1. For now, bc1 is not considered.
Perform the following steps to find the form of the mapping of _F1 that matches bc1 when t=0.
Introduce a new variable q equal to the argument of _F1.
Evaluate at this value of x and then isolate _F1(q). The following mapping is obtained.
The solution to the PDE and BC is obtained evaluating the general solution at this value of _F1.
Verify this result using pdetest.
Summary: The system of PDEs and BCs is
The following is the solution computed by pdsolve automatically by performing the steps explained in the Step-by-step Solution section above.
The approach used in this example serves also to address nonlinear equations of the form ∂∂t⁢u⁡x,t+c⁢∂∂x⁢u⁡x,t=Φ⁡x,t,u⁡x,t
Example 2: Periodic Boundary Conditions
Consider the heat equation that models the temperature u⁡x,t
where κ is any constant of proportionality.
Assume that the boundary conditions at x=0 and x=L are as follows:
Similar to Example 1, the following is a solution for pde2. For now, bc2 is not considered.
This time, pdsolve computes a complete (that is, not the most general) solution using separation of variables. The solution appears in terms of arbitrary constants _C1,_C2,_C3 and the separation variable _c1.
The integration constants can be redefined to absorb _C3:
Now, evaluate the solution at x=0 and x=L and impose the given boundary conditions to build a system (e1 and e2, so two equations) to be solved for these three constants.
Solve for the constants.
The first solution above leads to a solution of no interest: u⁡x,t=0. The second solution above is the one we want.
Here pdetest verifies the answer for pde and the first boundary condition, but fails with the second one.
However, the answer computed is correct. The second boundary condition can be constructed by evaluating the answer at x=L. This task can be performed within pdetest.
Summary: The system with periodic boundary conditions is
The solution computed by pdsolve automatically by performing the steps summarized in the Step-by-step Solution section above:
Notes on this PDE and Initial Values / Boundary Conditions Problem
Given a problem with PDEs and some BCs, note the following:
Depending on how you write a general PDE solution, it becomes possible or nearly impossible to adjust it to match the BCs.
Certain particular PDE solutions are frequently easier to adjust than general solutions.
Some combinations, classified in the literature, of "certain types of PDEs" with "certain type of BCs" can be solved systematically by writing the PDE solution in a special form.
By passing PDEs alone to pdsolve, it is not possible to predict the form of the PDE solution. On the other hand, pdsolve accepts a HINT argument so that solutions of a "certain type" can be requested.
Three Textbook Examples
A bar loses heat across its lateral boundary at a rate proportional to the temperature u⁡x,t and its BCs state that the temperature at the two ends of the bar are equal to 1.
This problem is modeled by the following equation.
The following is a textbook example where the solution is computed by constructing an infinite series and then reversed using the boundary conditions to compute a closed formula for the coefficients of the series. The three boundary conditions specify the value of u⁡x,t at two points (values of x) and at t=0 as a generic function f⁡x.
The following is the wave equation with conditions at t=0 for u⁡x,t and its time derivative ∂∂t⁢u⁡x,t, as well as conditions at the boundaries x = 0 and x = 1:
To verify the conditions at t = 0 which pdetest is unable to check, we use plots.
First, we plot together the solution at t = 0 (1000 terms) and the quadratic expression x⋅1−x and see that they are identical:
Then, we plot together the derivative of the solution at t = 0 (1000 terms) and the quadratic expression x⋅1−x and see that they are identical:
Set infolevel = 2 to receive information on the method used.