# Find the equation of the tangent to the curve with exponential function

The question is as follows: Find the equation of the tangent to the curve $y = xe^{2x}$ at the point $(\frac{1}{2}, \frac{e}{2})$.

Now I figured out that $\frac{dy}{dx} = e^{2x}(2x+1)$, and that when I plug in $x=1/2$ then I get that the slope = $2e$.

So at this point I have the original curve's equation, the equation of its differential, the fact that the slope of the tangent at the given point is $2e$ and that this tangent also passes through the point $(\frac{1}{2}, \frac{e}{2})$. But I can't seem to arrive at the equation of this tangent.

$$y = 2ex - \frac{e}{2}$$

but how they got there, I don't know. I've checked other find the equation of a tangent line to a curve questions, but still haven't figured my way to that answer. It seems there's something wrong with my assumption that the equation of the tangent line is of the form $y=mx+c$. But how do I know which form it should take?

## Edit

Sorry - I'd written the target answer above wrong. I edited it to correct it.

-
 Do you mean $2ex-e/2$? – Michael Albanese Jan 31 at 10:58 I think it should be $2ex-\frac{e}{2}$ so that it passes through $(\frac{1}{2},\frac{e}{2})$. – Strin Jan 31 at 11:13 That that you say is the answer can't possibly be correct as it is not the equation of a straight line... – DonAntonio Jan 31 at 12:49 You're right... it was 2ex not e^x, I've edited the question. But even with this I seem to be making some fundamental mistake and can't arrive at it! – user60395 Jan 31 at 13:43

The equation of a line of slope $m$ passing through a point $(x_0,y_0)$ is
$$y-y_0 = m (x - x_0)$$
Here, $m=2 e$, $x_0 = \frac{1}{2}$, and $y_0 = \frac{e}{2}$. Plug away.