<s>[INST] The parabola with the equation $y=-x^2+4x+8$ is shifted so that it passes through the points (1,1) and (3,5). Find the equation of the new parabola. Given the points $(1,1)$ and $(3,5)$, the vertex form would be:
$1=(1-h)^2+k$  for $(1,1)$  and
$5=(3-h)^2+k$  for $(3,5)$.
With a system of equations, I obtain that $h = 1$ and $k = 1$, so the new formula of the shifted parabola would be: $y=(x-1)^2+1$
What I don't understand is the answer of my exercise sheet, which says that the new equation would be $y= -x^2+6x-4$
Can someone help me understand this?
Thanks
 [/INST] Here's a slightly different approach.
Assuming that a "shift" strictly means a translation, then the vector between points $A = (1,  1)$ and $B = (3, 5)$, which is $\begin{pmatrix} 2 \\ 4 \end{pmatrix}$ is preserved. Thus the following system of equations holds:
$$\begin{cases} b = -a^2 + 4a + 8 \\ b + 4 = -(a + 2)^2 + 4(a + 2) + 8 \end{cases} \tag{2}$$
and this gives $4 = -(a + 2)^2 - (-a^2) + 4(a + 2) - 4a$ or $4 = -4a - 4 + 8 \implies a = 0$, and $b = 8$.
Hence the point $A$ corresponds to $(0, 8)$ on the original quadratic, and so the new quadratic is a translation of $1$ unit to the right and $7$ units down.
Therefore the equation of the new parabola is:
$$y = -(x - 1)^2 + 4(x - 1) + 8 - 7 = -(x^2 - 2x + 1) + 4x - 4 + 1$$
$$ = \boxed{-x^2+ 6x - 4}.$$
</s>