As explained in Equations You Can Solve Using PDE Toolbox, Partial Differential Equation Toolbox™ solvers address equations of the form
or variants that have derivatives with respect to time, or that have eigenvalues, or are systems of equations. These equations are in divergence form, where the differential operator begins . The coefficients a, c, and f are functions of position (x, y, z) and possibly of the solution u.
However, you can have equations in a form with all the derivatives explicitly expanded, such as
In order to transform this expanded equation into the required form, you can try to match the coefficients of the equation in divergence form to the expanded form. In divergence form, if
Matching coefficients in the uxx and uyy terms in to the equation, you get
Then looking at the coefficients of ux and uy, which should be zero, you get
This completes the conversion of the equation to the divergence form
c coefficient appears in the generalized
So when you derive a divergence form of the
keep in mind that this coefficient appears elsewhere.
For example, consider the 2-D Poisson equation –uxx – uyy = f. Obviously, you can take c = 1. But there are other c matrices that lead to the same equation: any that have c(2) + c(3) = 0.
So there is freedom in choosing a c matrix. If you have a Neumann boundary condition such as
the boundary condition depends on which version of c you use. In this case, make sure that you take a version of c that is compatible with both the equation and the boundary condition.
You can transform a partial differential equation into the required form by using Symbolic Math Toolbox™. The toolbox offers these two functions to help with the conversion:
pdeCoefficients (Symbolic Math Toolbox) converts a PDE into the required form and
extracts the coefficients into a structure of double-precision numbers and
function handles, which can be used by
function also can return a structure of symbolic expressions, in which case you
need to convert these expressions to double format before passing them to
pdeCoefficientsToDouble (Symbolic Math Toolbox) converts symbolic PDE coefficients to
Solve Partial Differential Equation of Nonlinear Heat Transfer (Symbolic Math Toolbox) shows how the Symbolic Math Toolbox functions can help you convert a PDE to the required form. Nonlinear Heat Transfer in Thin Plate shows the same example without the use of Symbolic Math Toolbox.
Sometimes it is not possible to find a conversion to a divergence form such as
For example, consider the equation
By simple coefficient matching, you see that the coefficients c1 and c4 are –1 and –1/2 respectively. However, there are no c2 and c3 that satisfy the remaining equations,