matlab: need help with formulating tricky bvp of 2nd order ode

72 Views Asked by At

I tried to make the example as simple as possible: $$\frac{d^2x}{dx^2}W=c_1 x^3\cdot\text{somefunc}(\frac{W+x^2\lambda}{c_2x^2})$$ which is defined for $0<x\leq1$.

$c_i$ are constants and $\lambda$ is an unknown parameter to be determined.

The boundary conditions are given as: $$W(0)=c_3,\; W(1)=W'(1)=0$$

Further I have to use $W'=2xV$ so that $V'=c_1x^3\cdot \operatorname{somefunc}(\frac{W+\lambda x^2}{c_2x^2})$ .Dont ask me why I can't simply use $W'=V$, I dont't know. But I have to use that uncomfortable formulation for the first derivative.

That's what I have tried:

f = @(x,W,lambda)  [ W(2); 2*c1*(x^3)*somefunc((W(1)+(x^2)* lambda)/(c_2*x^2)];
g = @(ya,yb,lambda)[ya(1)-c_3; yb(2)-yb(1);yb(2)];  

solinit=bvpinit([0,1],[0,0],0);
sol = bvp4c(f,g,solinit);

Of course that's incorrect. I simply used $W'=V$ since I don't know better.

How can I get W(x)? Any hints?

edit:all constants as well as the function 'somefunc' is known.