# The rules of differentiation

In the previous lesson we talked about differentiation in general; just as a reminder, it is a word that means “computation of a derivative”, the same way multiplication means “computation of a product” .

Calculating the derivative of a function is quite easy if you know the rules of differentiation, which I will explain in a way as accurate and understandable as possible. I know it’s frustrating when you really are into something but the information given is not sufficient or not clear enough. I’ve been through it!

the derivative of the sum or the difference of two functions, f(x) and g(x) (with respect to x) is the same as the derivative of the first function plus/minus the derivative of the second.

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}(f(x)&space;\pm&space;g(x))=\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(x)&space;\pm&space;\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}g(x)={f}'(x)\pm&space;{g}'(x)$

Remember to use the brackets if you want to calculate the derivative of the sum or difference of more functions, otherwise the derivative will be that of the function next to the d/dx symbol:

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(x)&space;\pm&space;g(x)$

means that the derivative of f(x) is added to or subtracted by another function g(x) and the other way around. It’s exactly the same as 5*(4+7), which is not the same as 5*4+7 or 5+4*7.

Constant rule:

The derivative of a constant is equal to 0; whatever is not a function of the variable of differentiation is a constant.

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(t)$

Ad you can see, f(t) is not a function of the variable of differentiation x. Keep in mind though that

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;t}f(t)&space;=&space;\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(x)&space;\neq&space;0$

So, for example

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}a=0$

because a is a constant.

Also,

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}(f(t)\pm&space;g(x))=0&space;\pm&space;\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}g(x)=\pm&space;g'(x)$

Constant product rule:

The derivative of a constant (that we defined above) multiplied by a function (of the variable of differentiation) is equal to the constant times the derivative of the function.

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}(f(t)g(x))=f(t)\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}g(x)=f(t)&space;g'(x)$

Sign rule:

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}\pm&space;f(x)&space;=\pm&space;\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(x)=\pm&space;{f}'(x)$

Product rule:

The derivative of the product of two functions, f(x) and g(x), is equal to the derivative of the first function multiplied by the second plus the derivative of the second function multiplied by the first.

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}(f(x)g(x))=\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(x)g(x)+\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}g(x)f(x)={f}'(x)g(x)+{g}'(x)f(x)$

Remember that the derivative is of the whole product only if the product is inside the brackets, otherwise the derivative will be of the function next to the d/dx. So,

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(x)g(x)$

means “derivative of f(x) multiplied by g(x) and the other way around.

Quotient rule:

The derivative of a quotient of two functions is equal to the derivative of the first function multiplied by the second minus the derivative of the second function times the first, ALL over the square of the second function.

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}\frac{f(x)}{g(x)}=\frac{\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(x)g(x)-\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}g(x)f(x)}{\left&space;[&space;g(x)&space;\right&space;]^{2}}=\frac{{f}'(x)g(x)-{g}'(x)f(x)}{\left&space;[&space;g(x)&space;\right&space;]^{2}}$

Power rule:

The derivative of a function raised to the n-power is equal to n times the function raised to the n-1 power.

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}\left&space;[&space;f(x)&space;\right&space;]^{n}=n\left&space;[&space;f(x)&space;\right&space;]^{n-1}$

For example, let f(x) = x². The derivative will be

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}x^2=2x^{2-1}=2x$

Another example:

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}x=1x^{1-1}=x^0=1$

Reciprocal rule:

The derivative of the reciprocal of a function is the negative of the derivative of that function over that function squared. So many of’s, right? Let me make this more clear:

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}\frac{1}{f(x)}=\frac{\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(x)}{\left&space;[&space;f(x)&space;\right&space;]^2}=\frac{{f}'(x)}{\left&space;[&space;f(x)&space;\right&space;]^2}$

Exponential rule:

The derivative of an exponential function, which is e (Neplero’s number) raised to a function, is equal to the derivative of that function times the exponential function.

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}e^{f(x)}=\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(x)e^{f(x)}={f}'(x)e^{f(x)}$

For example, the derivative of e^x is the derivative of x (which is 1, from the power rule), times the function itself, e^x; the result will be 1*e^x=e^x. Another example:

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x&space;}e^{x^2}=\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}x^2e^{x^2}=2xe^{x^2}$

This rule is valid for any other constant base; the difference is that the derivative of the exponential function is equal to the derivative of the function at the exponent times the natural logarithm (logarithm in base e) times the exponential function itself. The order doesn’t really matter.

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x&space;}a^{f(x)}=\ln(a)\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(x)a^{f(x)}=a^{f(x)}\ln(a){f}'(x)$

Chain rule:

This rule is used to calculate the derivative on nested function, like f(g(x)), f(g(z(x))) and so on. For now, let’s talk about the first case. We’ll talk about that in another post.

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}f(g(x))={f}'(g(x)){g}'(x)$

For example, consider the function

$w(x)=sin(x^2)$

it is made of two functions, the function sine and the function x². The function sine is f(x) = sin(x), the other is g(x) = x². The x² is inside sin(x). To calculate the derivative of this nested function, w(x), we need to calculate the derivative of sin(x) which is cos(x) ( we will see it in the next post, where I will talk about the fundamental derivatives), and the derivative of x², which is 2x, from the power rule. So we have:

$\frac{\mathrm{d}&space;}{\mathrm{d}&space;x}\sin(x^2)=\cos(x^2)2x=2x\cos(x^2)$

I really hope this lesson is clear, if you have any doubt don’t hesitate to leave a comment! Now you should be ready to learn the fundamental derivatives, with which you will be able to calculate ANY derivative. Stay tuned!

Support my site!

I put all of my efforts to make this site as good as possible. If you would like, you can help my site grow with a small donation! I would really appreciate it.

\$1.00

This site uses Akismet to reduce spam. Learn how your comment data is processed.