Originally Posted by

**HallsofIvy** In other words, it depends upon whether you are thinking of "a" as a variable or as a specific value of a variable. If your function has been written as a function of x and then you see f'(a), that is the derivative with respect to the **variable** x, evaluated at x= a.

Of course, if you think of a as being the variable, and differentiate f(a) with respect to a, you should get exactly the same thing as if you differentiated f(x) with respect to x, then set x= a.

For example, if the function is $\displaystyle f(x)= x^3- sin(x)$ then $\displaystyle f'(x)= 3x^2- cos(x)$ and, setting x= a, $\displaystyle f'(a)= 3a^2- cos(a)$. On the other hand, if I replace the variable x with the variable a, I would have $\displaystyle f(a)= a^3- sin(a)$ and the derivative with respect to a is $\displaystyle f'(a)= 3a^2- cos(a)$, exactly as before.

Of course, that has to be a letter or something that we **can** think of as a variable. If we have $\displaystyle f(x)= x^3- sin(x)$ as before and are asked to find $\displaystyle f'(\pi)$, we would set $\displaystyle f'(x)= 3x^2- cos(x)$ and then set $\displaystyle x= \pi$: $\displaystyle f'(\pi)= 3\pi^2+ 1$.

It would be a terrible **mistake** to first set x equal to the **constant** $\displaystyle \pi$ and then argue "$\displaystyle f(\pi)= \pi^3- sin(\pi)= \pi^3$ is a constant so its derivative is 0". We differentiate with respect to a **variable**, not a constant.