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.

5 Differential Equations<br />

2.5<br />

Solution <strong>of</strong> van der Pol Equation, µ = 1000<br />

2<br />

1.5<br />

1<br />

0.5<br />

solution y 1<br />

0<br />

−0.5<br />

−1<br />

−1.5<br />

−2<br />

−2.5<br />

0 500 1000 1500 2000 2500 3000<br />

time t<br />

Example: Finite Element Discretization<br />

fem1ode illustrates the solution <strong>of</strong> ODEs that result from a finite element<br />

discretization <strong>of</strong> a partial differential equation. The value <strong>of</strong> N in the call<br />

fem1ode(N) controls the discretization, and the resulting system consists <strong>of</strong> N<br />

equations. By default, N is 19.<br />

This example involves a mass matrix. The system <strong>of</strong> ODEs comes from a<br />

method <strong>of</strong> lines solution <strong>of</strong> the partial differential equation<br />

e – t ∂ -----<br />

u =<br />

∂t<br />

∂ 2 ---------<br />

u<br />

∂x 2<br />

with initial condition u( 0,<br />

x) = sin( x)<br />

and boundary conditions<br />

ut0 ( , ) = utπ ( , ) = 0 . An integer N is chosen, h is defined as π ⁄ ( N + 1)<br />

, and<br />

5-22

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

Saved successfully!

Ooh no, something went wrong!