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 demo emdenbvp contains the complete code for this example. The<br />

demo uses subfunctions to place all required functions in a single M-file. To<br />

run this example type emdenbvp at the command line. See “BVP Solver Basic<br />

Syntax” on page 5-65 and “Solving BVP Problems” on page 5-68 for more<br />

information.<br />

1 Rewrite the problem as a first-order system and identify the singular<br />

term. Using a substitution y 1 = y and y 2 = y′ , write the differential<br />

equation as a system <strong>of</strong> two first-order equations<br />

y 1 ′ = y 2<br />

y 2 ′<br />

2 5<br />

= – --y<br />

x 2 – y 1<br />

The boundary conditions become<br />

y 2 ( 0) = 0<br />

y 1 ( 1) = 3 ⁄ 2<br />

Writing the ODE system in a vector-matrix form<br />

y 1 ′<br />

y 2 ′<br />

=<br />

1<br />

-- 0 0<br />

x<br />

0 – 2<br />

y y 1 2<br />

+<br />

5<br />

y 2 –y 1<br />

the terms <strong>of</strong> Equation 5-2 are identified as<br />

S<br />

=<br />

0 0<br />

0 – 2<br />

and<br />

fxy ( , )<br />

=<br />

y 2<br />

–y 1<br />

5<br />

5-82

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

Saved successfully!

Ooh no, something went wrong!