Singular problem for bvp4c
Show older comments
Hi All,
I encounter some singular problems regarding bvp4c, please see my code for my equations and implementation. I know that when x = -1 and 1, my derivative goes to infinity. And it seems like that MATLAB complaints about this. I wonder is there any workaround for this problem? I tried on ode113, and instead of evaluating my initial point at x = -1, I just do it at x = -1 + 1e-7 to avoid this singular points. And it is solvable. I would like to use bvp4c because I have other equations and boundary condition to coupled together. I wonder is there similar strategy for bvp4c? Here are my code
solinit = bvpinit(linspace(-1,1,50),0);
sol = bvp4c(@height_ode,@height_bc,solinit);
y = deval(sol,linspace(-1,1,50));
plot(linspace(-1,1,50),y(1,:))
and defintion for height_ode and height_bc are following:
function dhdx = height_ode(x,h)
w = 0.7;
q = 1/2*w*(1-x^2);
dqdx = -w*x;
kappa = 1.469;
dhdx = (560*h(1)^0.5*q - 64*h(1).^4 + 6*w.^(7/8)*(72*kappa - 77)*h(1)*q*dqdx)/(3*w.^(7/8)*(96*kappa - 77)*q.^2);
end
function res = height_bc(yleft, yright)
res = [yleft];
3 Comments
Torsten
on 20 Jul 2017
And for bvp4c, the solution to integrate between [-1+eps:1-eps] does not work ?
Best wishes
Torsten.
Zhekai Deng
on 20 Jul 2017
Zhekai Deng
on 20 Jul 2017
Answers (0)
Categories
Find more on Boundary Value Problems in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!