# Documentation

## Coefficients for Systems of PDEs

As Systems of PDEs describes, toolbox functions can address the case of systems of N PDEs. How do you represent the coefficients of your PDE in the correct form? In general, an elliptic system is

$-\nabla \cdot \left(c\otimes \nabla u\right)+au=f.$

For 2-D systems, the notation $\nabla \cdot \left(c\otimes \nabla u\right)$ represents an N-by-1 matrix with an (i,1)-component

$\sum _{j=1}^{N}\left(\frac{\partial }{\partial x}{c}_{i,j,1,1}\frac{\partial }{\partial x}+\frac{\partial }{\partial x}{c}_{i,j,1,2}\frac{\partial }{\partial y}+\frac{\partial }{\partial y}{c}_{i,j,2,1}\frac{\partial }{\partial x}+\frac{\partial }{\partial y}{c}_{i,j,2,2}\frac{\partial }{\partial y}\right){u}_{j}.$

For 3-D systems, the notation $\nabla \cdot \left(c\otimes \nabla u\right)$ represents an N-by-1 matrix with an (i,1)-component

$\begin{array}{l}\sum _{j=1}^{N}\left(\frac{\partial }{\partial x}{c}_{i,j,1,1}\frac{\partial }{\partial x}+\frac{\partial }{\partial x}{c}_{i,j,1,2}\frac{\partial }{\partial y}+\frac{\partial }{\partial x}{c}_{i,j,1,3}\frac{\partial }{\partial z}\right){u}_{j}\\ +\sum _{j=1}^{N}\left(\frac{\partial }{\partial y}{c}_{i,j,2,1}\frac{\partial }{\partial x}+\frac{\partial }{\partial y}{c}_{i,j,2,2}\frac{\partial }{\partial y}+\frac{\partial }{\partial y}{c}_{i,j,2,3}\frac{\partial }{\partial z}\right){u}_{j}\\ +\sum _{j=1}^{N}\left(\frac{\partial }{\partial z}{c}_{i,j,3,1}\frac{\partial }{\partial x}+\frac{\partial }{\partial z}{c}_{i,j,3,2}\frac{\partial }{\partial y}+\frac{\partial }{\partial z}{c}_{i,j,3,3}\frac{\partial }{\partial z}\right){u}_{j}.\end{array}$

The symbols a and d denote N-by-N matrices, and f denotes a column vector of length N.

Other problems with N > 1 are the parabolic system

$d\frac{\partial u}{\partial t}-\nabla \cdot \left(c\otimes \nabla u\right)+au=f,$

the hyperbolic system

$d\frac{{\partial }^{2}u}{\partial {t}^{2}}-\nabla \cdot \left(c\otimes \nabla u\right)+au=f,$

and the eigenvalue system

$-\nabla \cdot \left(c\otimes \nabla u\right)+au=\lambda du.$

To solve a PDE using this toolbox, you convert your problem into one of the forms the toolbox accepts. Then express your problem coefficients in a form the toolbox accepts.

The question is how to express each coefficient: d, c, a, and f. For answers, see f Coefficient for Systems, c Coefficient for Systems, and a or d Coefficient for Systems.

 Note:   If any coefficient depends on time or on the solution u or its gradient, then all coefficients should be `NaN` when either time or the solution u is `NaN`. This is the way that solvers check to see if the equation depends on time or on the solution.