15.11.2014 Views

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

MATLAB Mathematics - SERC - Index of

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

5 Differential Equations<br />

Note The Robertson problem appears as an example in the prolog to<br />

LSODI [4].<br />

In hb1ode, the problem is solved with initial conditions y 1 ( 0) = 1 , y 2 ( 0) = 0 ,<br />

y 3 ( 0) = 0 to steady state. These differential equations satisfy a linear<br />

conservation law that is used to reformulate the problem as the DAE<br />

y′ 1 = – 0.04y 1 + 10 4 y 2 y 3<br />

y′ 2 = 0.04y 1 – 10 4 y 2 y 3 3 10 7 2<br />

– ⋅ y 2<br />

0 = y 1 + y 2 + y 3 – 1<br />

These equations do not have a solution for y( 0)<br />

with components that do not<br />

sum to 1. The problem has the form <strong>of</strong> My′ = fty ( , ) with<br />

M<br />

=<br />

1 0 0<br />

0 1 0<br />

0 0 0<br />

M is singular, but hb1dae does not inform the solver <strong>of</strong> this. The solver must<br />

recognize that the problem is a DAE, not an ODE. Similarly, although<br />

consistent initial conditions are obvious, the example uses an inconsistent<br />

value y 3 ( 0) = 10 – 3 to illustrate computation <strong>of</strong> consistent initial conditions.<br />

To run this example, click on the example name, or type hb1dae at the<br />

command line. Note that hb1dae:<br />

• Imposes a much smaller absolute error tolerance on y 2 than on the other<br />

components. This is because y 2 is much smaller than the other components<br />

and its major change takes place in a relatively short time.<br />

• Specifies additional points at which the solution is computed to more clearly<br />

show the behavior <strong>of</strong> y 2 .<br />

• Multiplies y by 10 4 2 to make y 2 visible when plotting it with the rest <strong>of</strong> the<br />

solution.<br />

• Uses a logarithmic scale to plot the solution on the long time interval.<br />

5-36

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

Saved successfully!

Ooh no, something went wrong!