$$ \newcommand{\uex}{{u_{\small\mbox{e}}}} \newcommand{\vex}{{v_{\small\mbox{e}}}} \newcommand{\half}{\frac{1}{2}} \newcommand{\tp}{\thinspace .} \newcommand{\Oof}[1]{\mathcal{O}(#1)} $$

« Previous
Next »

Extension to variable coefficients

$$ u'(t) = -a(t)u(t) + b(t)$$

Forward Euler: $$ \begin{equation} [D_t^+ u = -au + b]^n \tp \end{equation} $$ The truncation error is found from $$ \begin{equation} [D_t^+ \uex + a\uex - b = R]^n \tp \end{equation} $$ Using (9)-(10): $$ \uex'(t_n) - \half\uex''(t_n)\Delta t + \Oof{\Delta t^2} + a(t_n)\uex(t_n) - b(t_n) = R^n \tp $$ Because of the ODE, \( \uex'(t_n) + a(t_n)\uex(t_n) - b(t_n) =0 \), and $$ \begin{equation} R^n = -\half\uex''(t_n)\Delta t + \Oof{\Delta t^2} \tag{32} \tp \end{equation} $$ No problems with variable coefficients!

« Previous
Next »