Why is $\frac{d}{dx}\int^\infty_{-\infty}f(x) dx=0$? I came up to this derivative of improper integral:
$\frac{d}{dx}\int^\infty_{-\infty}f(x) dx$
and wolfram alpha tells me that it is zero. I am confused. Could someone please give a proof ot some reference of a proof?
Thank you!
 A: Suppose $$\int_{-\infty}^\infty f(t) \, dt=c,$$
then,
$$\frac{d}{dx} \left[ \int_{-\infty}^\infty f(t) \, dt\right]= \frac{d}{dx}(c)=0$$
A: I see what your confusion is. I think you are trying to apply "differentiation under the integral sign" and swap out the $\frac{d}{dx}$ for the integral to try and get
$$\frac{d}{dx} \int_{-\infty}^{\infty} f(x)\ dx \leftrightarrow \int_{-\infty}^{\infty} \left[\frac{d}{dx} f(x)\right]\ dx$$
and make the latter become
$$\int_{-\infty}^{\infty} f'(x)\ dx$$
and wondering then, "how can the infinite integral of an arbitrary functional derivative be zero?!"
And of course, you are entirely right to wonder about that and find there's something fish about this. The problem is, this manipulation is not valid because in this case the "$x$" on the inside of the integral is not the same thing as the "$x$" on the outside of the integral. To understand this requires we obtain a bit more conceptual clarity on just what exactly the integral means as well as what the status is of the variable(s) involved. Effectively, the integral
$$\int_{-\infty}^{\infty} f(x)\ dx$$
is a number, in particular, it is the result of evaluating a functional - a function that eats a function and pops out a number, which here we may call as "$I_\mathrm{infinite}$" on the function $f$ of one variable, $x$ (or function from $\mathbb{R}$ to $\mathbb{R}$). What that thing above really is is the number
$$N = I_\mathrm{infinite}[f]$$.
Note that there is no "$x$" in this expression. It appeared only as a notational convenience from Leibniz's integral notation. This last expression is closer to what is actually going on structurally. In fact, if you want to be very strict, since differentiation is also another "function of a function", only here an operator (it spits out another function), you could say that it is actually illegal to differentiate the above number, in the same sense it is illegal to do the operation
$$5 + \mathrm{Meow!}$$
where $\mathrm{Meow!}$ is not a variable symbol, but actually a symbol representing the sound a cat makes, since there is no such object within the real numbers (well, even tighter, squared real numbers) which constitute the domain of the $+$ operation.
That said, in mathematics, alas, notation is not as tight as it could be to be fully unambiguous and formal, as it might be in a computer programming language - and one of the things I heard once was that computer programming strives to be "more like math", because "math is the nicest realm to work in", and I acknowledge that, but also acknowledge that math could benefit perhaps from being a bit more like computer programming. The two are so intimately intertwined that we should wonder, why not? (Moreover, it could help greatly in facilitating the pedagogy of the two. The computer provides a real experimental environment, and having a more 1:1 correspondence with that and math could be very useful for illustrating and illuminating these concepts and their connections.)
Thus what effectively happens when you write
$$\frac{d}{dx} 2$$
say, which is "allowed", is that the $2$ gets "promoted" implicitly (in computer programming, we call this a type coercion) from a number to a constant function
$$x \mapsto 2$$
(this notation defines what is called an anonymous function - in particular, it is the way you write a function without naming a function symbol or variable like $f(x)$ to refer to it in the same way you don't need to write a variable like $x = 2$ every time you want to write the number "$2$", e.g. I don't have to say $x = 2$ to then talk about "2" in the sentence "Xe ate 2 apples".)
Then the differentiation goes through as
$$\frac{d}{dx} [x \mapsto 2]$$
it accepts the anonymous constant function, and the constant function differentiates to zero, and we write
$$\frac{d}{dx} 2 = 0$$.
And it's all nice and good we hide those intermediate steps, and such abuses/slops are very useful and convenient, until of course you get into something like this - and thus you need to be aware that's what they are. Going on this logic, when you differentiate "$\int_{-\infty}^{\infty} f(x)\ dx$" "with respect to $x$", what happens is this number first gets promoted to a constant function of $x$ and then differentiated to $0$.
A: An integral is essentially a summation over infinitely thin $\text{d}x$ strips for your function $f(x)$.  To illustrate that point, I can write approximately:
$$\int_{-\infty}^{\infty}f(x)\text{d}x \approx \sum_{-\infty}^{\infty}{f(x)}\Delta x = A$$
where $\Delta x$ is a small width, and where $A$ is some number that isn't  a function of $x$.  The figure below illustrates what an integral does - it takes an infinite number of those infinitely thin rectangles and sums them over the specified range (which is why the integral under a curve corresponds to the area).

Since you're summing over a range of specified $x$ (in this case the entire real domain of $x$), the output is no longer a function of $x$, and so its derivative is $0$.
If however the limits did have some $x$ dependence, then the answer would be different, though strictly, you should change the "dummy" variables that appear inside the integral, which disappear when the integral is solved, e.g.
$$\int_{-g(x)}^{g(x)}f(x')\text{d}x'$$
A: $$\frac{d}{dx}\int_{-\infty}^\infty f(x)dx=f(\infty)-f(-\infty)$$
if the function is even or $\lim_{x\to \infty}f(x)=\lim_{x\to -\infty}f(x)$ then $f(\infty)=f(-\infty)$ so the two parts will cancel.
Ignore the notation of $f(\infty)$ and presume it to mean $\lim_{x\to \infty}f(x)$.
