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 Pass the options structure to bvp4c as follows:<br />

sol = bvp4c(odefun,bcfun,solinit,options)<br />

For a complete description <strong>of</strong> the available options, see the reference page for<br />

bvpset.<br />

Note For other ways to improve solver efficiency, check “Using Continuation<br />

to Make a Good Initial Guess” on page 8-72 and the tutorial, “Solving<br />

Boundary Value Problems for Ordinary Differential Equations in <strong>MATLAB</strong><br />

with bvp4c,” available at http://www.mathworks.com/bvp_tutorial.<br />

Solving BVP Problems<br />

This section describes:<br />

• The process for solving boundary value problems using bvp4c<br />

• Finding unknown parameters<br />

• Evaluating the solution at specific points<br />

Example: Mathieu’s Equation<br />

This example determines the fourth eigenvalue <strong>of</strong> Mathieu's Equation. It<br />

illustrates how to write second-order differential equations as a system <strong>of</strong> two<br />

first-order ODEs and how to use bvp4c to determine an unknown parameter λ .<br />

The task is to compute the fourth ( q = 5 ) eigenvalue λ <strong>of</strong> Mathieu's equation<br />

y′′ + ( λ – 2 q cos 2x)y<br />

= 0<br />

Because the unknown parameter λ is present, this second-order differential<br />

equation is subject to three boundary conditions<br />

y( 0) = 1<br />

y′ ( 0) = 0<br />

y′ ( π) = 0<br />

5-68

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

Saved successfully!

Ooh no, something went wrong!