Function

NumCosmoMathSpectralchebyshev_integrate

Declaration [src]

gdouble
ncm_spectral_chebyshev_integrate (
  GArray* c,
  gdouble a,
  gdouble b
)

Description [src]

Integrates the series over its interval, from $\int_{-1}^{1} T_k(s)\,\mathrm{d}s = 2/(1 - k^2)$ for even $k$ and zero for odd $k$. Applied to the coefficients of ncm_spectral_compute_chebyshev_coeffs() or its adaptive variants, this is Clenshaw-Curtis quadrature.

Parameters

c

Type: An array of double

Chebyshev coefficients.

The data is owned by the caller of the function.
a

Type: gdouble

Left endpoint of the interval.

b

Type: gdouble

Right endpoint of the interval.

Return value

Type: gdouble

$\int_a^b \sum_k c^k T_k(s(x))\,\mathrm{d}x$.