What is $\frac{d}{dx}\infty$? Is $\frac{d}{dx}\infty$ undefined or $0$?
I ask this question because I want to show my friend an easy example that one cannot switch the order of differentiation and integration in general.
My example is
$$\frac{d}{dx}\int_0^\infty tdt = \frac{d}{dx}\infty = \text{undefined}$$
while
$$\int_0^\infty \frac{dt}{dx}dt=\int_0^\infty0dt=0$$
Is my example valid?
If no, is there any standard and easy example to show that
$$\frac{d}{dx}\int_a^b\ne \int_a^b\frac{d}{dx}$$
in general?
 A: Differentiation is defined for functions $f:\mathbb R\to\mathbb R$ (actually, there are way more general types of derivatives, but this would lead us too far afield). Since $\infty$ is not in $\mathbb R$, we cannot take the derivative of the function $f(x)=\infty$.
I assume that your goal is to show that there is a function $f(x,t)$ so that $$\frac{d}{dx}\int_a^b f(x,t)\,dt\neq \int_a^b\frac{d}{dx}f(x,t)\,dt.$$
Such a counterexample can be found here in the answer by @RobertIsrael.
A: In most cases you can, in fact, differentiate under the integral sign; check the Wikipedia article. For a counterexample, you need to find rather exotic functions (i.e. functions that do not satisfy the (continuity) conditions in the Wikipedia theorem). You probably won't easily come up with one yourself.
I don't see the use in copying someone else's example, so I'll just refer to this article; you can find a counterexample on page 3. Let me know if anything is unclear to you.
A: Well, if we just look at our definitions and see if they still work on infinity, we get:
$$\frac{d}{dt}\infty =\lim_{h\rightarrow 0} \frac{\infty-\infty}{h}.$$
And we then see the trouble: $\infty-\infty$ isn't defined. Worse, the reason $\infty-\infty$ isn't defined is that there are sequences $a_n$ and $b_n$ both tending to infinity such that $a_n-b_n$ tends to any extended real number - that is, the form $\infty-\infty$ is truly indeterminate. This means that we should regard the above derivative to be indeterminate as well. Perhaps more importantly, we would lose linearity if we tried to assign $\frac{d}{dx}\infty$ a finite value, since we'd have $f(x)+\infty=\infty$ but then $\frac{d}{dx}\infty = \frac{d}{dx}(f(x) + \infty)$ wouldn't equal $\frac{d}{dx}f(x) + \frac{d}{dx}\infty$.
Your example does tell us that being able to differentiate under the integral does not necessarily imply that we can differentiate outside the integral, but it says noting about what happens when we can do both.
As was noted in @AlexS's answer, there is a post on MO by @RobertIsrael constructing a counterexample.
A: This started out as a comment but it might be valid as an answer.
The short answer is that I feel $\frac{d}{dx} \infty$ is undefined. 
The long answer comes from Rudin's 3rd Edition of Principles of Mathematical Analysis. Assuming you take $\infty$ to mean what it does here...

Definition 1.23 [p. 11] The extended real number system consists of the real field $\mathbb{R}$ and two symbols, $+\infty$ and $-\infty$. We preserve the original order in $\mathbb{R}$ and define $$-\infty < x < +\infty$$ for every $x \in \mathbb{R}$.

Definition 5.1 [p.103-104]: Let $f$ be defined (and real-valued) on $[a,b]$. For any $x \in [a,b]$ for the quotient $$\phi(t) = \frac{f(t)-f(x)}{t-x} \qquad (a<t<b, t\neq x),$$
and define $f'(x) = \lim_{t\to x} \phi(t)$ provided this limit exists. We thus associate with the function $f$ a function $f'$ whose domain is the set of points $x$ at which the limit above exists; $f'$ is called the derivative of $f$. 
[...] 
If $f$ is defined on a segment $(a,b)$ and if $a<x<b$, then $f'(x)$ is defined by the above defintion of a derivative. But $f'(a)$ and $f'(b)$ are not defined in this case.

Those definitions are taken verbatim, and the last, boldfaced line is my argument for why $\frac{d}{dx} \infty$ is undefined.
