Partial derivative of a function with respect to itself

I am a first year undergraduate student planning to major in physics and I am taking a first year course in basic mathematics. We are currently studying partial differentiation.

While going through the course materials, there is something which I was not totally comfortable with.

We have a function $$x = r\cos\theta$$ where $$x$$, $$r$$, and $$\theta$$ are all variables with $$x$$ as the dependent variable. What we want to find is $$\partial r/\partial x$$ and $$\partial\theta /\partial x$$.

What the lecturer has done is to simply partially differentiate the entire thing with respect to $$x$$ itself:

$$x = r \cos\theta$$

$$\frac{\partial x}{\partial x}= \frac{\partial}{\partial x}(r\cos\theta)$$

This is where my problem arises. When we take a partial derivative don't we treat everything other than our differentiating variable as constant? Why do we end up with what's below?

$$1 = r\frac{\partial}{\partial x}(\cos\theta) + \cos\theta \frac{\partial r}{\partial x}$$

$$1 = -r\sin\theta\frac{\partial\theta}{\partial x} + \cos\theta\frac{\partial r}{\partial x}$$

• If "we treat everything other than our differentiating variable as constant", then you seem to think that implicitly partially differentiating $x = r \cos \theta$ with respect to $x$ should give $1 = 0$, which is self-evidently false. When you write "$x = r \cos \theta$" and then treat $x$ as an independent variable, you force $r$ and $\theta$ to be dependent on $x$. ($r$ and $\theta$ will also be dependent on $y$.) So is your "we treat everything other than our differentiating variable as constant" exactly what you mean, or did you mean something close to that? Nov 3, 2019 at 3:13
The lecturer appears to be treating $$r$$ and $$\theta$$ as functions of $$x$$ and $$y$$. So think $$r=r(x,y)$$ and $$\theta=\theta(x,y)$$. In that case, he is considering $$x=r(x,y)\cos\theta(x,y)$$ and applying $$\tfrac{\partial}{\partial x}$$ to both sides.