I am working through a pure maths book as a hobby. This question puzzles me.
The line y=mx intersects the curve $y=x^2-1$ at the points A and B. Find the equation of the locus of the mid point of AB as m varies.
I have said at intersection:
$mx = x^2-1 \implies x^2 - mx - 1=0$
Completing the square:
$(x-\frac{m}{2})^2-\frac{m^2}{4}= 1$
$(x-\frac{m}{2})^2 = 1 + \frac{m^2}{4}$
$x-\frac{m}{2} = \sqrt\frac{4+m^2}{4} = \frac{\pm\sqrt(4+m^2)}{2}$
x-coordinates for points of intersection are
$x= \frac{-\sqrt(4+m^2) +m}{2}$ and $x= \frac{\sqrt(4+m^2)+m}{2}$
$\implies$ x-co-ordinate of P is mid-way between the two above points, namely $\frac{2m}{2} = m$
So $x=m, y = mx = m^2\implies y = x^2$
But my book says $y=2x^2$
If $x_1$ and $x_2$ are x-coordinates of intersection points, x-coordinate of midpoint,
$x_m = \frac{x_1 + x_2}{2} = \frac{m}{2}$
$y = mx \implies y_m = 2 x_m^2$ so locus of midpoint is $y = 2 x^2$.
Your approach is correct but note that you can also get to it quickly using Vieta's formula for quadratic equation.
If $ax^2+bx+c = 0, x_1 + x_2 = - \frac{b}{a}, \ x_1 \ x_2 = \frac{c}{a}$
(where $x_1$ and $x_2$ are roots of the quadratic)
Here we have, $x^2 - mx - 1=0 \implies x_1 + x_2 = m \ $ so $x_m = \frac{m}{2}$.