Legendre Series Is there any generic expression to write a polynomial of the form
\begin{equation}
a_0+a_1t^2+a_2t^4+\dots
\end{equation}
as a function of Legendre polynomials?
Thank you in advance!
 A: In the same spirit as mathreadler's answer, since $P_{2 i}(t)$ is a linear combination of even powers of $t$, $t^{2k}$ can be expressed as a linear combination of Legendre polynomials.
So, what you want is to write $$\sum_{i=0}^n a_i \,t^{2i}=\sum_{i=0}^n b_i\, P_{2 i}(t)$$ Just for the fun, I give below the expressions of the $b_i$ for $n=5$.
$$b_0=a_0+\frac{a_1}{3}+\frac{a_2}{5}+\frac{a_3}{7}+\frac{a_4}{9}+\frac{a_5}{11}$$
$$b_1=\frac{2 a_1}{3}+\frac{4 a_2}{7}+\frac{10 a_3}{21}+\frac{40 a_4}{99}+\frac{50
   a_5}{143}$$
$$b_2=\frac{8 a_2}{35}+\frac{24 a_3}{77}+\frac{48 a_4}{143}+\frac{48 a_5}{143}$$
$$b_3=\frac{16 a_3}{231}+\frac{64 a_4}{495}+\frac{32 a_5}{187}$$
$$b_4=\frac{128 a_4}{6435}+\frac{128 a_5}{2717}$$
$$b_5=\frac{256 a_5}{46189}$$
Edit
You could find interesting this link and this one
A: If you wish to write a polynomial $P(x) = a_0+a_1t^2+a_2t^4$ as a Legendre polynomial, what you can do is to solve the matrix equation system $\bf Mx = a$:
$${\bf M} = \left[\begin{array}{rrrrrr} 1&0&-\frac{1}{2}&0&\frac{3}{8}\\0&1&0&-\frac{3}{2}&0 \\ 0&0&\frac{3}{2}&0&-\frac{30}{8}\\0&0&0&\frac{5}{2}&0\\0&0&0&0&\frac{35}{8}\end{array}\right], {\bf a} = \left[\begin{array}{c}a_0\\0\\a_1\\0\\a_2\end{array}\right]$$
If you have a longer $\bf a$ you may need to build a larger $\bf M$ matrix. The coefficients to put in there are for example available here, each $P_k(x) = c_0+c_1x+c_2x^2+\cdots$ is stored into a new column $$\left[\begin{array}{c}c_0\\c_1\\c_2\\\vdots\end{array}\right]$$ into the $\bf M$ matrix.
A: Depends upon what 'generic' means. A polynomial $Q(X)$ (or more generally any $L^2([-1,1])$ function) may be expanded through a Legendre series:
$$ Q(X) = \sum_{k\geq 0} c_k P_(X)$$
where the $P_k(X)$ is the $k$'th Legendre polynomial and $c_k$ a number.
The abstract result for $c_k$ comes  from an orthogonality relation and reads:
$$ c_k = (k+1/2) \int_{-1}^1 Q(x)P_k(x) \; dx.$$
But here, you obviously need to know the $P_k$'s.
If your function is sufficiently differentiable (the case at least for polynomials) then Rodrigue's formula for $P_k$ permits  $k$ integrations by part to yield:
$$ c_k = (-1)^k \frac{2k+1}{2^{k+1} k!} \int_{-1}^1 Q^{(k)}(x) \left( x^2-1 \right)^k \; dx . $$
Here, $Q^{(k)}$ is the $k$'th derivative of $Q$. I think I have got the constants right. This is fairly 'explicit' but I don't know if it is sufficiently 'generic'.
