A Closer Look at the Basics of Functions and Derivatives

When looking at a function name, the input variable(s)/independent variable(s) are the letters in parentheses next to the function name such as the x in f(x). (Disclaimer: I’m no math pro, so take this all with a grain of salt). Basically, anything you put in the f(x) in place of the x you will substitute in for the x in the right hand side of an equation. You probably already know this of course. So, say you have f(x)=x^2. Then if you put in 5 as x, like f(5), that of course is 5^2. Another example is if you have f(x)=f(a) + (x-a). If you insert a+h into the function, like f(a+h), then you substitute a + h in the right hand side instead of x, so the right hand side becomes f(a) + (a + h -a)=f(a) + h.

See the post When to Use the Composite Function/Chain Rule for Derivatives for what to do when taking derivatives when the variable inside the parentheses is modified in any way, such as multiplied by some factor or raised to the power of or added to or subtracted some other terms; in that case the function is a function of another function, is a composite function, in which case you may have to use the composite function/chain rule to find the derivative.

Now, it’s important to figure out what variable you’re differentiating with respect to, and what exactly that means. Basically, “differentiating with respect to” a variable means that you’re figuring out how much the output of the function changes, how much the dependent variable changes, based on a change on the variable you’re differentiating with respect to. So if you have y=f(x), and you differentiate the function with respect to x, so it’s f'(x) or also written as dy/dx, that means you’re figuring out the ratio at each x of how much y changes based on how much x changes; it’s a rate. (See What dx Actually Means for more info on the dx notation, dy/dx is basically the limit of \Delta y / \Delta x as \Delta x \rightarrow 0, meaning the change in y based on change in x as the change in x gets very, very small, i.e. the “instantaneous rate of change,” instantaneous as in the x hardly changes at all; the change in the output y of the function is based not over a range of x but practically right at that x since the change is infinitely small.)

Now the interesting thing is that if your function doesn’t change based on the variable you’re differentiating with respect to, the derivative is zero. That’s pretty important, and makes sense. If your variable is y=f(x) and f(x) isn’t a function of z, i.e. it doesn’t changed based on changes in z, differentiating f(x) with respect to z will yield no change, i.e. the derivative will be zero.

This becomes important especially when dealing with constants and doing partial derivatives where you treat some variables as constants. The common sense thing to remember, is that you have a constant, if a variable is being treated as a constant, and if a function isn’t a function of some variable, differentiating the function with respect to that constant or variable being treated as a constant or variable not affecting that function will yield a derivative of zero, which makes sense; the function’s output won’t change at all based on that constant, or variable treated as a constant, or changes in a variable which doesn’t affect the function.

When we are given “constants” such as c, without specifically specifying the value of the constant such as if we were to specify that c=5, c really a variable that we just treat as a constant when we differentiate the function?. If we don’t specifically specify the value, that means c could equal 1, 5, -100, or anything else, like a variable…it’s only treated like a constant when we differentiate the function.

Some other interesting information about derivatives and constants:

As far as I know any constant can be written as a function of a variable. For example, if you have the constant 5, say y=5, you could write that as a function of x, c=y=f(x)=5 * x^0=5*1=5. 5 can be thus written as a function of x to the power of zero, which equals one. The derivative of c=y=f(x)=5 * x^0=5*1=5 with respect to x is zero, since any change in the x results in no change in the output variable y. No matter what change in x, the output y still equals 5. You can also prove this using the power rule: using the power rule on y=f(x)=5 * x^0 = 0 * 5 * x^-1 which equals 0.

This is all useful to know once you start doing partial derivatives. You could have a function of three variables, say z=f(s, x, y). However, if the s variable is raised by the power of zero, wherever the s variable appears in the function, its value is actually 1, as s^0=1. Therefore, f(s, x, y) is equivalent to f(1, x, y), since everywhere an s appears in the function equation you can substitute a 1. What this means effectively is that the function f really only depends on the x and the y; s acts as a constant since it’s raised to the power of zero, there can be no change in the output z based on any change in s; where s is raised to a zero, it’s derivative will be zero, by the power rule, y=f(x)=5 * x^0 = 0 * 5 * x^-1. For example if you had z=f(s, x, y)= 5s^0x^3y^2, that would be 5*1*x^3*y^2, which equals 5x^3y^2, so the output z of function f only depends on changes in the x and the y variables. If in the equation you are adding s^0 as a term in a polynomial, no matter what s changes to, the value of s^0 will always be equal to 1; you would always be adding a 1 to the rest of the terms in the polynomial, so once again, the value of the function would not depend on the s, the value would not change based on any changes in s. The appendix to chapter 14 of the book Mathematics for Economists discusses this topic.

An interesting way to think of the derivative of a function is that it is a graph of the slope of the tangent line at each x value of the original function.  That is, on the original function, at any x you can find a tangent line to the function at that x; the slope, the change in y over change in x at that point, the instantaneous rate, is the y value of the derivative at that x.  So when you graph the derivative of a function, you graph a collection of slope values of the tangent lines at each x of the original graph.

Also see:
Functions, Mappings, and Counting, Surjections, Injections, and Bijections