Second Derivative Calculator

Instructions: Use second derivative calculator to compute the second derivative (this is, the derivative of the derivative) of any differentiable function that you provide, showing all the steps. Please type the function in the form box below.

Enter the function \(f(x)\) you want to compute the second derivative (Ex: f(x) = x*sin(x), etc.)

More on Second Derivatives

This calculator can help you to compute the second derivative of any valid function you provide, showing all the steps of the process. All you need to do is to provide a valid, differentiable function.

A valid function could be f(x) = x*tan(x), or f(x) = 3x^3 + 2x - 1, etc. It could be any valid function, and it does not have to necessarily come simplified, since the calculator will simplify it, in case it is needed.

Once you provide a valid function has been provided, you can click on the "Calculate" button, in order to get all the calculations and steps shown.

Second derivatives are tremendously practical in many applications, especially in Calculus, with the second derivative test for maximization and minimization, to assess whether a critical point is a maximum, minimum or none.

Second Derivative Calculator

What is the second derivative

In very simple terms, a second derivative is just the derivative of the derivative. So the process of computing a second derivative involves computing a derivative one time, and then another time, using the common derivative rules. The second derivative of a function \(f(x)\) is usually written as \(f''(x)\).

The idea of second derivative also applies to partial derivatives, and it corresponds to the derivative twice, but in this case, it can be computed with respect to different variables.

Steps for calculating the second derivative

  • Step 1: Identify the function f(x) you want to differentiate twice, and simplify as much as possible first
  • Step 2: Differentiate one time to get the derivative f'(x). Simplify the derivative obtained if needed
  • Step 3: Differentiate now f'(x), to get the second derivative f''(x)

The steps appear to be easy, but depending on the given function, the amount of algebraic calculations could be large.

Second derivative notation

The most common notation for the second derivative is \(f''(x)\), which reflects well the fact that the derivative operation, denoted by ', is applied twice to the function.

There is another notation for the second derivative, which is particularly useful when the function \(f(x)\) is referred as 'y = y(x)'. Then, we use the following notation for the second derivative.

\[\displaystyle \frac{d^2y}{dx^2} = \displaystyle \frac{d}{dx} \left(\frac{dy}{dx}\right) \]
Second Derivative Calculation

Steps for computing second derivatives for implicit functions

  • Step 1: Identify the equation involving x and y
  • Step 2: Differentiate both sides of the equality. Each side could potentially depend on x, y and y'. Simplify obvious terms, but it is not strictly necessary
  • Step 3: Differentiate again both sides of the equality. Each side could potentially depend on x, y, y' and y''. Then, solve for y''

It is usually much easier to compute the second derivative by implicit differentiation than by solving y in terms of x first and then differentiating, in case that x and y are defined implicitly by an equation, like \(x^2 + y^2 = 1\).

Second derivative at a point

Same as the derivative, the second derivative is a function defined point by point. Notice that a common error students make is thinking, since I want to differentiate at a point, and the function evaluated at a point is constant, its derivative must be constant. WRONG. You first compute the derivative, and THEN you evaluate.

Second Derivative

Example: Second derivative calculation

Calculate the second derivative of : \(f(x) = \cos(x^2)\)

Solution: In this example, we will compute the second derivative of the function \(\displaystyle f(x)=\cos\left(x^2\right)\).

\( \displaystyle \frac{d}{dx}\left(\cos\left(x^2\right)\right)\)
By using the Chain Rule: \(\frac{d}{dx}\left( \cos\left(x^2\right) \right) = \frac{d}{dx}\left(x^2\right)\cdot \left(-\sin\left(x^2\right)\right)\)
\( \displaystyle = \,\,\)
\(\displaystyle \frac{d}{dx}\left(x^2\right)\cdot \left(-\sin\left(x^2\right)\right)\)
We use the Power Rule for polynomial terms: \(\frac{d}{dx}\left( x^2 \right) = 2x\)
\( \displaystyle = \,\,\)
\(\displaystyle \left(2x\right) \left(-\sin\left(x^2\right)\right)\)
which then leads to
\( \displaystyle = \,\,\)
\(\displaystyle 2x\cdot \left(-\sin\left(x^2\right)\right)\)
Finally, the following is obtained
\( \displaystyle = \,\,\)
\(\displaystyle -2x\sin\left(x^2\right)\)

Second Derivative: Now, we differentiate the derivative obtained so to get the second derivative:

\( \displaystyle \frac{d^2f}{dx^2} = \frac{d}{dx}\left(-2x\sin\left(x^2\right)\right)\)
By using the Product Rule: \(\frac{d}{dx}\left( \left(-1\right)\times 2x\sin\left(x^2\right) \right) = \frac{d}{dx}\left(-2x\right) \cdot \sin\left(x^2\right)+\left(-1\right)\times 2x \cdot \frac{d}{dx}\left(\sin\left(x^2\right)\right)\)
\( \displaystyle = \,\,\)
\(\displaystyle \frac{d}{dx}\left(-2x\right) \cdot \sin\left(x^2\right)+\left(-1\right)\times 2x \cdot \frac{d}{dx}\left(\sin\left(x^2\right)\right)\)
By linearity, we know \(\frac{d}{dx}\left( (-1)\times 2x \right) = \left(-1 \right) \cdot \frac{d}{dx}\left(2x\right)\), so plugging that in:
\( \displaystyle = \,\,\)
\(\displaystyle \left(\left(-1 \right) \cdot \frac{d}{dx}\left(2x\right)\right) \sin\left(x^2\right)+\left(-1\right)\times 2x \cdot \frac{d}{dx}\left(\sin\left(x^2\right)\right)\)
Using the Chain Rule: \(\frac{d}{dx}\left( \sin\left(x^2\right) \right) = \frac{d}{dx}\left(x^2\right)\cdot \cos\left(x^2\right)\) and directly we get: \(\frac{d}{dx}\left( 2x \right) = 2\)
\( \displaystyle = \,\,\)
\(\displaystyle \left(\left(-1 \right) \cdot 2\right) \sin\left(x^2\right)+\left(-1\right)\times 2x \cdot \frac{d}{dx}\left(x^2\right)\cdot \cos\left(x^2\right)\)
In this case we use the Power Rule for polynomial terms: \(\frac{d}{dx}\left( x^2 \right) = 2x\)
\( \displaystyle = \,\,\)
\(\displaystyle \left(\left(-1 \right) \cdot 2\right) \sin\left(x^2\right)+\left(-1\right)\times 2x \cdot 2x\cdot \cos\left(x^2\right)\)
and then we find
\( \displaystyle = \,\,\)
\(\displaystyle -2x\cdot 2x\cos\left(x^2\right)+\left(-2\right)\sin\left(x^2\right)\)
Putting together the numerical values, reducing the ones in \(-2x\cdot 2x\cos\left(x^2\right) = -4x^2\cos\left(x^2\right)\) and grouping the terms with \(x\) in the term \(-2x\cdot 2x\cos\left(x^2\right)\)
\( \displaystyle = \,\,\)
\(\displaystyle -2\cdot 2x^2\cos\left(x^2\right)-2\sin\left(x^2\right)\)
Simplifying the integers that can be multiplied together: \(\displaystyle -2\times2 = -4\)
\( \displaystyle = \,\,\)
\(\displaystyle -4x^2\cos\left(x^2\right)-2\sin\left(x^2\right)\)

Final Conclusion: We find that the second derivative we are looking for is:

\[f''(x) = -4x^2\cos\left(x^2\right)-2\sin\left(x^2\right)\]

Example: More Second derivatives

For the following function : \(f(x) = x \cos(x)\), compute its second derivative

Solution: Now, we do the same in tis \(\displaystyle f(x)=x\cos\left(x\right)\), for which we need to compute its derivative.

The function came already simplified, so we can proceed directly to compute its derivative:

\( \displaystyle \frac{d}{dx}\left(x\cos\left(x\right)\right)\)
Using the Product Rule: \(\frac{d}{dx}\left( x\cos\left(x\right) \right) = \frac{d}{dx}\left(x\right) \cdot \cos\left(x\right)+x \cdot \frac{d}{dx}\left(\cos\left(x\right)\right)\)
\( \displaystyle = \,\,\)
\(\displaystyle \frac{d}{dx}\left(x\right) \cdot \cos\left(x\right)+x \cdot \frac{d}{dx}\left(\cos\left(x\right)\right)\)
Directly differentiating: \(\frac{d}{dx}\left( \cos\left(x\right) \right) = -\sin\left(x\right)\)
\( \displaystyle = \,\,\)
\(\displaystyle \frac{d}{dx}\left(x\right) \cdot \cos\left(x\right)+x \left(-\sin\left(x\right)\right)\)
which then leads to
\( \displaystyle = \,\,\)
\(\displaystyle x\cdot \left(-\sin\left(x\right)\right)+\cos\left(x\right)\)
By reorganizing/simplifying/expanding the terms that are amenable to
\( \displaystyle = \,\,\)
\(\displaystyle -x\sin\left(x\right)+\cos\left(x\right)\)

Second Derivative Calculation: The next step is to differentiate the derivative obtained in the previous steps:

\( \displaystyle \frac{d^2f}{dx^2} = \frac{d}{dx}\left(-x\sin\left(x\right)+\cos\left(x\right)\right)\)
By linearity, we know \(\frac{d}{dx}\left( (-1)x\sin(x)+\cos(x) \right) = \frac{d}{dx}\left((-1)x\sin(x)\right)+\frac{d}{dx}\left(\cos(x)\right)\), so plugging that in:
\( \displaystyle = \,\,\)
\(\displaystyle \frac{d}{dx}\left(\left(-1\right)x\sin\left(x\right)\right)+\frac{d}{dx}\left(\cos\left(x\right)\right)\)
Directly differentiating: \(\frac{d}{dx}\left( \cos\left(x\right) \right) = -\sin\left(x\right)\) and we can use the Product Rule: \(\frac{d}{dx}\left( \left(-1\right)x\sin\left(x\right) \right) = \frac{d}{dx}\left(\left(-1\right)x\right) \cdot \sin\left(x\right)+\left(-1\right)x \cdot \frac{d}{dx}\left(\sin\left(x\right)\right)\)
\( \displaystyle = \,\,\)
\(\displaystyle \frac{d}{dx}\left(\left(-1\right)x\right) \cdot \sin\left(x\right)+\left(-1\right)x \cdot \frac{d}{dx}\left(\sin\left(x\right)\right)-\sin\left(x\right)\)
Directly differentiating: \(\frac{d}{dx}\left( \sin\left(x\right) \right) = \cos\left(x\right)\) and directly we get: \(\frac{d}{dx}\left( \left(-1\right)x \right) = -1\)
\( \displaystyle = \,\,\)
\(\displaystyle \left(-1\right) \sin\left(x\right)+\left(-1\right)x \cdot \cos\left(x\right)-\sin\left(x\right)\)
and then we get
\( \displaystyle = \,\,\)
\(\displaystyle \left(-1\right)x\cos\left(x\right)+\left(-1\right)\sin\left(x\right)+\left(-\sin\left(x\right)\right)\)
Reducing the multiplication by ones in \(\left(-1\right)x\cos\left(x\right) = \left(-1\right)x\cos\left(x\right)\) and
\( \displaystyle = \,\,\)
\(\displaystyle \left(-1\right)x\cos\left(x\right)-\sin\left(x\right)+\left(-\sin\left(x\right)\right)\)
\( \displaystyle = \,\,\)
\(\displaystyle -x\cos\left(x\right)-2\sin\left(x\right)\)

Second Derivative Conclusion: We conclude that the second derivative of the given function isa:

\[f''(x) = -x\cos\left(x\right)-2\sin\left(x\right)\]

Example: Second derivative and implicit differentiation

Using implicit differentiation, calculate the second derivative of y with respect to x, for \( x^2 + y^2 = 1\).

Solution:We apply implicit differentiation, assuming that y depends on x, and we differentiate both sides of the equality:

\[ \frac{d}{dx}\left(x^2 + y^2\right) = \frac{d}{dx} (1) \] \[ \Rightarrow 2x + 2yy' = 0 \]

Now, applying implicit differentiation again:

\[ \frac{d}{dx}\left( 2x + 2yy' \right) = \frac{d}{dx} 0 \] \[ \Rightarrow 2 + 2y'^2+2yy'' = 0 \] \[ \Rightarrow 2y'^2 + 2yy'' = -2\] \[ \Rightarrow yy'' = -1 - y'^2 \] \[ \Rightarrow y'' = \frac{-1 - y'^2}{y} \]

which concludes the calculation.

More derivative calculators

When finding the derivative of a function, it is natural to think about doing the process again, which is finding the derivative of the derivative, and that is precisely what this second derivative calculator does.

The concept of second derivative is quite useful in Calculus, especially at the time of maximize or minimize functions. The second derivative gives you information about the concavity of a function, which is also crucial at the time to understand the shape of the graph of the function.

Second derivatives can be calculated both for regular derivatives and for implicit differentiation, in which you calculate implicit differentiation rule two times.

log in to your account

Don't have a membership account?

reset password

Back to
log in

sign up

Back to
log in