# differentiation of a modulus function

• Jun 3rd 2006, 12:06 AM
freswood
differentiation of a modulus function
I'm a little confused

f(x) = |x|^2 - 4|x|

I know that gives the equations of:
x^2 - 4x and
x^2 + 4x

and you can differentiate them, but which equation corresponds to which part of the graph?

• Jun 3rd 2006, 12:38 AM
CaptainBlack
Quote:

Originally Posted by freswood
I'm a little confused

f(x) = |x|^2 - 4|x|

I know that gives the equations of:
x^2 - 4x and
x^2 + 4x

and you can differentiate them, but which equation corresponds to which part of the graph?

When $\displaystyle x\ge 0$:

$\displaystyle |x|^2 - 4|x|=x^2-4x$.

When $\displaystyle x\le 0$:

$\displaystyle |x|^2 - 4|x|=x^2+4x$.

As a reality check you can always try plugging in numbers and seeing what
you get.

RonL
• Jun 3rd 2006, 04:02 AM
Soroban
Hello, freswood!

Quote:

Find the derivtive of: $\displaystyle f(x) \:= \:|x|^2 - 4|x|$
This is equivalent to the piecewise function: $\displaystyle f(x)\:=\:\left\{\begin{array}{cc} x^2 - 4x & x \geq 0 \\ x^2 + 4x & x < 0\end{array}$

Differentiate them for both cases.

You can check your results against the graph.

Code:

                      |         *            |            *                       |         *            |            *       - - * - - - - - * - - - - - * - -         -4 *      * | *      * 4               * *    |    * *                       |
• Jun 3rd 2006, 06:39 AM
malaygoel
Quote:

Originally Posted by Soroban
Differentiate them for both cases.

differention of |x|=|x|/x
where x is not equal to 0
• Jun 3rd 2006, 02:00 PM
freswood
Thanks! :)

What confused me is that for something like |x^2 - 4x| one applies to y>0 and the other to y < 0.

as in x < 0 U x > 4
and 0<x<4

Can anyone explain the difference between the two?