Partial derivative VS total derivative? My friends argue this $d_t( \partial_{\dot{x}} g)=1+2\dot{\dot{x}} \not = \partial_t (\partial_{\dot{x} }g)$ where $g=t\dot x + x^2 + \dot{x}^2$. Why?
 A: Because they are derivatives of different functions. 
Example $g(x,t)=t  x^2$

When $x$ is itself a function of $t$, we have two options: 
  
  
*
  
*hold $x$ constant and take the partial derivative of $g(x,t)=tx^2$ with respect to $t$. This gives $\partial_t g = x^2$
  
*treat $x$ as a function of $t$. Then we really look at the single-variable function $G(t):=g(x(t),t)$ but usually 
  people don't bother introducing notation for it. The derivative is $G'(t)=x^2+t2x\dot x$. 
  
  
  You can treat the second computation as a partial derivative too; it's just that instead of holding $x$ constant, we
   hold an expression of $x,t$ constant. For example, if $x=t^3$, then we differentiate $g$ with respect to $t$ holding
   $x-t^3$ constant. This consideration occurs in mechanics when the change of coordinates is introduced. 

Example with coordinate change

If your coordinates are $x,y$ and you decided to introduce a new coordinate $\tilde y=x+y$, then you should also 
   introduce $\tilde x=x$ because the partial derivatives $\partial_x g$ and $\partial_{\tilde x}g$ will  be different (even 
   though $x$ and $\tilde x$ are the same thing). This takes a while to get used to.


Added later. The process of taking a partial derivative involves the following steps: 


*

*Restrict the function to a curve

*Choose a parameter for that curve 

*Differentiate the restricted function with respect to the chosen parameter. 


For example, what is $\dfrac{\partial f}{\partial y}(1,2,3)$?
Step 1 is commonly expressed by saying "hold other variables constant". Here we take the partial derivative at $(1,2,3)$ "holding $x$ and $z$ constant", which means that we restrict the function to the line $x=1$, $z=3$. Notice that this step is not about the variable in which we will take the derivative. 
Step 2: we choose the parameter for our line, namely $y$. 
Step 3 is now unambigious: we differentiate a function of one variable. 
But it does not have to be so rectangular all the time. Instead we can restrict $f$ to the curve formed by the intersection $z=x^2+y$, $x+y+z=6$. This means differentiation while holding the variables $u=z-x^2$ and $v=x+y+z$ constant. And our parameter could be $\tilde y = y$, or maybe $\tilde y = e^y-xyz$. The possibilities are infinite. 
The traditional notation $\dfrac{\partial f}{\partial y}(1,2,3)$ hides step 1, taking for granted that the choice of restriction is obvious. This is the case in multivariable calculus, but often not the case in physics.
A: $g=t\dot x+x^2+\dot x^2$
Total derivative

$\frac{dg}{dt}=\dot x+2x\frac{dx}{dt}+2\dot x \frac{d\dot x}{dt}$

Partial derivative where we consider other variables as constants

$\frac{\partial g}{\partial t}=\dot x$

Hence for all $t$ and for all $x$ $$\frac{dg}{dt}\not = \frac{\partial g}{\partial t}.$$
