Find the remainder when $p(x)$ is divided by $x^2-a^2$ if $p(x)$ leaves remainders $a, -a$ when divided by $x+a, x-a$ 
Let $a\neq0$ and $p(x)$ be a polynomial of degree greater than $2$. If $p(x)$ leaves remainders $a$ and $-a$ when divided respectively by $x+a$ and $x-a$. Find the remainder when $p(x)$ is divided by $x^2-a^2$

$$
p(x)=q(x).(x+a)+r_1=q(x).(x+a)+a\quad\big[r_1=p(-a)=a\big]\\
p(x)=s(x).(x-a)+r_2=s(x).(x-a)-a\quad\big[r_2=p(a)=-a\big]\\
p(x)=t(x).(x^2-a^2)+r=t(x).(x^2-a^2)+Ax+B\\
p(a)=aA+B=-a\\
p(-a)=-aA+B=a\\
B=0,\;A=-1\implies r=Ax+B=-x
$$
I was wondering Is there another way to solve this problem ?

Write $$p(x) = k(x)(x^2-a^2)+bx+c$$
for some $b$ and $c$. Since $$p(-a)=a \Longrightarrow a = -ab+c$$ and since  $$p(a)=-a \Longrightarrow -a = ab+c$$ 
Solving thhis system we get $\boxed{r(x) = -x}$.
