Say I have a function
$f(\theta) = 1 + \cos^2(\theta)$
that can be expressed terms of the Legendre polynomials. When calculating coefficients should I change the Legendre polynomials from $x$ variables to theta variables? e.g. The third Legendre usually written:
$(0.5(3x^2-1))$ would have theta rather than $x$? (since my function is a function of theta not $x$).
If I am correct would it also make sense to then change the limits of integration $-1, 1$ to $-\pi, \pi...$
My third coefficient equation then looks like (sorry I don't know how to write this out correctly):
$c_3 = \frac52 \int_{-\pi} ^ \pi (1+\cos^2(\theta))(0.5(3\theta^2-1))d \theta$
Sorry if this is hard to read. Any help?