I need some help with the following problem. Many thanks in advance.
Let $f(x) = x^2+px+q$ and $g(x) = x^2+rx+s$. Find an expression for $f(g(x))$ and hence find a necessary and sufficient condition on $a$, $b$, $c$ for it to be possible to write the quartic expression $x^4+ax^3+bx^2+cx+d$ in the form $f(g(x))$, for some choice of values of $p$, $q$, $r$, and $s$.
Okay the first thing I did was to find $f(g(x))$:
$\begin{aligned}f(g(x)) & = (x^2+rx+s)^2+p(x^2+rx+s)+q \\& = x^2(x^2+rx+s)^2+rx(x^2+rx+s)+s(x^2+rx+s)+px^2+prx+ps+q \\& = x^4+rx^3+sx^2+rx^3+r^2+x^2+rsx+sx^2+srx+s^2+px^2+prx+ps+q \\& = x^4+(2r)x^3+(p+2s+r^2)x^2+(2rs+pr)x+s^2+q+ps \end{aligned}$
So we wish to have:
$x^4+(2r)x^3+({p}+2s+r^2)x^2+(2rs+pr)x+s^2+q+ps \equiv x^4+ax^3+bx^2+cx+d$
Comparing the coefficients, $r = \frac{1}{2}a$, $2s = b-\frac{1}{4}a^{2}-{p}$, and $c = r(2s+p)$, thus $c = \frac{ab}{2}-\frac{1}{{8}}a^{{3}} $.
I understand that this condition is 'necessary' -- my problem is that I'm not quite sure how to make it sufficient. I'm not quite sure how I'm supposed to choose some suitable values of p, q, r and s.
Show further that this condition holds if and only if it's possible to write the quartic expression $x^4+ax^3+bx^2+cx+d$ in the form $(x^2+vx+w)^2-k$, for some choice of values v, w, q, r, s.
$\begin{aligned} (x^2+vx+w)^2-k & = x^2(x^2+vx+w)+vx(x^2+vx+w)+w(x^2+vx+w)-k \\& = x^4+vx^3+wx^2+vx^3+vx^2+wvx+wx^2+vwx+w^2-k \\& = x^4+(2v)x^3+(2w+v^2)x^2+(2vw)x+w^2-k. \end{aligned}$
I see that the 'suitable choice' would have been q = 0, but how was I supposed to see that?