I have never solved numerically differential equations and in an optimal control problem I got this one that I cannot solve: $$1-f’(x)^2+f’(x)(x +1)+f’’(x)-f’’(x)f’(x)-f’’(x)f’(x)^2=f(x)$$ The initial conditions I have are the following: $$f(0)=0, f′(z)=−1$$ where $z$ is the first point at which $f′′(z)=0$ I hope what I wrote makes some sense. Thank you in advance for your help. This is a follow-up to sloppier version of this question I already posed: Nonlinear differential equation numerical solution+plot
1 Answer
$\begingroup$
$\endgroup$
2
There appears to be no solution for the ODE system in the question. To begin, obtain an explicit expression for f''[x]
.
First@SolveValues[eq, f''[x]]
(* (1 - f[x] + f'[x] + x*f'[x] - f'[x]^2)/(-1 + f'[x] + f'[x]^2) *)
where eq
is the ODE in the question. The ODE therefore becomes singular for values f'[x]
SolveValues[Denominator[%] == 0, f'[x]]
(* {1/2 (-1 - Sqrt[5]), 1/2 (-1 + Sqrt[5])} *)
Next, plot f'[x]
for a range of f'[0]
values, and superimpose on the plot the singular values just determined, as well as the desired f'[x] = -1
.
funp = ParametricNDSolveValue[{eq, f[0] == 0, f'[0] == y}, f'[x], {x, 0, 10}, {y}]
Plot[Evaluate@Table[funp[y], {y, -3, 2, .2}], {x, 0, 6}, PlotRange -> {-4, 4}]
Plot[{-1, 1/2 (-1 - Sqrt[5]), 1/2 (-1 + Sqrt[5])}, {x, 0, 6},
PlotStyle -> Directive[Black, Dashed]]
Show[%, %%]
Visibly, where f'[x] = -1
, f''[x]
is nowhere near zero.
asmpt=AsymptoticDSolveValue[{eqn}, f[x], {x, 0, 3}] // FullSimplify
you get an answer. You can impose on that solution that forx=0
the answer goes to0
and this is setting one of the constants of integration to zero. Then you can examine something likeSolve[(D[asmpt, {x, 2}] /. C[1] -> 0) == 0] // Factor // FullSimplify // Apart
to get three solutions. And then you can start experimenting. $\endgroup$