Simple question concerning integrals and derivatives I have a question about integrals and derivatives. It concerns the proof of the formula of the energy stored in a capacitor. The formula is $E = \frac{1}{2}C.V^2$ where $E$ is the energy stored, $C$ the capacitance (a scalar constant), and $V$ is the voltage applied on the capacitor.
Here is the proof, as presented in many physics textbook: we charge the capacitor during a time $t$, leading its voltage to go from $0$ to $V$. We note $P(t)$ the power, $U(t)$ the voltage accross the capacitor (going from $0$ at time = 0 to $V$ at time = $t$), and $I(t)$ the current flowing through the capacitor. We have the capacitor formula: $I(t) = C.\frac{dU}{dt}(t)$, where $C$ is a scalar constant.
\begin{align*}
P(t) &= U(t)\cdot I(t) \\
&= C\cdot U(t)\cdot\frac{dU}{dt} \\
\rightarrow dE &= C\cdot U(t)\cdot dU \\
\rightarrow \int_{0}^{t}{dE} &= \int_{0}^{V}{C\cdot U(t)\cdot dU} \\
\rightarrow E &= \frac{1}{2}C\cdot V^2
\end{align*}
I do not understand two things. The first is: why do we write $\frac{dU}{dt}$ instead of $\frac{dU}{dt}(t)$, because $\frac{dU}{dt}$ is the derivative of $U$ hence it is also a function of the variable $t$?
The second is: we have $P(t) = C.U(t).\frac{dU}{dt}(t)$ hence $E = \int_{0}^{t}{P(t).dt} = \int_{0}^{t}{C.U(t).\frac{dU}{dt}(t).dt}$. I thought we could not have the same $t$ as an integral bound and as the variable $dt$? Is it also legal to multiply by $dt$ and to simplify $\frac{dU}{dt}(t).dt$ by $dU(t)$? But what will be the meaning of $dU(t)$? It is not a derivative anymore, so what is it?
If we do this simplification, we end up with $E = \int_{0}^{t}{C.U(t).dU(t)}$, what is the meaning of such an integral, we now integrate with $dU(t)$ and not a simple $dU$, it seems weird. By the way, how can we exchange $\int_{0}^{t}$ by $\int_{0}^{V}$ ?
Thank you very much for your help. How can we write a rigorous proof of this formula?
 A: You're right that the notation is exceedingly sloppy/confusing. When people use the Leibniz notation $dy/dt$ for derivatives, they essentially never write the $(t)$ you're asking for, because it's "obvious" that we're considering this as a function of $t$. On the other hand, when they write the chain rule
$$\frac{dy}{dt}=\frac{dy}{dx}\,\frac{dx}{dt},$$
they are totally sloppy when they do not "remind" you that $dy/dx$ is evaluated at $x(t)$.
That said, they should have written $P(t)=CU(t)\frac{dU}{dt}$, and, since $P=\frac{dE}{dt}$, they have
$$\frac{dE}{dt} = CU(t)\frac{dU}{dt}.$$
Now we integrate both sides with respect to $t$, from $0$ to $T$ (yes, you're right that it's sloppy and sometimes leads to bad errors to confuse the dummy variable of integration with the limit of integration).
$$\int_0^T \frac{dE}{dt}dt = \int_0^T CU(t)\frac{dU}{dt}dt.$$
By the Fundamental Theorem of Calculus, we get
$$E(T)-E(0) = \frac12\big(U(T)^2 - U(0)^2\big).$$
I guess they are "assuming" that $E(0)=U(0)=0$, and they're writing simply $E=E(T)$ and $V=U(T)$.
EDIT: To make this explicit in general, suppose $\Phi(x)$ is an antiderivative of $\phi(x)$. Then, substitution of $u=g(x)$ in the integral gives:
$$\int_a^b \phi(g(x))g'(x)\,dx = \int_{g(a)}^{g(b)} \phi(u)\,du = \Phi(g(b))-\Phi(g(a)).$$
Why is this $du = g'(x)\,dx$ valid? Well, let's check that $\Phi(g(x))$ has the right derivative: $\frac d{dx} \Phi(g(x)) = \Phi'(g(x))g'(x) = \phi(g(x))g'(x)$, as desired. That is, $\Phi(g(x))$ is indeed an antiderivative of $\phi(g(x))g'(x)$.
In the case of your given application,
$$\int_0^T U(t)\frac{dU}{dt}dt = \int_0^V U\,dU = \frac12 V^2,$$
because
$$\frac d{dt} \tfrac12 U^2 = U\frac{dU}{dt}.$$
This is what explains the usual formal substitution $dU = \frac{dU}{dt}dt$.
