Solve algebraic and differential equations

You can solve algebraic equations, differential equations, and differential algebraic equations (DAEs).

Solve **algebraic equations** to
get either exact analytic solutions or high-precision numeric solutions.
For analytic solutions, use `solve`

, and for numerical
solutions, use `vpasolve`

. For solving linear equations,
use `linsolve`

. These solver functions have the flexibility
to handle complicated problems. See Troubleshoot Equation Solutions from solve Function.

Solve **differential equations** by
using `dsolve`

. Create these
differential equations by using symbolic functions. See Create Symbolic Functions.

Solve **differential algebraic equations** (DAEs)
by first reducing their differential index to `1`

or `0`

using Symbolic Math Toolbox™ functions,
and then using MATLAB^{®} solvers, such as `ode15i`

, `ode15s`

,
or `ode23t`

. See Set Up Your DAE Problem.

`dsolve` |
Differential equations and systems solver |

`massMatrixForm` |
Extract mass matrix and right side of semilinear system of differential algebraic equations |

`odeFunction` |
Convert system of symbolic algebraic expressions to MATLAB function handle suitable for ode45, ode15s, and other ODE solvers |

`odeToVectorField` |
Convert higher-order differential equations to systems of first-order differential equations |

`daeFunction` |
Convert system of differential algebraic equations to MATLAB function handle suitable for ode15i |

`decic` |
Find consistent initial conditions for first-order implicit ODE system with algebraic constraints |

`findDecoupledBlocks` |
Search for decoupled blocks in systems of equations |

`incidenceMatrix` |
Find incidence matrix of system of equations |

`isLowIndexDAE` |
Check if differential index of system of equations is lower than 2 |

`massMatrixForm` |
Extract mass matrix and right side of semilinear system of differential algebraic equations |

`odeFunction` |
Convert system of symbolic algebraic expressions to MATLAB function handle suitable for ode45, ode15s, and other ODE solvers |

`reduceDAEIndex` |
Convert system of first-order differential algebraic equations to equivalent system of differential index 1 |

`reduceDAEToODE` |
Convert system of first-order semilinear differential algebraic equations to equivalent system of differential index 0 |

`reduceDifferentialOrder` |
Reduce system of higher-order differential equations to equivalent system of first-order differential equations |

`reduceRedundancies` |
Simplify system of first-order differential algebraic equations by eliminating redundant equations and variables |

Solve equations, return full solutions, and visualize results.

**Solve System of Algebraic Equations****Troubleshoot Equation Solutions from solve Function****Solve Equations Numerically****Solve System of Linear Equations****Select Numeric or Symbolic Solver**

**Solve a Single Differential Equation**

Use `dsolve`

to compute symbolic solutions to ordinary differential equations.

**Differential Algebraic Equations**

A system of differential algebraic equations is a system of
equations involving unknown functions of one independent variable
(typically, the time variable `t`

) and their derivatives.

Was this topic helpful?