# The line with equation $y=4x+c$ is a tangent to the curve with equation $y=x^2-x-5$

The line with equation $y=4x+c$ is a tangent to the curve with equation $y=x^2-x-5$. Find the value of $c$.
I did it
$y=x^2-x-5$
$4=2x-1$
$\frac{5}{2}=x$

$x=\frac{5}{2}$
$=(\frac{5}{2})^2-\frac{5}{2}-5$
$=-\frac{5}{4}$

I got $-\frac{5}{4}$ but the right answer is $-\frac{45}{4}$
Help me out!

-
Since this is the umpteenth time I've had to retag your questions: "differential equations" do not mean what you think they mean. Questions like this could just be tagged calculus. –  Ｊ. Ｍ. Jul 16 '12 at 8:24

$$y = \left ({5 \over 2} \right )^2 - \left (5 \over 2 \right ) - 5 = 4\left (5 \over 2 \right ) + c \implies c = -45/4$$
Alternatively, $$4x + c = x^2 - x - 5 \\ x^2 -5x - (5+c) = 0 \\$$ Tangency implies only one solution, therefore $$(-5)^2 - 4 (-(5+c)) = 0 \\ 25+20 + 4c = 0 \\ c = -{45 \over 4}$$