<s>[INST] Common tangent lines of two quadratic functions Find all such lines that are tangent to the following curves:
$$y=x^2$$ and $$y=-x^2+2x-2$$
I have been pounding my head against the wall on this. I used the derivatives and assumed that their derivatives must be equal at those tangent point but could not figure out the equations. An explanation will be appreciated.
 [/INST] 
Let $f(x) = x^2$  and  $g(x) = -x^2 + 2x - 2 \implies \dfrac{d}{dx}(f(x))|_{x = a} = 2a$ and $\dfrac{d}{dx}(g(x))|_{x = b} = -2b + 2$
$2a = -2b + 2 \implies a = 1 - b \implies$
$A: (1 - b, (1 - b)^2), B: (b, -b^2 + 2b - 2) 
\implies m_{AB} = \dfrac{2b^2 - 4b + 3}{1 - 2b} = -2b + 2 \implies $
$2b^2 - 2b - 1 = 0 \implies b = \dfrac{1 \pm \sqrt{3}}{2}$
Using $b = \dfrac{1 + \sqrt{3}}{2} \implies $
$A: (\dfrac{1 - \sqrt{3}}{2},\dfrac{2 - \sqrt{3}}{2}), B: (\dfrac{1 + \sqrt{3}}{2},\dfrac{\sqrt{3} - 4}{2}) \implies m_{AB} = 1 - \sqrt{3} \implies $
$ \boxed{y = (1 - \sqrt{3})x + \dfrac{\sqrt{3} - 2}{2}} $ 
Using $b = \dfrac{1 - \sqrt{3}}{2} \implies A^{'}: (\dfrac{1 + \sqrt{3}}{2}, \dfrac{2 + \sqrt{3}}{2}), B^{'}: (\dfrac{1 - \sqrt{3}}{2}, \dfrac{-\sqrt{3} - 4}{2}) \implies$
$m_{A^{'}B^{'}} = 1 + \sqrt{3} \implies \boxed{y = (1 + \sqrt{3})x - \dfrac{\sqrt{3} + 2 }{2}}. $ 
</s>