# Simple differentiation issue

I'm blanking on the simplest thing ever:

$$L = x$$ $$\frac{dL}{dx} = 1$$

But if I do:

$$x = m + n$$ $$\frac{dL}{dx} = \frac{\partial L}{\partial m}\frac{\partial m}{\partial x} + \frac{\partial L}{\partial n}\frac{\partial n}{\partial x}$$

$$\frac{dL}{dx} = (1)(1) + (1)(1)$$ $$\frac{dL}{dx} = 2$$

Yeah, this is embarrassing.

-

The problem is, you assume that $$\frac{\partial m}{\partial x} = \frac{\partial n}{\partial x} = 1$$
However in reality $$\frac{\partial m}{\partial x} = 1 - \frac{\partial n}{\partial x}$$