how to solve a higher order boundary conditioned differential equation with matlab function

275 views Asked by At

I'm trying to solve a boundary value condition problem with matlab bvp4c function. But I get warning and it doesn't give correct solution. my equation is d4y/dx4=C/(ax^2 -y)^2 ,C and a are constant , my warning content is following below

Warning: Unable to meet the tolerance without using more than 2500 mesh points. The last mesh of 2152 points and the solution are available in the output argument. The maximum residual is 9.25647e+11, while requested accuracy is 0.001.

my code:

clc;clear
solinit = bvpinit([0,200],[1,1,1,1]);
sol = bvp4c(@deriv,@bcs,solinit);
plot(sol.x,sol.y)
function dydx = deriv(x,y)

c=1;a=1;
dydx = [y(2)
        y(3)
        y(4)
       (c/(a*x.^2 -y(1)).^2)];
end

function res = bcs(ya,yb)
res = [ ya(1) 
        ya(2)
        yb(3)
        yb(4)];
end

I don't know what is its reason?! thanks in advance for your helping enter image description here

0

There are 0 answers