I have a short script to NDSolve
a second-order nonlinear BVP, which as its output produces an InterpolatingFunction
object. I would like to load in some data, and check how well this data fits the function by performing a Least-Mean-Squares sum.
I don't know how to go about this with a function represented by one of these InterpolatingFunction
objects. Minimal(ish) code to produce the function is included below.
{r0, f0} = {1.349, 1.421}; {r1, f1} = {3.913, 0.044};
eqn = 2 H == f''[r]/((1 + f'[r]^2)^(3/2)) + (1/r) (f'[r]/(1 + f'[r]^2)^(1/2));
H = -0.021414;
F = First[f /. NDSolve[{eqn, f'[r0] == -1.127435, f[r1] == f1}, f, {r, r0, r1}]]
Any help would be appreciated.