How can heat be a inexact differntial, in thermodynamics? I came across this definition of the first law of thermodynamics in Differential Forms of Fundamental Equations:
$$dU={\bar d}q+{\bar d}w,$$
where it states that the symbol $\bar{d}$ is an inexact differential. But I don't understand how heat is an inexact differential. 
I mean work is because, work is dependent on its path, so it has a path function, but I never come across a path function for heat. Is there a path function for heat?
 A: The amount of heat supplied during a given change of thermodynamic state depends on the path of the change.
For example, consider an ideal gas moving from $(p_1,V_1)$ to $(p_2,V_2)$. There are an infinite number of routes it could follow. Let's consider two: 
$$
\mbox{either }\; (p_1,V_1) \rightarrow (p_2,V_1) \rightarrow (p_2,V_2)\\
\mbox{or }\;\;\;\;\;\; (p_1,V_1) \rightarrow (p_1,V_2) \rightarrow (p_2,V_2)
$$
where the change indicated by each arrow falls on a straight line on a $p,V$ diagram.
The internal energy $U$ changes by the same amount for these two routes, since $U$ is a function of state. But the work done in these two routes is different: in the first case it is $p_2(V_1-V_2)$ but in the second case it is $p_1 (V_1-V_2)$. It follows that the heat supplied differs also.
Now let's look a little more generally. For the case of irreversible heat transfer one can write
$$
\bar{d}Q_{\rm rev} = T\,dS
$$
where $T$ and $S$ are functions of state. But there is no single-valued function whose differential is $T\,dS$. Proof: suppose that there were such a function and call it $f$. Then we have
$$
df = T\,dS \\
\Rightarrow \;\;
\left.\frac{\partial f}{\partial S}\right|_T = T, \;\;
\left.\frac{\partial f}{\partial T}\right|_S = 0 \\
\Rightarrow \;\;
\frac{\partial^2 f}{\partial T\,\partial S} = 1, \;\;
\frac{\partial^2 f}{\partial S\,\partial T} = 0.
$$
Hence 
$$
\frac{\partial^2 f}{\partial T\,\partial S}
\ne \frac{\partial^2 f}{\partial S\,\partial T} 
$$
But this is impossible for a well-behaved single-valued function. Hence we have that $T\,dS$ is not a proper differential. QED
