If the lines x+y=a and x-y=b touch the curve

Question:

If the lines $x+y=a$ and $x-y=b$ touch the curve $y=x^{2}-3 x+2$ at the points where the curve intersects the $x$-axis, then $\frac{a}{b}$ is equal to

Solution:

The given curve $y=(x-1)(x-2)$, intersects the $x$-axis at $A(1,0)$ and $B(2,0)$.

$\therefore \frac{d y}{d x}=2 x-3 ;\left(\frac{d y}{d x}\right)_{(x=1)}=-1$ and $\left(\frac{d y}{d x}\right)_{(x=2)}=1$

Equation of tangent at $A(1,0)$,

$y=-1(x-1) \Rightarrow x+y=1$

Equation of tangent at $B(2,0)$,

$y=1(x-2) \Rightarrow x-y=2$

So $a=1$ and $b=2$

$\Rightarrow \frac{a}{b}=\frac{1}{2}=0.5$