Boundary condition jacobian with bvp4c

3 views (last 30 days)
soren
soren on 19 Apr 2012
Hi
I'm solving a system of 2nd order ODE's
y'' = f (t, y, y')
with the boundary conditions
y (0) = a, y (1) = b
For this I am using bvp4c with success. I would like to supply analytic Jacobians, so I started with these for the boundary conditions. I encode the boundary conditions as
bc = @(p1, p2) boundary (p1, p2, a, b);
with
function bc = boundary (p1, p2, a, b)
D = numel (p1_goal);
d1 = p1 (1:D) - a (:);
d2 = p2 (1:D) - b (:);
bc = [d1; d2];
end % function
As I am solving a 2nd order system my state is (y; y'). I would assume that
partial boundary / partial y = identy matrix
partial boundary / partial y' = zero matrix
but when I give this to bvp4c, I get an error saying that the Jacobian is singular (which is true).
Can anybody tell me how to correctly provide the Jacobian of the boundary conditions?
Thanks Soren

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!