Show that the tangent to the curve \(y = (x+k)^2\) at the point where \(x = 2k\) is \[ y + 3k^2 = 6kx. \]

We have \(y = (x+k)^2 = x^2+2kx+k^2\), and so \(\dfrac{dy}{dx}= y' = 2x + 2k\). (If you know the chain rule, you can alternatively use this here.)

This tells us that when \(x = 2k, y = 9k^2\), and \(y' = 6k\). So the gradient of the tangent is \(6k\).

We can write the equation of the tangent as \(y = 6kx+c\), and we know that the point \((2k, 9k^2)\) is on the line, so \[9k^2 = 12k^2 +c \implies c = -3k^2 .\]

Thus the equation is \(y = 6kx - 3k^2\) or, after rearranging, \[\begin{equation}\label{eq:given-form-for-tangent} y + 3k^2 = 6kx, \end{equation}\]

as required.

This tangent meets the \(x\)-axis at \(P\) and the \(y\)-axis at \(Q\). The mid-point of \(PQ\) is \(M\).

Find the co-ordinates of \(M\) in terms of \(k\) and hence deduce the equation of the locus of \(M\) as \(k\) varies.

From \(\eqref{eq:given-form-for-tangent}\), the coordinates of \(Q\) are just \((0,-3k^2)\). Similarly, the \(x\)-coordinate of \(P\) is given by \[0 = 6kx - 3k^2,\] and so \(x = \dfrac{k}{2}\). Thus, the coordinates of \(P\) are \(\left( \dfrac{k}{2}, 0 \right)\).

The midpoint of the line segment \(PQ\) is thus \[\left(\dfrac{0+k/2}{2}, \dfrac{-3k^2+0}{2} \right) = \left( \dfrac{k}{4}, -\dfrac{3k^2}{2} \right).\]

To find the locus of \(M\), we need to eliminate \(k\) here. So if \((x,y)\) is on the locus of \(M\), \[x = \dfrac{k}{4} \implies k = 4x,\quad y = -\dfrac{3k^2}{2} \implies y = -24x^2.\]

Now we have the locus of \(M\) as \(k\) varies; a vertex-up parabola, with its maximum at the origin. You can observe the locus in the following applet by varying \(k\).