How to solve the equation f[t]==0
for the function f[t]
defined by differential equation,i.e. if f[t]
is no analytic? That means that f[t]
is the form InterpolatingFunction
For a dynamic system defined by differential equations, I find the inflection points, extremes et.c. For instance, let the system is the SIR model.
β = 1.5; γ = 1/3; i0 = 0.001;
sol = NDSolve[
{s'[t] == -β*s[t]*i[t],
i'[t] == β*s[t]*i[t] - γ*i[t],
r'[t] == γ*i[t],
i[0] == i0, r[0] == 0, s[0] == 1 - i0},
{s, i, r},
{t, 0, 104}]
The system has no exact algebraic solution. The output is in the form
{{s -> InterpolatingFunction[...], i -> InterpolatingFunction[...], r -> InterpolatingFunction[...]}
However. the Solve
don't work as so as NSolve
, Reduce
et.c. Some failed attempts to find numerically a maxima of i[t]
, i.e. solving the equation
$$ \beta i(t) s(t)-\gamma i(t)=0. $$
NSolve[((β*s[t]*i[t] - γ*i[t]) /. sol) == 0., t]
NSolve[(Evaluate@(β*s[t]*i[t] - γ*i[t]) /. sol ) == 0., t]
NSolve[(Evaluate@(β*s[t]*i[t] - γ*i[t]) /. sol /.
t -> τ ) == 0., τ]
...
How to solve it?