How can I change this explicit method code to the implicit method code?
6 views (last 30 days)
David Goodmanson on 7 Jun 2022
Edited: David Goodmanson on 8 Jun 2022
I am not sure what is meant by 'implicit method', and while numerical methods are good, there is also the exact expression. The solution to
y' = -a*y + b*exp(-t) a = 100000 b = 99999
y = A*exp(-a*(t-t0)) + (b/(a-1))*exp(-t)
where A is determined by the initial condition y(t0) = y0
A = y0 - (b/(a-1))*exp(-t0)
In this case b/(a-1) = 1 (probably not by coincidence) so further simplification happens.