How to evaluate limits having infinity by infinity form After taking an improper integral $\int_0^\infty \dots $ I arrived at 
$$\left({-x^2}e^{-\large\frac{x^2}{2a}}\,-2ae^{-\large\frac{x^2}{2a}}\right)\bigg|_{x=0}^{x=\infty}$$
Now I am trying to evaluate limits $x=0$ to $\infty$. The result should $2a$. How it comes?
 A: I'm assuming you have evaluated an improper integral $\int_0^\infty f(x)$ , for which you need to check the limits of  $F(x)$ (your posted function) as $x\to \infty$, (upper limit) and as $x\to 0$ (lower limit) 
Now, $$\lim_{x\to \infty} \frac{-x^2}{e^{\large\frac{x^2}{2a}}}\,- \frac{2a}{e^{-\large\frac{x^2}{2a}}}= \lim_{x\to \infty} \frac{-x^2 - 2a}{e^{\large\frac{x^2}{2a}}} \text{ has form } \frac {-\infty}{\infty}$$
Using L'Hospital, we have $$\lim_{x\to \infty} \frac{-2x}{\frac{2x}{2a}e^{\large\frac{x^2}{2a}}}= \lim_{x_0\to \infty} \frac {-2a}{e^{\large \frac {x^2}{2a}}} = \large \color{blue}{ \bf 0}$$

$$\lim_{x\to 0} \frac{-x^2}{e^{\large\frac{x^2}{2a}}}\,- \frac{2a}{e^{-\large\frac{x^2}{2a}}} = \frac 01 - \frac{2a}{1} = \large \color{blue}{\bf -2a}$$

$$\left(\frac{-x^2}{e^{\large\frac{x^2}{2a}}}\,- \frac{2a}{e^{-\large\frac{x^2}{2a}}}\right)\bigg|_0^\infty = \left(\lim_{x\to \infty} \frac{-x^2 - 2a}{e^{\large\frac{x^2}{2a}}}\right) - \left(\lim_{x\to 0} \frac{-x^2}{e^{\large\frac{x^2}{2a}}}\,- \frac{2a}{e^{-\large\frac{x^2}{2a}}}\right)= \large \color{blue} {\bf 0 - (-2a) = 2a}$$
A: Noting that 
$$ 1 = e^{0} = e^{-\frac{0^2}{2a}},$$
you get
$$\lim_{x \to 0} -x^2\cdot e^{-\frac{x^2}{2a}}-2a\cdot e^{-\frac{x^2}{2a}} = - 0^2 \cdot e^{-\frac{0^2}{2a}} -2a\cdot e^{-\frac{0^2}{2a}} = 0\cdot 1-2a \cdot 1 = -2a$$ 
