1
$\begingroup$

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?

$\endgroup$
1
$\begingroup$

The answer depends on what you're seeking. Legendre polynomials $P(x)$ form an orthonormal basis on $[-1,1]$, so any nice function $f(x)$ on $[-1,1]$ can be written as a linear combination of them. Your $f(\theta)=1+\cos(\theta)^2$, while nice, will have a pretty awful expansion in terms of $P(\theta)$, but a much nicer expansion in terms of $P(\cos(\theta))$.

Most likely, the question asks you to expand in $P(\cos(\theta))$ because these are the basis functions on the unit circle for the Newtonian potential. To make your life easier, write $x=\cos(\theta)$ so you are trying to expand $1+x^2$ in terms of $P(x)$. Then yes you can compute the coefficients $c_i$ by taking inner products $\int_{-1}^1(1+x^2)P_n(x)dx$

$\endgroup$
  • $\begingroup$ Ah yes it is expanded in terms of P(cos(theta)) I understand now. So I would just calculate the integral between -1 and 1 of (1+x^2)(1)dx for the first coefficient and (1+x^2)(x)dx for the 2nd and so on... $\endgroup$ – skitt1z1 Apr 29 '15 at 17:50
  • $\begingroup$ Right, and by the looks of it you won't need legendre polynomials past $n=2$. $\endgroup$ – Alex R. Apr 29 '15 at 17:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.