I am trying to solve the following problem: find the smallest value of $b$ such that the inverse of the solution u[p]
given by NDSolveValue
is never less than 1.
f[b_, v_] := NDSolveValue[{u''[p] + u[p] == 1/(2*(b*v)^2) + 3/2*u[p]^2,
u[0] == 0, u'[0] == 0}, u, {p, 0.1, 10}];
To do this for a given value of v
, here 0.2, I have written the following code
g[q_] := MinValue[{(1/f[q, 0.2][p]), 10 > p > 0.1}, p];
NSolve[g[q] == 1, q]
The function g[q]
seems to work fine, g[15]
returns a number (about 7.8), but NSolve gives the following errors:
How can I take care of these?