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 toolbox format, 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.
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,