Function calcu_rs::algos::expand_cos_n_times_phi

source ยท
fn expand_cos_n_times_phi(n: i128, phi: &Expr) -> Expr
Expand description

expands the expression cos(n*phi) to

cos(n*phi) = sum(j=0 && even(j); n) { (-1)^(j/2) * binom(n,j) * cos(phi)^(n-j) * sin(phi)^j }