15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Initial Value Problems for ODEs and DAEs<br />

Working with Higher Order ODEs<br />

The ODE solvers accept only first-order differential equations. However, ODEs<br />

<strong>of</strong>ten involve a number <strong>of</strong> dependent variables, as well as derivatives <strong>of</strong> order<br />

higher than one. To use the ODE solvers, you must rewrite such equations as<br />

an equivalent system <strong>of</strong> first-order differential equations <strong>of</strong> the form<br />

y′ = fty ( , )<br />

You can write any ordinary differential equation<br />

y ( n)<br />

= f( t, y, y′…y , ,<br />

( n – 1)<br />

)<br />

as a system <strong>of</strong> first-order equations by making the substitutions<br />

y 1 = y,<br />

y 2 = y′ , …, y n = y ( n – 1)<br />

The result is an equivalent system <strong>of</strong> n<br />

first-order ODEs.<br />

y′ 1 = y 2<br />

y 2 ′ = y 3<br />

y n ′<br />

=…<br />

f( t, y 1 , y 2 ,..., yn)<br />

“Example: Solving an IVP ODE (van der Pol Equation, Nonstiff)” on page 5-9<br />

rewrites the second-order van der Pol equation<br />

2<br />

y′′ 1 – µ ( 1 – y 1 ) y′ 1 + y 1 = 0<br />

as a system <strong>of</strong> first-order ODEs.<br />

Solvers for Explicit and Linearly Implicit ODEs<br />

This section describes the ODE solver functions for explicit or linearly implicit<br />

ODEs, as described in “Types <strong>of</strong> Problems Handled by the ODE Solvers” on<br />

page 5-4. The solver functions implement numerical integration methods for<br />

solving initial value problems for ODEs. Beginning at the initial time with<br />

initial conditions, they step through the time interval, computing a solution at<br />

each time step. If the solution for a time step satisfies the solver’s error<br />

tolerance criteria, it is a successful step. Otherwise, it is a failed attempt; the<br />

solver shrinks the step size and tries again.<br />

5-5

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!