TITLE: How to find the derivative of improper integral with variable upper limit?
QUESTION [7 upvotes]: I have the integral  from $-\infty$ to $y^2$ of the function $(e^{-|x|})$ and I need to find the derivative of this. That is, 
$$\frac{d}{dy} \int_{-\infty}^{y^2} e^{-|x|}\,dx$$
Usually derivative of integral is just the function, but I'm not sure in this case. Should I set up limits or how else should I approach this?
I thought that the derivative of an integral from $-\infty$ to $y^2$ of $(e^{-|x|}dx)$ would be $e^{-|x|}$

REPLY [6 votes]: This is another possible solution
Much more lengthier, but if you would like to know how to derive:
So the integral is:
$$\int_{-\infty}^{y^2} e^{-|x|} dx = \int_{-\infty}^{0} e^{x} dx + \int_{0}^{y^2} e^{-x} dx$$
In this case, it would be easier to find the integral then perform the derivative:
So for the first we have that:
$$\int_{-\infty}^{0} e^{x} dx = \lim_{b\to-\infty}\int_{b}^{0} e^{x} dx \lim_{b\to-\infty}\left[e^x\right]_{b}^{0} = \lim_{b\to-\infty} 1 - e^b = 1- 0 = 1$$
For the second one:
$$\int_{0}^{y^2} e^{-x} dx = \left[-e^{-x}\right]_{0}^{y^2} = -e^{-y^2} - (-e^{0}) = -e^{-y^2} + 1$$
So our final answer is:
$$-e^{-y^2} + 1 + 1 = -e^{-y^2} + 2$$
Taking the derivative, we get:
$$\left(-e^{-y^2}\right)' = 2y*e^{-y^2}$$
Comment if you have questions.