Skip to main content

Graphs of y = |f(x)|: reflection, corners, and local extrema

2026-10-22 Cùng Học Toán Comments: 0

Reflect negative graph portions across the horizontal axis and check stationary and nondifferentiable joining points.

High schoolFunctions, Graphs & Tangents

Content updated: October 22, 2026

An absolute value acts on the graph's vertical coordinates. The nonnegative part stays fixed; the negative part changes sign and reflects across the horizontal axis. Joining points may be nondifferentiable and may still be local extrema.

Objectives: write a piecewise function, construct its graph, and check both stationary and nondifferentiable points.

Prerequisites: function signs, piecewise functions, and derivatives.

On this page: Definition · Method · Examples · Practice · Further learning

1. Formula and graph construction

For a real function $f$ with domain $D$, the function $g(x)=|f(x)|$ has the same domain, and

$$g(x)=\begin{cases}f(x),&f(x)\ge0,\\-f(x),&f(x)<0.\end{cases}$$

The horizontal coordinate stays fixed; only the vertical coordinate changes from $y$ to $|y|$. Thus the graph of $g$ lies on or above $Ox$ and retains every point where $f=0$. Do not reflect across the vertical axis; that operation replaces $x$ by $-x$ and is a different problem.

2. Derivatives and joining points

On an interval where $f>0$ and $f$ is differentiable, $g'=f'$. Where $f<0$, $g'=-f'$. At a zero of $f$, check the derivative or one-sided derivatives separately. Not every zero creates a corner: $|x^2|=x^2$ is still differentiable at 0.

If $f$ is differentiable at $a$ and $f(a)=0$, the quotient $|f(a+h)|/h$ has right-hand limit $|f'(a)|$ and left-hand limit $-|f'(a)|$. Thus $|f|$ is differentiable at $a$ exactly when $f'(a)=0$, in which case its derivative is 0. This criterion assumes differentiability of $f$ at the zero.

For local extrema, examine derivative signs on each interval and add joining points in the domain. The theorem that a differentiable local extremum has derivative 0 does not permit discarding a nondifferentiable point. Every zero of $f$ gives $g=0$, the absolute minimum value whenever a zero exists.

3. Two worked examples

Example 1. The function y = |x − 1|

$$g(x)=\begin{cases}1-x,&x<1,\\x-1,&x\ge1.\end{cases}$$

The domain is $\mathbb R$. The derivative is $-1$ for $x<1$ and 1 for $x>1$. At 1, the one-sided derivatives are $-1$ and 1, so the derivative does not exist. The function decreases on the left and increases on the right; $(1;0)$ is a local minimum point attaining the absolute minimum 0.

Draw two rays joined at $(1;0)$: the left branch has equation $y=1-x$ and the right $y=x-1$. Include the joining point once, without a gap at 1. The graph is symmetric about $x=1$.

Example 2. The function y = |x² − 3x + 2|

Since $x^2-3x+2=(x-1)(x-2)$, the quadratic is nonnegative for $x\le1$ or $x\ge2$ and negative for $1<x<2$. Hence

$$g(x)=\begin{cases}x^2-3x+2,&x\le1\ \text{or}\ x\ge2,\\-x^2+3x-2,&1<x<2.\end{cases}$$

The derivative is $2x-3$ for $x<1$ or $x>2$ and $-2x+3$ for $1<x<2$. The function decreases on $(-\infty;1)$, increases on $(1;3/2)$, decreases on $(3/2;2)$, and increases on $(2;+\infty)$.

At 1, the one-sided derivatives are $-1,1$; at 2, they are also $-1,1$. Both points are nondifferentiable local minima with value 0. At $x=3/2$, there is a local maximum $g(3/2)=1/4$. Both ends tend to $+\infty$, so there is no absolute maximum.

The graph retains the original parabola outside $[1;2]$ and flips its below-axis portion on $(1;2)$ upward. It passes through $(0;2)$, $(1;0)$, $(3/2;1/4)$, and $(2;0)$, and is symmetric about $x=3/2$. The reflected portion joins continuously to the two outer portions.

−1.0 −0.5 0.0 0.5 1.0 1.5 2.0 2.5 3.0 x 0.0 0.5 1.0 1.5 2.0 2.5 3.0 y (1, 0) y = |x − 1| 0.0 0.5 1.0 1.5 2.0 2.5 3.0 x 0.0 0.5 1.0 1.5 2.0 y (1, 0) (2, 0) (3/2, 1/4) y = |x² − 3x + 2|
The examples are shown side by side; the joining points on Ox remain in the domain. The point (3/2;1/4) is a local maximum in Example 2.

4. Practice

  1. Graph $|x+2|$ and find its local minimum.
  2. Is $|x^2|$ differentiable at 0? Why does a zero inside an absolute value not always create a corner?
  3. Solve $|x^2-3x+2|=0$ and state whether those points belong to the graph.
Hints and answers
  1. The branches are $-(x+2)$ for $x<-2$ and $x+2$ for $x\ge-2$. The local minimum point is $(-2;0)$, attaining the absolute minimum 0.
  2. Yes, since $|x^2|=x^2$; its derivative at 0 is 0. The inner function vanishes there but also has derivative 0, in agreement with the criterion in Section 2.
  3. The solutions are $x=1,2$; both $(1;0),(2;0)$ are retained by the reflection and are not excluded from the domain.

5. Common mistakes

Do not retain any graph portion below Ox. Do not replace $|f(x)|$ by $f(|x|)$. Do not find extrema solely from a zero-derivative equation while omitting corners. Piecewise branches must cover the full domain and retain the joining points.

6. Further learning

Graphs of even quartic functions (English lesson) · Graphs of cubic functions (English lesson) · Counting equation solutions using graphs (English lesson) · Derivatives (English lesson).

Leave a Reply

Your email address will not be published. Required fields are marked *