Solveeit Logo

Question

Question: How do you find the derivative of \(\left| x-2 \right|\)?...

How do you find the derivative of x2\left| x-2 \right|?

Explanation

Solution

In this problem we need to calculate the derivative of the given function. We can observe that the given function has absolute function. So, we will consider the given function as (x2)2\sqrt{{{\left( x-2 \right)}^{2}}}. Now we will use the substitution method and substitute the value u=x2u=x-2. Now we will differentiate the uu with respect to xx as well as we will differentiate the given equation with respect to xx. Now we will simplify the obtained equation by using the differentiation value of uu. After substituting this value and simplifying the obtained equation, we will get the required result.

Complete step by step solution:
Given that, x2\left| x-2 \right|.
Here in the above equation, we can observe the absolute function, so we can write the above equation as
f(x)=(x2)2\Rightarrow f\left( x \right)=\sqrt{{{\left( x-2 \right)}^{2}}}
Let us substitute u=x2u=x-2 in the above equation, then we will get
f(x)=u2\Rightarrow f\left( x \right)=\sqrt{{{u}^{2}}}
Differentiating the above equation with respect to xx, then we will get
f(x)=ddx(u2)\Rightarrow {{f}^{'}}\left( x \right)=\dfrac{d}{dx}\left( \sqrt{{{u}^{2}}} \right)
We have the differentiation formula ddx(x)=12x\dfrac{d}{dx}\left( \sqrt{x} \right)=\dfrac{1}{2\sqrt{x}}. Applying this formula in the above equation, then we will get
f(x)=12u2ddx(u2)\Rightarrow {{f}^{'}}\left( x \right)=\dfrac{1}{2\sqrt{{{u}^{2}}}}\dfrac{d}{dx}\left( {{u}^{2}} \right)
Again, we have the differentiation formula ddx(xn)=nxn1\dfrac{d}{dx}\left( {{x}^{n}} \right)=n{{x}^{n-1}}. Applying this formula in the above equation, then we will have
f(x)=12u2(2u)dudx...(i)\Rightarrow {{f}^{'}}\left( x \right)=\dfrac{1}{2\sqrt{{{u}^{2}}}}\left( 2u \right)\dfrac{du}{dx}...\left( \text{i} \right)
To find the derivative of the given equation, we need to have the value of dudx\dfrac{du}{dx}. We have u=x2u=x-2, so the value of dudx\dfrac{du}{dx} will be
dudx=ddx(x2) dudx=10 dudx=1 \begin{aligned} & \dfrac{du}{dx}=\dfrac{d}{dx}\left( x-2 \right) \\\ & \Rightarrow \dfrac{du}{dx}=1-0 \\\ & \Rightarrow \dfrac{du}{dx}=1 \\\ \end{aligned}
Substituting this value in the equation (i)\left( \text{i} \right) and simplifying, then we will get
f(x)=uu2(1)\Rightarrow {{f}^{'}}\left( x \right)=\dfrac{u}{\sqrt{{{u}^{2}}}}\left( 1 \right)
Substituting the all the values we have, then we will get the derivative of the given equation as
f(x)=x2x2\therefore {{f}^{'}}\left( x \right)=\dfrac{x-2}{\left| x-2 \right|}

Note: We can directly find the derivative of the given equation by using the differentiation formula ddx(f(x))=f(x)f(x)\dfrac{d}{dx}\left( \left| f\left( x \right) \right| \right)=\dfrac{f\left( x \right)}{\left| f\left( x \right) \right|}. From this formula we can have the derivative of the given function as
ddx(x2)=x2x2\Rightarrow \dfrac{d}{dx}\left( \left| x-2 \right| \right)=\dfrac{x-2}{\left| x-2 \right|}
From both the methods we got the same result.