Help in using bvp4c second order ODE.
Mostrar comentarios más antiguos
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)];
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Boundary Value Problems en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!