Timeline for How to solve an algebraic equation with InterpolatingFunction?
Current License: CC BY-SA 4.0
4 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Apr 10, 2020 at 12:14 | comment | added | xzczd♦ |
The InterpolatingFunction s are the problem. A simple example: f = FunctionInterpolation[x, {x, -6, 6}]; g = FunctionInterpolation[2 x, {x, -6, 6}]; NSolve[f[x] + g[x] == 0, x] Please see my answer for more details.
|
|
Apr 10, 2020 at 12:04 | comment | added | Ulrich Neumann |
Perhaps interpolation function are the problem for NSolve but you can solve it with FindRoot or NMinimize . Look at the plot. Perhaps you have to help Mathematica a little bit. Are you looking for zeros t>20 or 5<t<10 ?
|
|
Apr 10, 2020 at 11:54 | comment | added | Slepecky Mamut |
However, the NSolve[(Evaluate@(\[Beta]*s[t]*i[t] - \[Gamma]*i[t]) /. sol ) == 0., t, 3.] does not work as well. I think the problem is not in the actual function `i[t]' but its presentation as 'InterpolatingFunction'
|
|
Apr 10, 2020 at 11:41 | history | answered | Ulrich Neumann | CC BY-SA 4.0 |