Adaptivity at a singularity¶
In IVP with singularity we found an IVP that appears to blow up in a finite amount of time. Because the solution increases so rapidly as it approaches the blowup, adaptive stepping is required to even get close. In fact it’s the failure of adaptivity that is used to get an idea of when the singularity occurs.
using FundamentalsNumericalComputation
f = (u,p,t) -> (t+u)^2
ivp = ODEProblem(f,1,(0.,1.))
[36mODEProblem[0m with uType [36mInt64[0m and tType [36mFloat64[0m. In-place: [36mfalse[0m
timespan: (0.0, 1.0)
u0: 1
t,u = FNC.rk23(ivp,1e-5);
┌ Warning: Stepsize too small near t=0.785408720407281 └ @ FundamentalsNumericalComputation /Users/driscoll/Documents/fnc/src/chapter06.jl:93
plot(t,u,label="",
xlabel="t",yaxis=(:log10,"u(t)"),title="Finite-time blowup")