Sorry for my bluntness, but what the actual hell is hapening in this proof of $K=\frac{mv^2}{2}$?! I'm reading Mark Levi's Classical Mechanics. Here: 



I am confused at what is happening in that proof. First an indefinite integral becomes a definite one, with a different variable of integration. And then, there are functions $F,v$ of $t$ which are soon replaced with $ma$ and $v$. I guess that in the next step, we use that $a=\frac{dv}{dt}$ and I guess: 
$$\int_{0}^{T}ma \, v\, dt = m \int_{0}^{T} \frac{dv}{dt} \, v\, dt$$
But this seems to suggest that when I have $\frac{dv}{dt}v$, I can pull the $v$ out of the $dv$ and indeed: 
$$\frac{dv}{dt}v=1v=v \quad \quad \quad \quad \quad \quad \frac{d}{dt}v^2=2v$$
From which we can correct by multiplying by $1/2$. I took lectures in calculus and physics but never saw this kind of manipulations before. I have two questions: 


*

*What is actually happening in there? I guess I've been able to guess some of the stuff but I'm a bit confused when the functions $F(t),v(t)$ disappear and are replaced by $ma,v$ respectively. Does this mean that F(t) is a constant function with value $ma$? Also, what is the meaning of the indefinite integral that equals the definite integral? Also, we end up by integrating something that is rewritten as a derivative and then, not integrating at all?!

*What do I need to study to see this kinds of manipulations? Differential equations? It looks like calculus but with more "freedom", fireworks and stunts. I believe I also have the right to get crazy.
 A: Well, this probably belongs more to Physics Stack Exchange, but :
The notation of the problem considers that a constant force $F$ is applied to a particle. By Newton's law, we know that $\sum F = ma \Rightarrow F = ma$ since $F$ is the only force applied to the particle and $ma$ is a stable constant, since $F$ is constant as well. Note that constant acceleration implies varying speed with time.
If you denote by $F(t)$ a function for $F$, then of course since $F$ is stable, then $F(t) := F = ma$.
For moving objects, the quantity of work/time (power) is integrated along the trajectory of the point of application of the force. Thus, at any instant, the rate of the work done by a force (measured in joules/second, or watts) is the scalar product of the force (a vector), and the velocity vector of the point of application. This scalar product of force and velocity is known as instantaneous power. Just as velocities may be integrated over time to obtain a total distance, by the fundamental theorem of calculus, the total work along a path is similarly the time-integral of instantaneous power applied along the trajectory of the point of application.
Now, note that work is the result of a force on a point that follows a curve $X$, with a velocity $v$, at each instant. The small amount of work $δW$ that occurs over an instant of time $\mathrm{d}t$ is calculated as :
$$\delta W = F\mathrm{d}\mathbf{x} = \mathbf{F}\cdot \mathbf{v} \mathrm{d}t$$
If the force is always directed along this line, and the magnitude of the force is $F$, then :
$$W =  \int_C F\mathrm{d}\mathbf{x} = \int \mathbf{F}\cdot \mathbf{v}\mathrm{d}t$$
where $\mathbf{F} \cdot \mathbf{v}$ is the inner product of the vectors of force and velocity and $\mathbf{x}$ is the vector of space. But since we are working on a simple one dimensional problem, it is rather simplified on their one and only coordinate, with respect to time :
$$W= \int F(t)\cdot v(t)\mathrm{d}t =\int F\cdot v(t)\mathrm{d}t$$
Since we are interested for a work calculation in-between two events, let time $t=0$ be the starting event and time $t=T$ the final event, thus :
$$W_T = \int_0^T Fv(t)\mathrm{d}t = \int_0^T mav(t)\mathrm{d}t$$
But, it also is 
$$F = m a = m \frac{{\rm d}v}{{\rm d}t}$$
since acceleration is the derivative of velocity with respect to time. Thus, finally integrating :
$$W_T = \int_0^T m \frac{{\rm d}v}{{\rm d}t} v(t)\mathrm{d}t$$
Now, note that :
$$\frac{\mathrm{d}v(t)^2}{\mathrm{d}t}= 2v(t)\frac{\mathrm{d}v(t)}{\mathrm{d}t}$$
Then, our integral becomes :
$$W_T = \frac{1}{2} \int_0^T m \frac{\mathrm{d}v(t)^2}{\mathrm{d}t} \mathrm{d}t = \frac{1}{2}\Big[mv^2(t)\Big]_0^T $$
Applying the initial values of $v(t)$ now, since the particle was still at $t=0$ with $v(0) = 0$ and it has speed $v$ at time $t=T$, thus $v(T) = v$, one yields the final result.
A: Remember Newton's Law
$$
F = m a = m\frac{{\rm d}^2 x}{{\rm d}t^2} = m \frac{{\rm d}v}{{\rm d}t}
$$
The rest is just a change of variables, assuming that $x = x(t)$ and $x(0) = 0$
$$
W = \int_0^x F(x){\rm d}x = \int_0^t F(t)\frac{{\rm d}x}{{\rm d}t}{\rm d}t = \int_0^t  m \frac{{\rm d}v}{{\rm d}t} v {\rm dt}
$$
Now make a second change of variables $v = v(t)$, and again assume $v(0) = 0$, so that 
$$
W = \int_0^t  m \frac{{\rm d}v}{{\rm d}t} v {\rm dt} = m\int_0^v v {\rm d}v = \frac{1}{2}mv^2
$$
A: Divide the time up into little chunks of time $t_i$, writing $\Delta t$ for $t_{i+1} - t_i$. The work done between a small time gap $t_i$ and $t_i + \Delta t$ is the force applied during that time times the distance. Assuming that $\Delta t$ is sufficiently small that the force and velocity is approximately constant during one time gap, we get that the work during the time gap is approximated by
$$
F(t_i) * (\text{distance between position at time } t_i \text{ and at time } t_{i+1}) = F(t_i)v(t_i)\Delta t.
$$
Adding these all up and taking the limit as $\Delta t$ goes to zero explains why the work is given by the second integral in the chain of equalities (the first, written without bounds, is just physicist-shorthand).
Now $F(t) = m*v'(t)$ is the usual formula for force (assume the mass remains constant as the force is applied). So we have
$$
\int_0^T m v'(t)v(t) dt.
$$
Since $\frac{d}{dt} v^2(t) = 2v(t)v'(t)$ by the chain rule, this is
$$
\frac{m}{2} \int_0^T \frac{d}{dt} v^2(t) dt,
$$
and the result follows from the fundamental theorem of calculus.
