Why is differential work given as $dW=\vec{F}\cdot d\vec{r}$? Why is differential work given as $$dW=\vec{F}\cdot d\vec{r}~?$$ Because, as I know the work done by a constant force is given as $W=\vec{F}\cdot\vec{r}$, so if the point of application of force is not moving in a straight line with the force acting on the point of application being variable too, then shouldn't the differential work be given as $d{W}=d(\vec{F}\cdot\vec{r})=\vec{F}\cdot d\vec{r}+d\vec{F}\cdot\vec{r}$. I know that the second term kind of feels out of place but why is it that it is not included in the expression of the differential work?
 A: It looks like you haven't accepted an answer yet so I will throw my hat in the ring. As a point of terminology let me define the $\Delta$ operator between two situations that we will call 0 and 1, so that for any symbol $X$ we have $\Delta X = X_1 - X_0.$ (So there is an original position $\vec r_0$ and a final position $\vec r_1$ and $\Delta \vec r = \vec r_1 - \vec r_0;$ similarly there is an original/final kinetic energy $K = \frac12 m v^2.$)
What matters is not some formula $W = \vec F \cdot \vec r$ or so, what matters is the formula $W = \Delta K,$ work is a change in kinetic energy. If you don't preserve the work-energy theorem then any definition of work is useless!
You are correct that for a constant force the formula that arises from this is $W = \vec F \cdot \Delta \vec r,$ where $\Delta \vec r = \vec r_1 - \vec r_0$ is the distance that the object has gone under this work. If (and it's a big if!) you choose the origin of your coordinates to start at $\vec 0 = \vec r_0,$ then you will certainly get the formula you specified. For other origins, the work-energy theorem must never be written as $\vec F\cdot\vec r$ without the $\Delta$. (Just imagine if we choose $\vec 0$ to be somewhere in the Andromeda Galaxy so that $|\vec r_1| \approx |\vec r_0| \approx \text{2.5 M light-years}$ to see why. A puny 1-newton force would have to correspond to like 1022 J, which is huge—something like the amount of energy the Earth receives from the Sun every day. So it has to be a difference between the starting and ending points, not some origin-dependent number, if it's going to be physically meaningful.)
Now, you ask, what if the force is not constant? I'll do you one better: what if there are also multiple forces? We have Newton's law, $$m \frac{d\vec v}{dt} = \sum_i \vec F_i~~,$$and I will invite you to dot both sides with $\vec v$ to find $$m \frac{d\vec v}{dt}\cdot \vec v = \sum_i \vec F_i\cdot\vec v~~,$$and these terms $P_i = \vec F_i \cdot \vec v$ could be called the power expended by force #$i$. So much for the right-hand side. What about the left hand-side? To do this, observe that due to the same product rule that you want to apply above, $$\frac{d}{dt} v^2 = \frac{d}{dt} (\vec v \cdot \vec v) = \frac{d\vec v}{dt} \cdot \vec v + \vec v \cdot \frac{d\vec v}{dt} = 2 \frac{d\vec v}{dt}\cdot \vec v.$$Now normally we write equations forward to back, like "you start on the left and you end up on the right", and I did that above because I want you to follow the derivative with respect to time that way. However these things are equal and therefore you can also follow the logic from the right hand side back to the left-hand side. And that's precisely what I want you to do. Assuming $\frac{dm}{dt} = 0$ is the last step, yielding:$$\frac{d}{dt}\left(\frac12 m v^2\right) = \frac {dK}{dt} = \sum_i \vec F_i \cdot \frac{d\vec r}{dt}.$$This is just the differential form of the work-energy theorem and now all doubts should be soothed; $P_i = \vec F_i \cdot \vec v,$ the power expended by a force, is precisely the term which tends to increase or decrease kinetic energy.
We can go one further of course; as the left-hand side indicates, a time integral is appropriate here, yielding$$\Delta K = \sum_i \int_{t_0}^{t_1} dt~\vec F_i(t) \cdot \frac{d\vec r}{dt}.$$However as long as the particle does not come back to the same point twice (or even if it does, as long as we're very careful about how we perform the integral, splitting it piecewise around these points) we can regard $\vec F$ as depending not upon $t$ but upon the position $\vec r(t)$ that the particle is located at at this time, in which case we see the familiar $u$-substitution rule that $\int dx~f(x)~\frac {du}{dx} = \int du~f(x(u)).$ It trivially holds for the dot-product and vectors too, since we define the line-integral as parameterizing the path as $\vec r(s)$ for $s : 0 \to 1$ and then $$\int_{\vec r(0)}^{\vec r(1)} d\vec r \cdot \vec f(\vec r) = \int_0^1 ds~\vec f(\vec r(s)) \cdot \frac{d\vec r}{ds}.$$ We basically just substitute $s = (t - t_0)/(t_1 - t_0)$ to get the equivalence. Therefore:$$\Delta K = \sum_i \int_{\vec r_0}^{\vec r_1} d\vec r \cdot \vec F_i = \Sigma_i W_i,$$ where $W_i = \int_{\vec r_0}^{\vec r_1} d\vec r \cdot \vec F_i$ is the "partial work" done by one of the forces.
That's why this is the right definition of "work" to fit the work-energy theorem, and it is fully compatible with time-varying forces. I like to advertise to kids that energies are thus a "different way of thinking about Newton's laws," which turns out to be profoundly true.
With that said the equations of motion will be very complicated from this energy-perspective if $\vec F_i$ does not have its usual "hey, it doesn't matter what $t$ actually is!" conservative character to it (like $1/r^2$ force laws have, for example), because you find yourself in a situation of "I can't figure out the path without the work, I can't figure out the work without the path!" circularity. That sometimes trips up the kids I tutor. It turns out that this can be resolved and you can do all of classical mechanics by looking at energies; this is called "Lagrangian mechanics" and is a standard tool in every physicist's toolbox. But this answer is long enough without going into the "variational calculus" that enables that.
A: You said

the work done by a constant force is given as $W=\vec{F}\cdot\vec{r}$

which is true. Then, just doing math, we'd have $dW=d\vec{F}\cdot\vec{r}+\vec{F}\cdot d\vec{r}$. But we already said $\vec{F}$ was constant! Thus, $d\vec{F}=0$, so our formula reduces to $dW=\vec{F}\cdot{dr}$.
Then you might step back and ask, what if $\vec{F}$ is not constant? Then you can't use the formula you quoted! The formula for a non-constant $\vec{F}$ is
$$
W=\int \vec{F}\cdot d\vec{r}
$$
where now $\vec{F}$ is a function of $\vec{r}$. From this formula, it's clear that in this case, $dW=\vec{F}\cdot d\vec{r}$ as well.
In response to your comment:
If you have a non-constant force, you want to divide your path up into many pieces $d\vec{r}$ over which the force is approximately constant. Then on each of these pieces $d\vec{r}$ you can apply the constant force equation to find the work done over the distance $d\vec{r}$, $dW=\vec{F}\cdot d\vec{r}$.
A: I like CR Drosts answer and when he says 'energies are a different way thinking about/phrasing Newtons laws', it's exactly how I like to look at it, but I want to adress the question a bit more concise.
For me, it starts with looking at $\vec{r}$ as a position and $\Delta \vec{r}$ as a displacement. This results in

The work by a constant force $W = \vec{F}.\Delta \vec{r}$

and not $\vec{F}.\vec{r}$, which has the same unit, but not the same meaning.
The step from the work by a constant force to the work by a non-constant force (and thus the use of $dW$), is easiest made graphically:
The non-constant force below is easily divided in constant parts. In every part it is clear that

$W_i = F.\Delta x$ and $W_{tot}=\sum W_i$


For a more thrilling non-constant force, you will have to divide the function into infinitesimal small parts, where you can assume $F$ is constant (if you take the limit $\Delta r\rightarrow 0$, this actually is mathematically correct). 
If you see the analogy with the first graph, it should be clear that

$\Delta W = F.\Delta r$ or if $\Delta r\rightarrow 0$: $dW = F.dr$ 


A: Work is defined by:
$$
W := \int_\gamma\mathbf F\cdot d\mathbf r
$$
That is, a line integral over path $\gamma$. If your path is a line, that is:
$\gamma = \{\mathbf p_0 + \mathbf s t : t\in[0, h]\}$, and the force $\mathbf F$ is constant, then, you can evaluate the integral:
$$
W = \int_\gamma\mathbf F\cdot d\mathbf r = 
\int_0^h\mathbf F(\mathbf r(t))\cdot\mathbf r'(t)dt = 
\int_0^h\mathbf F(\mathbf p_0 + \mathbf s t)\cdot\mathbf sdt = 
\mathbf F\cdot\int_0^h\mathbf sdt = \mathbf F\cdot\mathbf sh
$$
That is, $W = \mathbf F\cdot\mathbf r$, if we let $\mathbf r =\mathbf sh$ be the displacement vector. Notation: $h$ is distance and $\mathbf s$ is direction unit vector and $\mathbf p_0$ is the initial vector (position at $t=0$). Now, if you take the differential of the work by constant force over line:
$$
dW = \mathbf F\cdot d\mathbf r + d\mathbf F\cdot\mathbf r
$$
Since it has constant force, then $d\mathbf F = \mathbf 0$, then we are left with the usual differential of work: $dW = \mathbf F\cdot d\mathbf r$. As it should be. After all, the definition is valid for all forces (constant or not).
A: Suppose that you were allowed to write $d{W}=d(\vec{F}\cdot\vec{r})=\vec{F}\cdot d\vec{r}+d\vec{F}\cdot\vec{r}$ then the second term is zero because the force is not moving.
All that is happening is that you have a force acting at fixed position $\vec r$ which changes ie the force is not moving.
You also have to be careful as to the meaning of $dW$.
It does not mean $W_{\text{final position}} - W_{\text{initial position}}$ but rather it means the (infinitesimally small) amount of work done when the force $\vec F$ moves with the displacement being $d \vec r$.
Thus your $dW$ is equal to just $\vec F \cdot d\vec r$.
A: $W=\vec{F}.\vec{r}$ is the work done by a constant force $\vec F$ acting over a finite distance $\vec r$. Therefore the differential $dW=d(\vec{F}.\vec{r})=\vec{F}.d\vec{r}+d\vec{F}.\vec{r}$ is the infinitesimal change of this finite work $W$ for infinitesimal changes of the force $\vec F$ and the distance $\vec r$. Thus this differential is not the infinitesimal work done by the force $\vec F$ over the infinitesimal distance distance $d\vec r$ which is correctly hgiven by $$dW=\vec F d\vec r$$
