Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

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

seo-qna
Last updated date: 24th Jul 2024
Total views: 384.3k
Views today: 8.84k
Answer
VerifiedVerified
384.3k+ views
Hint: 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 $\sqrt{{{\left( x-2 \right)}^{2}}}$. Now we will use the substitution method and substitute the value $u=x-2$. Now we will differentiate the $u$ with respect to $x$ as well as we will differentiate the given equation with respect to $x$. Now we will simplify the obtained equation by using the differentiation value of $u$. After substituting this value and simplifying the obtained equation, we will get the required result.

Complete step by step solution:
Given that, $\left| x-2 \right|$.
Here in the above equation, we can observe the absolute function, so we can write the above equation as
$\Rightarrow f\left( x \right)=\sqrt{{{\left( x-2 \right)}^{2}}}$
Let us substitute $u=x-2$ in the above equation, then we will get
$\Rightarrow f\left( x \right)=\sqrt{{{u}^{2}}}$
Differentiating the above equation with respect to $x$, then we will get
$\Rightarrow {{f}^{'}}\left( x \right)=\dfrac{d}{dx}\left( \sqrt{{{u}^{2}}} \right)$
We have the differentiation formula $\dfrac{d}{dx}\left( \sqrt{x} \right)=\dfrac{1}{2\sqrt{x}}$. Applying this formula in the above equation, then we will get
$\Rightarrow {{f}^{'}}\left( x \right)=\dfrac{1}{2\sqrt{{{u}^{2}}}}\dfrac{d}{dx}\left( {{u}^{2}} \right)$
Again, we have the differentiation formula $\dfrac{d}{dx}\left( {{x}^{n}} \right)=n{{x}^{n-1}}$. Applying this formula in the above equation, then we will have
$\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 $\dfrac{du}{dx}$. We have $u=x-2$, so the value of $\dfrac{du}{dx}$ will be
$\begin{align}
  & \dfrac{du}{dx}=\dfrac{d}{dx}\left( x-2 \right) \\
 & \Rightarrow \dfrac{du}{dx}=1-0 \\
 & \Rightarrow \dfrac{du}{dx}=1 \\
\end{align}$
Substituting this value in the equation $\left( \text{i} \right)$ and simplifying, then we will get
$\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
$\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 $\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
$\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.