Equation Solving

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 Solve Differential Algebraic Equations (DAEs).

Functions

expand all

equationsToMatrixConvert linear equations to matrix form
eliminateEliminate variables from rational equations
finverseFunctional inverse
linsolveSolve linear equations in matrix form
polesPoles of expression or function
solveEquations and systems solver
vpasolveSolve equations numerically
dsolveSolve system of differential equations
massMatrixFormExtract mass matrix and right side of semilinear system of differential algebraic equations
odeFunctionConvert symbolic expressions to function handle for ODE solvers
odeToVectorFieldReduce order of differential equations to first-order
daeFunctionConvert system of differential algebraic equations to MATLAB function handle suitable for ode15i
decicFind consistent initial conditions for first-order implicit ODE system with algebraic constraints
findDecoupledBlocksSearch for decoupled blocks in systems of equations
incidenceMatrixFind incidence matrix of system of equations
isLowIndexDAECheck if differential index of system of equations is lower than 2
massMatrixFormExtract mass matrix and right side of semilinear system of differential algebraic equations
odeFunctionConvert symbolic expressions to function handle for ODE solvers
reduceDAEIndexConvert system of first-order differential algebraic equations to equivalent system of differential index 1
reduceDAEToODEConvert system of first-order semilinear differential algebraic equations to equivalent system of differential index 0
reduceDifferentialOrderReduce system of higher-order differential equations to equivalent system of first-order differential equations
reduceRedundanciesSimplify system of first-order differential algebraic equations by eliminating redundant equations and variables

Featured Examples