Finding the tangent line that intersects a quartic at two points. I'm trying to find a straightforward calc solution to this question. I found an algebraic solution but I don't think it's the quickest way to do it. Thanks in advance!
Find the linear function $g(x)=mx+b$ whose graph is tangent to the graph of $f(x)=x^4-6x^3+13x^2-10x+7$ at two points.
Here's my algebraic solution: Let $(x_1,f(x_1))$ and $(x_2,f(x_2))$ be the points where $g(x)$ is tangent to $f(x)$. Let's form the function $h(x)=f(x)−g(x)$, so $h(x)=x^4−6x^3+13x^2−(10+m)x+7−b$. The zeros of $h(x)$ are $x=x_1$ and $x=x_2$and we also know that $h(x)≥0$ for all $x$. What's nice is that $h(x)$ can also be written as $h(x)=(x−x_1)^2(x−x_2)^2$. We can expand this to get $h(x)=x^4−2(x_1+x_2)x^3+(x^2_1+4x_1x_2+x^2_2)x^2−2(x^2_1x_2+x_1x^2_2)x+x^2_1x^2_2$. By comparing the two forms of $h(x)$ we can get that $x_1=1$ and $x_2=2$ (or vice versa) and therefore $m=2$ and $b=3$. I want to see a calc solution since this question appeared on a calc test.

Let $h(x)=f(x)-g(x)$ be the distance between the functions. Note that $h(x)$ is a monic quartic polynomial. If the tangent line $g(x)$ intersects the graph of $f(x)$ at $x=c$ and $x=d$, then $h(x)$ must vanish $x=c$ and $x=d$, so the monomials $x-c$ and $x-d$ divide $h(x)$.
Additionally, since the derivatives of $f(x)$ and $g(x)$ match at $x=c$ and $x=d$, the derivative of $h'(x)$ must vanish there as well. This means $h(x)$ must be divisible by at least $(x-c)^2$ and $(x-d)^2$. The only such monic quartic is $h(x)=(x-c)^2(x-d)^2$.
Thus we are seeking $c$ and $d$ such that 
$$(x-c)^2(x-d)^2=x^4-2(c+d)x^3+(c^2+d^2-4cd)x^2-2(cd^2+c^2d)x+c^2d^2\\=x^4-6x^3+13x^2-10x+7-(mx+b)$$
So from the cubic term we have $c+d=3$, and the quadratic term gives $c^2+d^2-4cd=13.$ Substitution yields a quadratic with solutions $c=1,2$. Then $12=m+10$ so $m=2$, and $7-b=4$ so $b=3.$ Thus $g(x) = 2x+3.$
