Derivatives of integrals that break the fundamental theorem. Because of this problem:
How to evaluate the following derivative of integral?
I got curious about how to deal with the derivatives of such integrals.  I think this is the simplest example:  $$f(t) = \int_0^t \frac{1}{\sqrt{t-x}} \; dx.$$  The exercise is to find $f^{\prime}(t)$.  (I'm sooooo putting this on my next Calc 1 exam.)  First, the shape of this problem makes a normal person want to use Fundamental Theorem, but that doesn't work.  Second, if you work this out directly, (integrate and differentiate) you get $1/\sqrt{t}$.  I think there is something wrong with this last answer.  
So the question is "How do you differentiate inside such an integral?"  Specifically, assuming the $1/\sqrt{t}$ is correct (that's a secondary question) how could we find $f^{\prime}(t)$ if the integrand were undoable?
 A: Your first problem is that your integrand depends not only on $x$ but also on $t$.  To make it much, much more obvious what the problem is here, consider
$$\frac{d}{dt} \int_0^t t \, dx
 = \frac{d}{dt} \left[t \int_0^t dx\right] = \frac{d}{dt} t^2 = 2t$$
If we tried to blindly apply the FTC formulaically, you might instead get something like
$$\frac{d}{dt} \int_0^t t \, dx \; ``=" t.$$
So, the analytic issues aside, you can't apply the FTC here anyway, at least not directly.

How should things work in general?  Well, say that $F(x, u)$ is a function such that
$$\frac{d}{dx} F(x, u) = f(x, y).$$
So long as there are no weird analysis things going on preventing us from manipulating things formally, we can just crank out what happens directly:
\begin{align*}
\frac{d}{dt} &\int_{a(t)}^{b(t)} f(x, t) \, dx\\
  &= \lim_{h \to 0} \frac{1}{h}\left[\int_{a(t+h)}^{b(t+h)} f(x, t+h) \, dx - \int_{a(t)}^{b(t)} f(x, t) \, dx\right] \\[4mm] 
 &= \lim_{h \to 0} \frac{F(b(t+h), t+h) - F(a(t+h), t+h) - F(b(t), t) + F(a(t),t)}{h} \\[4mm]
 &= \lim_{h \to 0} \frac{F(b(t+h), t+h) - F(b(t), t)}{h} - \lim_{h \to 0}\frac{F(a(t+h), t+h)   F(a(t), t)}{h} \\[4mm]
 &= \frac{d}{dt} F(b(t), t) - \frac{d}{dt} F(a(t), t)
\end{align*}
Applying the multivariate chain rule, that's
$$\left[\frac{\partial F}{\partial x}(b(t), t) b'(t) + \frac{\partial F}{\partial u}(b(t), t)\right] - \left[\frac{\partial F}{\partial x}(a(t), t) a'(t) + \frac{\partial F}{\partial u}(a(t), t)\right]$$
Rearranging and using the definition of $F$, we have
\begin{align*}
\frac{d}{dt} \int_{a(t)}^{b(t)} f(x, t) \, dx &= f(b(t), t) b'(t) - f(a(t), t) a'(t) \\[4mm]
&\qquad + \frac{\partial F}{\partial u}(b(t), t) - \frac{\partial F}{\partial u}(a(t), t)
\end{align*}
What's this last bit?  Well, again assuming there's no analysis happening,
\begin{align*}
\frac{\partial F}{\partial u}&(b(t), t) - \frac{\partial F}{\partial u}(a(t), t)\\[4mm]
&= \lim_{h \to 0} \frac{F(b(t), t+h) - F(b(t), t)}{h} - \lim_{h \to 0} \frac{F(a(t), t+h) - F(a(t), t)}{h} \\[4mm]
&= \lim_{h \to 0} \frac{F(b(t), t+h)-F(a(t), t+h) - F(b(t), t) + F(a(t), t)}{h}\\
&= \lim_{h \to 0} \frac{\displaystyle\int_{a(t)}^{b(t)} f(x, t+h) \, dx - \displaystyle\int_{a(t)}^{b(t)} f(x, t) \, dx}{h}\\[4mm]
&= \lim_{h \to 0} \int_{a(t)}^{b(t)} \frac{f(x, t+h) - f(x, t)}{h} \, dx \\[4mm]
&=\int_{a(t)}^{b(t)}  \lim_{h \to 0} \frac{f(x, t+h) - f(x, t)}{h} \, dx \\[4mm]
&= \int_{a(t)}^{b(t)} \frac{\partial f}{\partial t}(x, t) \, dx
\end{align*}
So, all together, 
$$\bbox[lemonchiffon,border:2px solid black]{\frac{d}{dt} \int_{a(t)}^{b(t)} f(x, t) \, dx = f(b(t), t) \, b'(t) - f(a(t), t) \, a'(t) + \int_{a(t)}^{b(t)} \frac{\partial f}{\partial t}(x, t) \, dx}$$
This is sometimes known as the Liebniz integral rule.

Let's try applying it to my example above
$$\frac{d}{dt} \int_0^t t \, dx = t(1) - t(0) + \int_0^t \, dx = t - 0 + t = 2t$$
Perfect!  Now let's try applying it to your example.
$$\frac{d}{dt} \int_0^t \frac{1}{\sqrt{t-x}} \, dx
 = \frac{1}{\sqrt{t - t}}(1) + \frac{1}{\sqrt{t-0}}(0) -\frac{1}{2} \int_0^t \frac{1}{(t-x)^{3/2}} \, dx$$
Not great -- we have two terms that blow up in opposite directions.  But if we make a slight fix for that issue, we get
\begin{align*}
\frac{d}{dt} \int_0^t \frac{1}{\sqrt{t-x}} 
&= \lim_{u \to t} \left[\frac{1}{\sqrt{t - u}} - \frac{1}{2} \int_0^u \frac{1}{(t-x)^{3/2}} \, dx\right]\\[4mm]
&= \lim_{u \to t} \left[\frac{1}{\sqrt{t - u}} - \frac{1}{\sqrt{t-u}} + \frac{1}{\sqrt{t}}\right] \\[4mm]
 &= \lim_{u \to t} \frac{1}{\sqrt{t}} = \frac{1}{\sqrt{t}}
\end{align*}
