Conditioning of IVPs¶
Consider the ODEs \(u'=u\) and \(u'=-u\). In each case we compute \(\partial f/\partial u = \pm 1\), so the condition number bound is \(e^{(b-a)}\) in both problems. However, they behave quite differently. In the case of exponential growth, \(u'=u\), the bound is the actual condition number.
using Plots
t = LinRange(0,3,800)
u = @. exp(t)*1
lower,upper = @. exp(t)*0.7,@. exp(t)*1.3
plot(t,u,l=:black,ribbon=(lower,upper),
leg=:none,xlabel="t",ylabel="u(t)", title="Exponential divergence of solutions")
But with \(u'=-u\), solutions actually get closer together with time.
u = @. exp(-t)*1
lower,upper = @. exp(-t)*0.7,@. exp(-t)*1.3
plot(t,u,l=:black,ribbon=(lower,upper),
leg=:none,xlabel="t",ylabel="u(t)", title="Exponential convergence of solutions")
In this case the actual condition number is one, due to the difference of solutions at the initial time.