Share:

Derivative of the absolute value function

اشتقاق القيمة المطلقة

In our lesson today, we’ll discuss the derivative and integral of the absolute value function. You can’t differentiate an absolute value function directly, as you would in a typical differentiation problem. This is because the function’s value changes based on its domain. Here are some examples to clarify the differentiation method.

What is the Absolute Value Function?

For example, if we have the absolute value function:

\[ y = | x | \]

This means that the value of y is the actual value of x if x is greater than or equal to zero. However, the value of y is the value of x multiplied by -1 if the value of x is less than zero.

Derivative of the Absolute Value Function

Let’s take the simplest example of differentiating the absolute value: the derivative of the absolute value of x.

Suppose we have the following function:

\[ y = | x | \]

How do we find the derivative of this function?

We cannot work on |x|. We know that \( | x | = \sqrt{x^2} \), therefore:

\[ y = (x^2)^{\frac{1}{2}}\]

Now we differentiate according to the general rule for the derivative of a term:

\[ \frac{d}{dx}(Y^n) = n×Y^{n-1}×Y’  \]

You can check out the article on Differentiation Rules to see all the rules.

So the derivative is

\[\frac{dy}{dx} = \frac{1}{2}(x^2)^{-\frac{1}{2}} \bullet 2x\\
= \frac{1}{2 \sqrt{x^2} } \bullet 2x\\
Simplifying\\
\frac{dy}{dx} =\frac{x}{\sqrt{x^2} }\\
\frac{dy}{dx} =\frac{x}{| x |}\]

Thus, we conclude that the derivative of the absolute value of the function y=|x| is not defined when x=0

Now let’s increase the difficulty and try to find the derivative of a term with an absolute value, not just x.

Derivative of a Function with an Absolute Value

Find the derivative of the absolute value of the following function:

\[y = 3x+1\]

Solution: The absolute value function is:

\[y = |3x+1|\]

Let’s assume:

\[u=3x+1\]

Therefore, the derivative of u is

\[\frac{du}{dx}=3\]

Now we have \(y=|u|\). Using the chain rule for differentiation, the derivative of y with respect to x is:

\[\frac{dy}{dx}= \frac{dy}{du} . \frac{du}{dx}\
= \frac{u}{|u|}.3= \frac{3u}{|u|}\]

We substitute the value of u

\[\frac{dy}{dx}=\frac{3(3x+1)}{|3x+1|}\
\frac{dy}{dx}=\frac{9x+3}{|3x+1|}\]

Example of Differentiating an Absolute Value Function

Let’s take a more difficult example. Find the derivative of the following absolute value function:

\[y = |(3 x^3 + 2 x)^3|\]

First, we can write the function in a simplified form

\[y=\left(3x^{3} + 2x\right)^{2} \left|3x^{3} + 2x\right|\]

And therefore:

\[\frac{dy}{dx} = \frac{d}{dx}[(3x^{3} + 2x)^{2} |3x^{3} + 2x|]\\
using \ rule \ {\frac{d}{dx}(y.z)=y’ . z+z’ . y}\\
\frac{d}{dx}[(3x^{3} + 2x)^{2}].|3x^{3} + 2x| + \frac{d}{dx}|3x^{3} + 2x|.[(3x^{3} + 2x)^{2}]\]

And by differentiating each term:

Derivative of an absolute value function

After simplification, we can write

\[\left(81x^{5} + 72x^{3} + 12x\right) \left|3x^{3} + 2x\right|\]

Graph of the absolute value function and its derivative

Integral of an Absolute Value Function

Integration is the inverse of differentiation, as we know. Since the value of the absolute value function changes according to the domain of integration, the function has two integration domains:

\[if \ x>0, |x|=x\\
and \ if \ x<0, |x|=-x\]

Therefore, if |x| is integrated in the positive domain, the result is:

\[\int |x|dx= \frac{1}{2}(x^2)+c \ \cdots \text{ if } x \geq 0\]

And if |x| is integrated in the negative domain, the result is:

\[\int |x|dx= -\frac{1}{2}(x^2)+c \ \cdots \text{ if } x < 0\]

Leave a Comment

Shopping Cart
اخترنا لك no posts found
×
0