What are the "inexact differentials" in the first law of thermodynamics? The first law of thermodynamics states that 

$$dU=\delta Q - \delta W$$

I have only just graduated high school and I am finding the above form of the equation rather difficult to understand due to the fact that I don't understand what inexact differentials are. Is it possible for anybody to please explain this to me? (I have taken an A.P course in calculus in school). 
 A: The mostly math-free explanation:
The internal energy $U$ is a function of state. It depends only on the state of the system and not how it got there. The notions of heat $Q$ and work $W$ are no such functions - they are properties of a process, not of a state of the thermodynamic system. This means that we can compute the infinitesimal change $\mathrm{d}U$ as the actual change $U$ of the function between two infinitesimally close points, but the infinitesimal changes in heat and work $\delta Q,\delta W$ depend on the way we move from one such point to the other.
More formally:
Now, you should imagine the state space of thermodynamics, and the system taking some path $\gamma$ in it. We call the infinitesimal change in internal energy $\mathrm{d}U$, which is formally a differential 1-form. It's the object that when integrated along the path gives the total change in internal energy, i.e. $U_\text{end}-U_\text{start} = \int_\gamma \mathrm{d} U$. You may think of this as completely analogous to other potentials in physics: If we have a conservative force $F = -\nabla U$, then integrating $F$ along a path taken gives the difference between the potential energies of the start and the end of the path. This is why $U$ is sometimes called a "thermodynamic potential", and this means that the $\mathrm{d}U$ is an actual differential - it is the derivative of the state function $U$.
Since $W$ and $Q$ are not state functions, there are no differentials $\mathrm{d}W$ or $\mathrm{d}Q$. However, along any given path $\gamma$, we can compute the infinitesimal change in work and heat, and also the total change $\Delta W[\gamma]$ and $\Delta Q[\gamma]$, so heat and work are functionals on paths. It turns out that, together with linearity - the work along two paths is the sum of work along each of them - this is enough to know that there are two differential 1-forms representing heat and work on the entire state space (for a formal derivation of this claim, see this excellent answer by joshphyiscs). These forms we call $\delta W$ and $\delta Q$, where we use $\delta$ instead of $\mathrm{d}$ to remind us that these are not differentials of state functions.
