matching a pdf with the formula for normal distribution

The formula for pdf of normal distribution is

$$f(x)= \frac{1}{\sqrt{2\pi\sigma^2}}e^{\frac{-(x-\mu)^2}{2\sigma^2}}$$

and I have a pdf that is: $$ke^{-x^2-7x}$$

But I face a paradox in calculating $$\mu$$

From the formula:

$${2\sigma^2} = 1$$ ______So_____ $${-x^2-7x} = {-(x-\mu)^2}$$ and this gives $$\mu = 0$$ and then there won't be any -7x

can somebody declare it for me?

• The main trick is to complete the square in the exponent. Apr 9, 2019 at 8:50
• @MinusOne-Twelfth Indeed, but the comment after the two answers stating exactly that loses a bit of impact :) Apr 9, 2019 at 9:03
• I mainly put it there in case someone reading wants a "quick highlight". Apr 9, 2019 at 9:07
• @MinusOne I did it, but I couldn't continue Apr 9, 2019 at 9:15

$$ke^{-x^{2}-7x}=ke^{49/4} e^{-(x+\frac 7 2)^{2}}$$. So $$\mu =-\frac 7 2,\sigma=1/{\sqrt 2}$$ and, for the given function to be a pdf, $$k$$ must be such that $$ke^{49/4}=\frac 1 {\sqrt {\pi }}$$.
Completing the square yields $$-(x^2+7x) = -\left(x+\frac{7}{2}\right)^2+\frac{49}{4}$$ so $$\mu$$ can only be $$\mu = -7/2$$. With that in hand, $$k e^{-(x^2+7x)} = k e^{-\left(x+\frac{7}{2}\right)^2+\frac{49}{4}} = (ke^{\frac{49}{4}}) e^{-\left(x+\frac{7}{2}\right)^2} = k' e^{-\left(x+\frac{7}{2}\right)^2}$$ where $$k' = ke^{\frac{49}{4}}$$. Can you finish from there?