[−][src]Function bacon_sci::special::chebyshev_second
pub fn chebyshev_second<N: ComplexField>(
n: u32,
tol: N::RealField
) -> Result<Polynomial<N>, String>
Get the nth chebyshev polynomial of the second kind.
Gets the nth chebyshev polynomial of the second kind over a specified field. This is done using the recursive formula and is properly normalized.
Examples
use bacon_sci::special::chebyshev_second; fn example() { let u_3 = chebyshev_second::<f64>(3, 1e-8).unwrap(); assert_eq!(u_3.order(), 3); assert!(u_3.get_coefficient(0).abs() < 0.00001); assert!((u_3.get_coefficient(1) + 4.0).abs() < 0.00001); assert!(u_3.get_coefficient(2).abs() < 0.00001); assert!((u_3.get_coefficient(3) - 8.0).abs() < 0.00001); }