page_title: Explicit and implicit methods
section_title: Illustration using the forward and backward Euler methods
hierarchical_section_title: Explicit and implicit methods / Illustration using the forward and backward Euler methods
caption_attribution_description: English: The result of applying different integration methods to ode y &#x2032; = &#x2212; y 2 , t &#x2208; [ 0 , 5 ] , y 0 = 1 , &#x0394; t = 0.5 {\displaystyle y'=-y^{2},\;t\in [0,5],\;y_{0}=1,\;\Delta t=0.5}
context_page_description: Explicit and implicit methods are approaches used in numerical analysis for obtaining numerical approximations to the solutions of time-dependent ordinary and partial differential equations, as is required in computer simulations of physical processes. Explicit methods calculate the state of a system at a later time from the state of the system at the current time, while implicit methods find a solution by solving an equation involving both the current state of the system and the later one. Mathematically, if is the current system state and is the state at the later time, then, for an explicit method
  while for an implicit method one solves an equation
  to find
  Implicit methods require an extra computation, and they can be much harder to implement. Implicit methods are used because many problems arising in practice are stiff, for which the use of an explicit method requires impractically small time steps to keep the error in the result bounded. For such problems, to achieve given accuracy, it takes much less computational time to use an implicit method with larger time steps, even taking into account that one needs to solve an equation of the form at each time step.
context_section_description: Consider the ordinary differential equation
  with the initial condition  Consider a grid  for 0 ≤ k ≤ n, that is, the time step is  and denote  for each . Discretize this equation using the simplest explicit and implicit methods, which are the forward Euler and backward Euler  methods (see numerical ordinary differential equations) and compare the obtained schemes.
  Forward Euler method
  The forward Euler method
  yields
  for each  This is an explicit formula for .
  Backward Euler method
  With the backward Euler method
  one finds the implicit equation
  for  (compare this with formula (3) where  was given explicitly rather than as an unknown in an equation).
  This is a quadratic equation, having one negative and one positive root. The positive root is picked because in the original equation the initial condition is positive, and then  at the next time step is given by
  In the vast majority of cases, the equation to be solved when using an implicit scheme is much more complicated than a quadratic equation, and no analytical solution exists. Then one uses root-finding algorithms, such as Newton's method, to find the numerical solution.
  Crank Nicolson method
  With the Crank-Nicolson method
  one finds the implicit equation
  for  (compare this with formula (3) where  was given explicitly rather than as an unknown in an equation). This can be numerically solved using root-finding algorithms, such as Newton's method, to obtain .
  Crank Nicolson can be viewed as a form of more general IMEX (Implicit-Explicit) schemes.
  Forward-Backward Euler method
  In order to apply the IMEX-scheme, consider a slightly different differential equation:
  It follows that
  and therefore
  for each
caption: The result of applying different integration methods to ode 
    
      
        
          
            y
            ′
          
          =
          −
          
            y
            
              2
            
          
          ,
          
          t
          ∈
          [
          0
          ,
          5
          ]
          ,
          
          
            y
            
              0
            
          
          =
          1
        
      
      {\displaystyle y'=-y^{2},\;t\in [0,5],\;y_{0}=1}
    
   with 
    
      
        
          Δ
          t
          =
          5
          
            /
          
          10
        
      
      {\displaystyle \Delta t=5/10}
    
  .
exif: {}