Help in using bvp4c second order ODE.
显示 更早的评论
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)];
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Boundary Value Problems 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!