Ordinary Differential Equations and Systems

Solve ordinary differential equations and systems of such equations

An ordinary differential equation (ODE) contains derivatives of dependent variables with respect to the only independent variable. If y is a dependent variable and x is an independent variable, the solution of an ODE is an expression y(x). The order of the derivative of a dependent variable defines the order of an ODE.

When solving an ODE, use symbolic functions to specify dependent variables. For example, syms y(x) creates the symbolic function y of x, and the variable x. See Create Symbolic Functions for details. Construct an ODE by using diff to denote derivatives and == to create an equation. If an ODE has initial or boundary conditions, specify them as additional equations. Then use dsolve to solve an ODE.


dsolve Ordinary differential equation and system 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
Was this topic helpful?