How do you solve a boundary value problem of the given form ?
Show older comments
The differential equation I want to solve is d2y/dx2 = k*(y^n) , where k and n are constants and n<0. The boundary conditions are y=1@x=1 and dy/dx=0@x=0. I tried using the bvp4c solver for this case but it always showed " Error using bvp4c (line 251) : Unable to solve the collocation equations -- a singular Jacobian encountered." I want to know if there is any alternative way to solve this equation. Thanks.
3 Comments
Walter Roberson
on 10 Apr 2016
Is n a negative integer, or is it floating point? If it is floating point, then which meaning of raising to a power do you want to use for the negative y(x) ?
Torsten
on 11 Apr 2016
Please show us the MATLAB code you are using.
Best wishes
Torsten.
Anshuman Goswami
on 11 Apr 2016
Edited: Walter Roberson
on 11 Apr 2016
Answers (2)
Walter Roberson
on 11 Apr 2016
0 votes
Your lower bounds appear to be xlow = 0, which you are raising to a negative power. That is going to generate 1/0 which is a singularity. Your xlow needs to be at least eps(realmin)
Torsten
on 12 Apr 2016
Replace
solinit = bvpinit(linspace(xlow,xhigh,10),[0 0]);
by
solinit = bvpinit(linspace(xlow,xhigh,10),[1 0]);
Best wishes
Torsten.
Categories
Find more on Logical 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!