How to express $2x^3-x^2-3x+2$ as a linear combination of Legendre polynomials I have used the formula
\begin{align}p_0(x)&=1\\
p_1(x)&=x\\
p_2(x)&=\frac12(3x^2−1)\\
p_3(x)&=\frac12(5x^3−3x)
\end{align}
$$2x^3-x^2-3x+2=Ap_3(x)+Bp_2(x)+Cp_1(x)+Dp_0(x)$$
EDIT-
\begin{align}&=\frac A2(5x^3−3x) + \frac B2(3x^2−1) + Cx +D \end{align}
but don't know how to continue after this.
 A: First get the $x^3$ term right. That will set A. That is $4/5$. Then do the quadratic to set B, and so on.
Edit: the coefficient of $x^3$ on both sides are 2 and $5/2*A $. Set these equal to solve for A.
A: Continuing from your steps, we compare the coefficients of each term on the L.H.S and R.H.S.
$$2x^3-x^2-3x+2=\dfrac A2(5x^3−3x) + \dfrac B2(3x^2−1) + Cx +D$$
So, $$ 2x^3-x^2-3x+2=\dfrac{5}{2}Ax^3+\dfrac{3}{2}Bx^2+(C-\dfrac{3}{2}A)x+(D-\dfrac{B}{2})$$


*

*For the $x^3$ term, we have
$\dfrac{5}{2}A=2 \Rightarrow A=\dfrac{4}{5}$

*For the $x^2$ term, we have 
$\dfrac{3}{2}B=-1 \Rightarrow B=\dfrac{-2}{3}$

*For the $x$ term, we have 
$C-\dfrac{3}{2}A=-3 \Rightarrow C-\dfrac{3}{2}\cdot\dfrac{4}{5}=-3 \Rightarrow C-\dfrac{6}{5}=-3 \Rightarrow C=\dfrac{6}{5}-3\Rightarrow C=\dfrac{-9}{5}$

*For the constant term, we have
$D-\dfrac{1}{2}B=2 \Rightarrow D-\dfrac{1}{2} \cdot \dfrac{(-2)}{3}=2 \Rightarrow D=2-\dfrac{1}{3} \Rightarrow D=\dfrac{5}{3}$
A: In matrix form,
$$\begin{bmatrix} p_0\\ p_1\\ p_2\\ p_3\end{bmatrix} = \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ -\frac{1}{2} & 0 & \frac{3}{2} & 0\\ 0 & -\frac{3}{2} & 0 & \frac{5}{2}\end{bmatrix} \begin{bmatrix} 1\\ x\\ x^2\\ x^3\end{bmatrix}$$
We want to find a weight vector $\mathrm{w}$ such that
$$2 x^3 - x^2 - 3 x + 2 = \begin{bmatrix} w_0\\ w_1\\ w_2\\ w_3\end{bmatrix}^T \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ -\frac{1}{2} & 0 & \frac{3}{2} & 0\\ 0 & -\frac{3}{2} & 0 & \frac{5}{2}\end{bmatrix} \begin{bmatrix} 1\\ x\\ x^2\\ x^3\end{bmatrix}$$
and, thus, we have to solve the linear system
$$\begin{bmatrix} 2\\ -3\\ -1\\ 2\end{bmatrix}^T = \begin{bmatrix} w_0\\ w_1\\ w_2\\ w_3\end{bmatrix}^T \begin{bmatrix} 1 & 0 & 0 & 0\\ 0 & 1 & 0 & 0\\ -\frac{1}{2} & 0 & \frac{3}{2} & 0\\ 0 & -\frac{3}{2} & 0 & \frac{5}{2}\end{bmatrix}$$
or, in a more standard form,
$$\begin{bmatrix} 1 & 0 & -\frac{1}{2} & 0\\ 0 & 1 & 0 & -\frac{3}{2}\\ 0 & 0 & \frac{3}{2} & 0\\ 0 & 0 & 0 & \frac{5}{2}\end{bmatrix} \begin{bmatrix} w_0\\ w_1\\ w_2\\ w_3\end{bmatrix} = \begin{bmatrix} 2\\ -3\\ -1\\ 2\end{bmatrix}$$
The solution is
$$\frac{5}{3} \, p_0 (x) - \frac{9}{5} \, p_1 (x) - \frac{2}{3} \, p_2 (x) + \frac{4}{5} \, p_3 (x) = 2 x^3 - x^2 - 3 x + 2$$
A: Another approach. Through the orthogonality of Legendre polynomials, if 
$$ f(x) = \sum_{k=0}^{3}c_k\cdot P_k(x)\tag{1} $$
we have:
$$\forall k\in\{0,1,2,3\},\qquad  c_k = \frac{2k+1}{2}\int_{-1}^{1}f(x)\,P_k(x)\,dx. \tag{2}$$
