[][src]Function peroxide::numerical::gauss_legendre::k_newton

pub fn k_newton<F>(
    f: F,
    t: f64,
    y: Vec<f64>,
    h: f64,
    rtol: f64
) -> (Vec<f64>, Vec<f64>) where
    F: Fn(Dual, Vec<Dual>) -> Vec<Dual> + Copy

Newton's Method for find k in GL4

Description

0. Initial Guess by Euler method

  • k1 = f(t, y)
  • k2 = f(t, y)

1. Combine below two equations to one equation

  • k1 = f(t1, y + h(p1*k1 + p2*k2))
  • k2 = f(t2, y + h(q1*k1 + q2*k2))
  • k = g(k)

2. Obtain Jacobian

  • DG(k^l) = I - Dg(k^l)

3. Iteration by Newton's Method

  • k^{l+1} = k^l - DG^{-1}G(k^l)