The derivative of a function tells us the rate at which a function changes as we vary the input. It’s a mathematical tool that helps us measure speed, growth, and countless other phenomena in the world around us. Calculating the derivative of a function is called differentiation. This guide teaches you how to differentiate a function step by step. Whether you’re just starting out or brushing up on old skills, it will provide you with a path toward understanding. Please check out our differentiation infographic to visualize the concepts taught here.
Understanding the Basics of Differentiation
Let’s start with the basics. Differentiation provides a way to measure how one quantity shifts when another does. This concept is handy in everyday life, whether you’re trying to figure out how fast a car is moving at a given moment or tracking how quickly a projectile is falling.
Limit Definition of the Derivative
The limit definition of the derivative gives us a way to measure how a function changes at a specific point. It is written as,
$$f'(x) = \lim_{h \to 0} \frac{f(x+h) – f(x)}{h}.$$
To understand the definition of the derivative, think about how we calculate the slope of a straight line. We take the change in y and divide it by the change in x. But what if the function isn’t a straight line?
That’s where this definition comes in. Instead of looking at the slope between two fixed points, we pick a point x and choose another point slightly to the right or left, at x + h. The difference in function values, f(x+h) − f(x), tells us how much the function output changes, and h tells us how far apart the points are.
The key step is taking the limit as h approaches zero. This means shrinking the gap between the two points until they are practically the same. The result is the instantaneous rate of change, or how fast the function changes at exactly the point x.
Applications
This concept has many real-world uses. In physics, it describes velocity. In business, it helps determine how profits change when production increases by a tiny amount. Whether studying motion, growth, or optimization, derivatives give a precise way to understand change.
Notation
In mathematics, there are various notations to represent the derivative. Here are two of the most common ones:
Leibniz notation: Written as \(\frac{dy}{dx}\), this format shows how a slight change in x leads to a change in y.
Prime notation: Written as f'(x), this notation indicates the derivative of the function f at a specific point x.
Familiarizing yourself with these concepts is a prerequisite to understanding differentiation. As we move forward, we’ll look at the fundamental rules that will help you understand this process of finding derivatives.
The Fundamental Rules of Differentiation
Now that we’ve covered the basics let’s look at the basic rules for differentiation. These rules will help you calculate simple derivatives and are a prerequisite for learning more advanced techniques.
The Power Rule
One of the most straightforward and valuable rules is the Power Rule. It says that if you have a function like \(f(x) = x^{n}\), (where n is any number), you can find the derivative by using the formula
$$f'(x) = n x^{n-1}.$$
Essentially, you take the exponent, bring it down in front as a coefficient, and then reduce the exponent by one.
The Constant Rule
Next is the Constant Rule, which is also straightforward since the derivative of any constant is zero. You can express this as
$$\frac{d}{dx} C = 0.$$
This makes sense, as constants don’t change.
The Constant Multiple Rule
You can use the Constant Multiple Rule if you have a function multiplied by a constant. It states
$$\frac{d}{dx} [c f(x)] = c f'(x).$$
Here, c represents the constant.
The Sum and Difference Rules
When you’re adding or subtracting functions, the Sum and Difference Rules come into play:
$$\frac{d}{dx} [f(x) \pm g(x)] = f'(x) \pm g'(x).$$
This means you can differentiate each function separately and then combine the results.
Example
With the rules introduced in this section and algebraic manipulations, we can already solve some interesting derivative problems.
Example 1: Compute the derivative of the following functions:
(a) \(f(x) = x^2 + 7x + 12\)
Solution: Using the power, constant multiple, sum, and constant rules
$$f'(x) = \frac{d}{dx} (x^2) + 7\frac{d}{dx} (x) + \frac{d}{dx} (12) = 2x + 7 + 0 = 2x + 7.$$
(b) \(g(x) = \frac{(x+1)^2}{x}\)
Solution: First, rewrite the function in terms of positive and negative exponents to obtain
$$g(x) = (x+1)^2 x^{-1}.$$
Expanding \((x+1)^2\) gives
$$g(x) = (x^2 + 2x + 1)x^{-1}.$$
Now distribute \(x^{-1}\) and simplify using exponent rules:
$$ g(x) = x^2x^{-1} + 2xx^{-1} + x^{-1} = x^{2-1} + 2x^{1-1} + x^{-1} = x + 2 + x^{-1}.$$
Lastly, differentiate each term and simplify:
$$ g'(x) = \frac{d}{dx} x + \frac{d}{dx} 2 + \frac{d}{dx} x^{-1} = 1 + 0 – x^{-2} = 1 – \frac{1}{x^2}.$$
(c) \(h(x) = \frac{x+2}{\sqrt{x}}\)
Solution: First, rewrite in terms of integer and fractional exponents:
$$h(x) = (x+2) x^{-1/2}.$$
Now distribute \(x^{-1/2}\) and simplify using exponent rules:
$$h(x) = x x^{-1/2}+2x^{-1/2} = x^{1 – 1/2} + 2x^{-1/2} = x^{1/2} + 2x^{-1/2}.$$
Now differentiate and rewrite everything in terms of roots and integer exponents to arrive at the solution
$$ h'(x) = \frac{1}{2} x^{-1/2} + 2 \left(-\frac{1}{2} x^{-3/2} \right) = \frac{1}{2\sqrt{x}} – \frac{1}{\sqrt{x^3}}.$$
How to Differentiate Common Functions
Now that we’ve covered the basics of differentiation, let’s explore how to differentiate some standard functions you’ll encounter.
Polynomials
This section is only here for completeness. All polynomials can be differentiated using the techniques covered in the previous section. See part a of Example 1 to learn how to compute the derivative of a polynomial.
Trigonometric Functions
Next, let’s look at trigonometric functions. Each of these has specific derivatives you should know.
$$\frac{d}{dx} \sin(x) = \cos(x)$$
$$\frac{d}{dx} \cos(x) = -\sin(x)$$
$$\frac{d}{dx} \tan(x) = \sec^2(x)$$
$$\frac{d}{dx} \cot(x) = -\csc^2(x)$$
$$\frac{d}{dx} \sec(x) = \sec(x)\tan{x}$$
$$\frac{d}{dx} \csc(x) = -\csc(x)\cot{x}$$
Be careful with the signs.
Exponential Functions
The derivative of \(e^x\) is unique because it remains unchanged upon differentiation:
$$\frac{d}{dx} e^x = e^x.$$
Logarithmic Functions
The derivative of the natural logarithm is
$$\frac{d}{dx} \ln(x) = \frac{1}{x}.$$
Hyperbolic Functions
Hyperbolic functions are analogs of trigonometric functions. Their derivatives are:
$$\frac{d}{dx} \sinh(x) = \cosh(x)$$
$$\frac{d}{dx} \cosh(x) = \sinh(x)$$
$$\frac{d}{dx} \tanh(x) = \text{sech}^2(x)$$
$$\frac{d}{dx} \coth(x) = -\text{csch}^2(x)$$
$$\frac{d}{dx} \text{sech}(x)= -\text{sech}(x)\tanh(x)$$
$$\frac{d}{dx} \text{csch}(x) = -\text{csch}(x)\coth(x)$$
Inverse Trigonometric Functions
The derivatives of inverse trigonometric functions are important in integration problems, especially inverse tangent and inverse sine:
$$\frac{d}{dx} \arcsin(x) = \frac{1}{\sqrt{1 – x^2}}$$
$$\frac{d}{dx} \arccos(x) = -\frac{1}{\sqrt{1 – x^2}}$$
$$\frac{d}{dx} \arctan(x) = \frac{1}{1 + x^2}$$
$$\frac{d}{dx} arccot(x) = -\frac{1}{1 + x^2}$$
$$\frac{d}{dx} \text{arcsec}(x) = \frac{1}{|x|\sqrt{x^2 – 1}}$$
$$\frac{d}{dx} \text{arccsc}(x) = -\frac{1}{|x|\sqrt{x^2 – 1}}$$
Inverse Hyperbolic Functions
Inverse hyperbolic functions also have useful derivatives, though they are uncommon:
$$\frac{d}{dx} \text{arsinh}(x) = \frac{1}{\sqrt{x^2 + 1}}$$
$$\frac{d}{dx} \text{arcosh}(x) = \frac{1}{\sqrt{x^2 – 1}}$$
$$\frac{d}{dx} \text{artanh}(x) = \frac{1}{1 – x^2}$$
$$\frac{d}{dx} \text{arcoth}(x) = \frac{1}{1 – x^2} $$
$$\frac{d}{dx} \text{arsech}(x) = \frac{-1}{x\sqrt{1 – x^2}}$$
$$\frac{d}{dx} \text{arcsch}(x) = \frac{-1}{|x|\sqrt{1 + x^2}}$$
In this section, you learned how to differentiate various functions. In the next section, we’ll use this knowledge to learn more advanced differentiation techniques, including the product, quotient, and chain rules, as well as implicit and logarithmic differentiation, which are valuable tools for finding derivatives of more complicated functions.
Advanced Differentiation
In this section, we’ll explore several powerful techniques for differentiation: the product rule, quotient rule, chain rules, implicit differentiation, and logarithmic differentiation. Don’t let the word “advanced” scare you. These techniques can be learned with practice.
Product Rule
The product rule is a technique to differentiate the product of two functions. If you have two functions, u and v, the product rule states
$$\frac{d}{dx}(uv) = u’v + uv’.$$
Let’s do an example
Example 2: Differentiate the functions
(a) \(f(x) = (x^2 + 1)e^x\)
Solution: Using the product rule, we find
$$f'(x) = (x^2 + 1)’e^x + (x^2 + 1)(e^x)’.$$
Calculating the derivatives gives us
$$f'(x) = 2xe^x + (x^2 + 1)e^x.$$
Simplifying yields:
$$f'(x) = (x^2 + 2x + 1)e^x.$$
(b) \(g(x) = x^3\sin(x)\)
Solution: Using the product rule, we find
$$g'(x) = (x^3)’ \sin(x) + (x^3)(\sin(x))’.$$
Calculating the derivatives gives us
$$g'(x) = 3x^2 \sin(x) + x^3 \cos(x).$$
Quotient Rule
As its name suggests, the quotient rule is used to differentiate the quotient of two functions. Given two functions, u and v, the quotient rule states:
$$\frac{d}{dx}\left[\frac{u}{v}\right] = \frac{u’v – uv’}{v^2}.$$
We now work on an example using the quotient rule:
Example 3: Find the derivative of \(y = \frac{\ln(x)}{x^2 + 1}.\)
Solution: Using the quotient rule, we find
$$\frac{dy}{dx} = \frac{(\ln(x))'(x^2 + 1) – \ln(x)(x^2+1)’}{(x^2 + !)^2}.$$
Calculating the derivatives gives us
$$\frac{dy}{dx} = \frac{(\frac{1}{x})(x^2 + 1) – 2x\ln(x)}{(x^2 + !)^2}.$$
Simplifying by multiplying the numerator and denominator by x, we obtain
$$\frac{dy}{dx} = \frac{x^2 + 1 – 2x^2\ln(x)}{x(x^2 + !)^2}.$$
Chain Rule
The chain rule is used to differentiate composite functions. If you have a function y=f(g(x)), the chain rule states
$$\frac{dy}{dx} = f'(g(x)) \cdot g'(x).$$
Example 4: For Example, let’s differentiate \(f(x) = \ln(x^3 + 1).\)
Solution: Using the chain rule, we find
$$f'(x) = \frac{1}{x^3+1} \cdot (x^3 + 1)’ = \frac{3x^2}{x^3+1}.$$
Implicit Differentiation
Implicit differentiation is useful when you have an equation involving two variables. To differentiate a function implicitly, we first differentiate both sides of the equation, treating y as a function of x, and solve for \(\frac{dy}{dx}\). The best way to explain this procedure is with an example:
Example 5: Consider the equation of an ellipse centered at (0,0):
Solution: \(\frac{x^2}{a^2} + \frac{y^2}{b^2} = 1\)
To find \(\frac{dy}{dx}\) implicitly, we start by differentiating both sides with respect to x
$$\frac{d}{dx}\frac{x^2}{a^2} + \frac{d}{dx}\frac{y^2}{b^2} = \frac{d}{dx}(1).$$
This gives us
$$\frac{2x}{a^2} + \frac{2y}{b^2}\frac{dy}{dx} = 0.$$
Now, we can solve for \(\frac{dy}{dx}\) to find:
$$\frac{2y}{b^2}\frac{dy}{dx} = -\frac{2x}{a^2}.$$
$$\frac{dy}{dx} = -\frac{b^2x}{a^2y}$$
Logarithmic Differentiation
Logarithmic differentiation is used to differentiate functions of the form \(f(x)^{g(x)}\) and can be used to simplify the process when dealing with products or quotients where applying the product or quotient rule would be too cumbersome. The idea is to take the natural logarithm of both sides of an equation, apply the rules of logarithms, and implicitly differentiate.
The next Example demonstrates these ideas:
Example 6: Differentiate the functions:
(a) \(y = x^x\)
Solution: Taking the natural logarithm of both sides gives
$$\ln(y) = \ln(x^x) = x \ln(x).$$
Now, we can differentiate both sides using implicit differentiation, yielding
$$\frac{1}{y}\frac{dy}{dx} = \frac{d}{dx}(x \ln(x)).$$
Using the product rule on the right side, we get
$$\frac{1}{y}\frac{dy}{dx} = \ln(x) + 1.$$
Now, solving for \(\frac{dy}{dx}\) gives
$$\frac{dy}{dx} = y(\ln(x) + 1).$$
Finally, substituting \(y = x^x\)
$$\frac{dy}{dx} = x^x(\ln(x) + 1)$$.
This technique is beneficial for functions where directly applying differentiation rules would be cumbersome.
(b) \(y = \frac{(x^2+ 6x+ 10)\ln{x}}{e^x\arctan{x}}\)
Solution: Taking the natural logarithm of both sides
$$\ln y = \ln \left( \frac{(x^2 + 6x + 10) \ln x}{e^x \arctan x} \right).$$
Using logarithm properties gives
$$\ln y = \ln (x^2 + 6x + 10) + \ln (\ln x) – \ln (e^x) – \ln (\arctan x) = \ln (x^2 + 6x + 10) + \ln (\ln x) – x – \ln (\arctan x).$$
Now, differentiate both sides to obtain
$$\frac{1}{y} \frac{dy}{dx} = \frac{2x + 6}{x^2 + 6x + 10} + \frac{1}{x\ln x} – 1 – \frac{1}{\arctan x} \cdot \frac{1}{1 + x^2}.$$
Multiplying both sides by y gives
$$\frac{dy}{dx} = y \left( \frac{2x + 6}{x^2 + 6x + 10} + \frac{1}{x \ln x} – 1 – \frac{1}{(1 + x^2) \arctan x} \right).$$
Substituting y back gives the solution,
$$\frac{dy}{dx} = \frac{(x^2 + 6x + 10) \ln x}{e^x \arctan x} \left( \frac{2x + 6}{x^2 + 6x + 10} + \frac{1}{x \ln x} – 1 – \frac{1}{(1 + x^2) \arctan x} \right).$$
This section explored how the product, quotient, and chain rules help us differentiate various functions. We looked at implicit and logarithmic differentiation, both useful for simplifying the process for more complicated functions. With these techniques, you can find the derivative of any elementary function.
Conclusion
In this guide, we’ve explored the fundamental concepts of differentiation and introduced you to the tools necessary to differentiate elementary functions. We began with the basic principles of differentiation, including the definition and key rules such as the product, quotient, and chain rules. These rules are useful for breaking down complicated functions into manageable parts.
We then introduced implicit differentiation and logarithmic differentiation, two techniques for differentiating functions that may be too cumbersome to handle using other techniques.
Understanding how to differentiate functions step by step is essential for anyone studying calculus. These concepts will become second nature with practice, allowing you to solve calculus problems skillfully.