MATLAB: Help in using bvp4c second order ODE.

bvp4code

I am trying to solve this equation: 9,81-2,5*y^2+1,75* θ2y^2/θx2=0,15 (bc: y(0)=0,y(1)=0) The problem is that y is squared. I managed to find a solution for y^2 but not y. I tried to use the equation: θ2y^2/θx2=2*(y'*y'+y*y'') but I got an error:
Error using bvp4c Unable to solve the collocation equations — a singular Jacobian encountered.
Any ideas on how to obtain a solution for y?
Thanks.
function bvp4 xlow=0; xhigh=1; solinit=bvpinit(linspace(xlow,xhigh,1000),[0 0]); sol = bvp4c(@bvp4ode,@bvp4bc,solinit); xint=linspace(xlow,xhigh); Sxint=deval(sol,xint); plot(xint,Sxint(1,:))
function dydx = bvp4ode(x,y) dydx = [y(2); (0.15-9.81+2.5*y(1))/1.75 ];
function res = bvp4bc(ya,yb) res = [ya(1); yb(1)];

Best Answer

If the above code works (for y^2), why not just taking the square root of the solution to get y ?
Best wishes
Torsten.