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 />

legend('Analytical','Computed');<br />

xlabel('x');<br />

ylabel('solution y');<br />

Emden problem −− BVP with singular term.<br />

Analytical<br />

Computed<br />

1<br />

solution y<br />

0.95<br />

0.9<br />

0 0.2 0.4 0.6 0.8 1<br />

x<br />

Solving Multipoint BVPs<br />

In multipoint boundary value problems, the solution <strong>of</strong> interest satisfies<br />

conditions at points inside the interval <strong>of</strong> integration. The bvp4c function is<br />

useful in solving such problems.<br />

The following example shows how the multipoint capability in bvp4c can<br />

improve efficiency when solving a nonsmooth problem. The following equations<br />

are solved on 0 ≤ x ≤ λ for constant parameters n, κ, λ > 1 , and<br />

η = λ 2 ⁄ ( n × κ 2 ). These are subject to boundary conditions v(0) = 0 and<br />

C( λ) = 1 :<br />

v' = (C - 1)/n<br />

C' = (v * C - min(x,1))/ η<br />

The term min(x,1) is not smooth at xc = 1, and this can affect the solver’s<br />

efficiency. By introducing an interface point at xc = 1, smooth solutions can be<br />

obtained on [0,1] and [1, λ ]. To get a continuous solution over the entire<br />

interval [0, λ ], the example imposes matching conditions at the interface.<br />

5-84

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

Saved successfully!

Ooh no, something went wrong!