Skip to main content

chebyshev_bvp

Function chebyshev_bvp 

Source
pub fn chebyshev_bvp<P, Q, F>(
    p: P,
    q: Q,
    f: F,
    a: f64,
    b: f64,
    ua: f64,
    ub: f64,
    n: usize,
) -> Result<(Vec<f64>, Vec<f64>), ErrorsJSL>
where P: Fn(f64) -> f64, Q: Fn(f64) -> f64, F: Fn(f64) -> f64,
Expand description

Solves u'' + p(x) u' + q(x) u = f(x) on [a, b] with u(a) = ua, u(b) = ub by Chebyshev collocation at n + 1 points. Returns the points (from b down to a) and the solution.