differentiation a integral here is the problem
$\frac{d}{dt} \int_{0}^{t} (t+\tau)^2 d\tau = ?$
this is my calculation
first,let 
$ f(\tau)=(t+\tau)^2 $
$ F(\tau)=\int f(\tau)d\tau $ 
$ F'(\tau)= f(\tau) $
so,
$\frac{d}{dt} \int_{0}^{t} (t+\tau)^2 d\tau  $
$=\frac{d}{dt}(F(t)-F(0)) $
$=F'(t)-F'(0) $
$=f(t)-f(0) $
$=(t+t)^2-(t+0)^2 $
$=2t^2-t^2=t^2$
However,the solution is
$\frac{d}{dt} \int_{0}^{t} (t+\tau)^2 d\tau $             .......................................(1)
$=(t+t)^2+\int_{0}^{t}\frac{d}{\partial t}  (t+\tau)^2 d\tau $.................(2)
$=(t+t)^2+\int_{0}^{t} 2 (t+\tau) d\tau $
$=(t+t)^2+ (2t\tau+\tau^2)|_0^t $
$=4t^2+ (2t^2+t^2) $
$=7t^2$
I have two question,
1.What am I doing wrong with my calculation
2.how to derive equation(2) from equation(1)
Thanks!
 A: This is a simple application of Lebinitz rule and product rule 
$$\frac{d}{dt} \int_{0}^{t} (t+\tau)^{2}d\tau \\ = \frac{d}{dt} \int_{0}^{t}(t^2 + \tau^2 + 2 t \tau)d\tau \\ = \frac{d}{dt}t^2 \int_{0}^{t} d\tau + \frac{d}{dt} \int_{0}^{t} \tau^2 d\tau + 2\frac{d}{dt} t\int_{0}^{t} \tau  d\tau \\ $$ 
Now apply product rule and Lebinitz rule:
 1st integral:
$$2t\int_{0}^{t} 1. d\tau + t^2 \\ =3t^2$$

 2nd integral:
$$t^2 $$

3rd integral
$$2\int_{0}^{t}\tau d\tau + 2t^2 \\ = 2t^2+t^2 \\ = 3t^2$$
 
Finally we have $3t^2 + t^2 + 3t^2 = 7t^2$
To apply Lebinitz rule, the integrand must only contain variable $\tau$.
A: It can be calculated without applying the Leibniz Rule. First we write for every summand an integral.
$$\int_0^t t^2 \, d\tau+ \int_0^t 2t\tau d\tau + \int_0^t \tau ^2d\tau$$
Writing the constant factors in front of the integration sign.
$$t^2 \int_0^t \, d\tau+ 2t\int_0^t \tau d\tau + \int_0^t \tau ^2d\tau$$
$=t^2\left[ \tau \right]_0^t+2t\left[ \frac12\tau^2 \right]_0^t+\left[ \frac13\tau^3 \right]_0^t$
$=t^3+t^3+\frac13\cdot t^3=\frac{7}3 t^3$
Now we can differentiate $f(t)$ w.r.t $t$
$$f'(t)=3\cdot \frac{7}3 t^{3-1}=7t^2$$
A: Here's an answer to your first question:

first,let 
$ f(\tau)=(t+\tau)^2 $
  $ F(\tau)=\int f(\tau)d\tau $ 
$ F'(\tau)= f(\tau) $

We also have a dependency of $F$ on $t$ here. We should rather take
$$f_t(\tau) = (t+\tau)^2$$
$$F_t(\tau) = \int f_t(\tau) \, d\tau$$
$$F_t'(\tau) = f_t(\tau)$$

so, $\frac{d}{dt} \int_{0}^{t} (t+\tau)^2 d\tau  $
$=\frac{d}{dt}(F(t)-F(0)) $
  $=F'(t)-F'(0) $

Don't you think that $F(0)$ looks like a constant? What is the derivative of a constant? It's zero!
But, as I said earlier, $F$ should be replaced with $F_t$, so the derivative is
$$
\frac{d}{dt} \left( F_t(t) - F_t(0) \right)
$$
Now, here's a problem: we need to take the derivative with respect to the index $t$ but how do we do that? Nothing says that we can just use $F_t'.$

$=f(t)-f(0) $
$=(t+t)^2-(t+0)^2 $
$=2t^2-t^2=t^2$

Finally, $(t+t)^2 = (2t)^2 = 4t^2,$ not $= 2t^2.$
