Partial deritative of $\partial_V(PV)_T$ with $PV=nRT$ The question arised from thermodynmaics.
Suppose $n,R$ are positive constants, and $P,V,T$ are all positive. From $TdS=dE+PdV$, one may obtain $T\partial_V(S)_T=\partial_V(E)_T+P$ where $\partial_V()_T$ meant taking partial derivative with respect to $V$ while holding $T$ constant.
Further, $E=TS-PV$, and in ideal gas, $PV=nRT$.
The equations above are all valid statment. However, I met the question in the following:
If one take partial derivative $\partial_V(E)_T$, the RHS became $\partial_V(TS-PV)_T=\partial_V(TS)_T-\partial_V(PV)_T$.
Since $\partial_V(TS)_T=\partial_V(T)_TS+T\partial_V(S)_T=0+T\partial_V(S)_T$, one must have $\partial_V(PV)_T=P$.
Yet, taking partial derivative hold $T$ constant for $PV$: $\partial_V(PV)_T$
If we replace $P=nRT/V$, then $\partial_V(PV)_T=\partial_V(nRT/V*V)_T=\partial_V(nRT)_T=0$.
If we use chain rule $\partial_V(PV)_T=\partial_V(P)_T*V+P\partial_V(V)_T=-P+P=0$.
Neither are correct, what was worng with the derivation? Why can't we use calculus and taking partial derivatives?
 A: Let's look at the expression $E=TS-PV$. This means that
$$dE=TdS+SdT-PdV+VdP$$
If we assume this equation is true, and we have a constant $T$ (i.e. $dT=0$), then we see that we must also have a constant $P$ (i.e. $dP=0$) in order for $dE=TdS-PdV$ to be true. For an ideal gas, if $T$ and $P$ are constant, it must also be that $V$ is constant. Therefore, we get that nothing is actually changing.

However, there is a deeper issue here (which I must thank @Javier for helping work through it). The equation $E=TS-PV$ is not true. The correct equation is $E=TS-PV+\mu N$, where $\mu$ is the chemical potential. This can be verified by plugging in known equations for $S$ and $\mu$ for an ideal gas as well as the ideal gas law.
Therefore, we have
$$\partial_V(E)_T=\partial_V(TS-PV+\mu N)_T$$ 
your math in dealing with $\partial_V(E)_T$ of the first two terms is correct. We get a $T\partial_V(S)_T$, and $\partial_V(PV)_T=0$ (which makes sense for an ideal gas. If $T$ is constant than $PV$ has to be constant). But we must also consider the chemical potential term. 
If we are going to use $dE=TdS-PdV$ we are assuming $N$ is constant (i.e. $dN=0$). Therefore,
$$\partial_V(\mu N)_{T,N}=N\partial_V(\mu)_{T,N}$$
It is this term that will give you the $-P$ you are looking for.
More explicitly, for an ideal, monatomic gas,
$$\mu=-kT\log\left[\frac VN\left(\frac{2\pi mkT}{h^2} \right)^{3/2}\right]$$
If you do the math out you will find that $N\partial_V(\mu)_{T,N}=-P$
Therefore, 
$$\partial_V(E)_{T,N}=T\partial_V(S)_{T,N}-P$$
and we no longer have a contradiction.

Fun aside: In terms of the Helmholtz free energy $F=U-TS$, the relation is true in general that 
$$-P=\left(\frac{\partial F}{\partial V}\right)_{T,N}$$
And we have shown that specifically for an ideal gas
$$-P=N\left(\frac{\partial \mu}{\partial V}\right)_{T,N}$$
Therefore, we can conclude that $F$ and $N\mu$ differ by just a constant with our assumptions for the ideal gas. This can seen to be true by looking at expressions of $F$ and $N\mu$ for the ideal gas. (Also, I didn't know we were dealing with friction in this problem).
