So I have a 'fairly simple' problem that needs to be 'solved'. I have been able to solve this running 2 loops in Matlab but I am sure Mathematica should be able to handle this. I have the ODE $$F'(x)+\sqrt{a^3 x F(x)}=0$$ subject to the boundary conditions $$F(0)=\dfrac{1}{a} \quad \text{and} \quad F(1)=0.$$ To complicate the problem, $a$ must satify the condition $$\dfrac{1}{a}=2\int_0^1 F dx.$$
First I tried using With to try 'correct' for the unknown value of $a$
eq = F'[x] + Sqrt[ a^3 x F[x]] == 0;
eps = 10^(-6);
With[{a = 2 NIntegrate[F[x], {x, eps, 1}]},
sol = NDSolve[{eq, F[eps] == 1/a}, F, {x, eps, 1}]];
I used eps to avoid any issues at 0. Naturally this approach caused many errors as $a$ was defined using something that hadn't been calculated yet. So I don't even know if this is possible.
My second thought was to use ParametricNDSolveValue but I don't know if it's possible to integrate a parametric numerical solution. Maybe I should take a path similar to here?
Any advice would be greatly appreciated
Method->"Shooting"? See also https://reference.wolfram.com/language/tutorial/NDSolveBVP.html – Henrik Schumacher Jan 18 '20 at 18:14