← Back to course

Math — Mechina

Functions and graph transformations

Summary

A function assigns to each xx in the domain exactly one value yy. The set of all values yy obtained is called the range of the function.

Knowing one graph, you know the graphs of many functions: every change in the formula is a shift or a reflection of the graph.

  • f(x)+kf(x)+k — a shift of kk units up (k<0k<0: down).
  • f(x+k)f(x+k) — a shift of kk units left (k<0k<0: right).
  • −f(x)-f(x) — reflection in the xx axis.
  • f(−x)f(-x) — reflection in the yy axis.
  • ∣f(x)∣|f(x)| — the parts below the xx axis are reflected upward.
  • f(∣x∣)f(|x|) — erase the part left of the yy axis and reflect the right part onto it.
-3-2-112345-11234567xyy=x²y=(x−2)²+1(0, 0)(2, 1)
f(x−2)+1f(x-2)+1: the same parabola, 2 right and 1 up. The vertex moved from (0,0)(0,0) to (2,1)(2,1).
-4-3-2-11234-5-4-3-2-1123456xyy=x²−4y=|x²−4|(0, 4)(0, -4)
∣f(x)∣|f(x)|: the part between −2-2 and 22, which was below the axis, is reflected upward.

Question types

1

Domain and range

Usually an opening part: before analysis or sketching, find where the function is defined and which values it takes.

Worked example

Find the domain and range of f(x)=1+x−2f(x)=1+\sqrt{x-2}.

Solution

  1. Domain: x−2≥0x-2\geq 0, i.e. x≥2x\geq 2.
  2. x−2\sqrt{x-2} takes every value ≥0\geq 0, so f(x)≥1f(x)\geq 1.
  3. Range: y≥1y\geq 1. The graph is x\sqrt{x} shifted 2 right and 1 up.
246810-112345xy(2, 1)

Variants of this type · 3

1.1Fraction — a denominator that becomes zero

Worked example

Find the domain of f(x)=3x2−4f(x)=\frac{3}{x^2-4}.

Solution

IdeaIn a fraction the denominator is not zero.
  1. x2−4≠0x^2-4\neq 0, that is x≠±2x\neq\pm 2.
  2. Domain: every xx except −2-2 and 22.
Checkf(2)f(2) — division by zero ✓ excluded.
Common mistakeExcluding only x=2x=2.
1.2Root of a quadratic expression

Worked example

Find the domain of f(x)=x2−9f(x)=\sqrt{x^2-9}.

Solution

IdeaUnder the root — a non-negative expression; this is a quadratic inequality.
  1. x2−9≥0x^2-9\geq 0.
  2. x≤−3x\leq -3 or x≥3x\geq 3.
Checkf(0)=−9f(0)=\sqrt{-9} — undefined ✓.
Common mistakeAnswering only x≥3x\geq 3.
1.3Range of a parabola

Worked example

Find the range of f(x)=x2+2xf(x)=x^2+2x.

Solution

IdeaThe range of a parabola is set by its vertex.
  1. xv=−1x_v=-1, f(−1)=−1f(-1)=-1.
  2. a>0a>0: the range is y≥−1y\geq -1.
Checkf(0)=0≥−1f(0)=0\geq -1 ✓.
Common mistakeAnswering "all numbers" — a parabola never covers the whole line.
2

Recognizing shifts

You are given a function and asked how its graph is obtained from a basic graph, or where the vertex is.

Worked example

Describe how the graph of y=(x+3)2−4y=(x+3)^2-4 is obtained from the graph of y=x2y=x^2, and find the vertex.

Solution

  1. (x+3)2(x+3)^2: a shift of 3 to the left.
  2. −4-4: a shift of 4 down.
  3. The vertex moves from (0,0)(0,0) to (−3,−4)(-3,-4).
-7-6-5-4-3-2-1123-5-4-3-2-1123456xy(-3, -4)

Variants of this type · 3

2.1Reflections −f(x)-f(x) and f(−x)f(-x)

Worked example

Given f(x)=(x−2)2f(x)=(x-2)^2. Describe g(x)=−f(x)g(x)=-f(x) and h(x)=f(−x)h(x)=f(-x).

Solution

IdeaA minus outside the function — reflection in the xx-axis; a minus on xx — reflection in the yy-axis.
  1. g(x)=−(x−2)2g(x)=-(x-2)^2: opens downward, vertex (2,0)(2,0).

    Why: Every yy value changes sign.

  2. h(x)=(−x−2)2=(x+2)2h(x)=(-x-2)^2=(x+2)^2: vertex (−2,0)(-2,0).

    Why: Every point (x,y)(x,y) moves to (−x,y)(-x,y).

Checkh(−2)=f(2)=0h(-2)=f(2)=0 ✓.
Common mistakeMixing up the two reflections.
2.2Stretch a⋅f(x)a\cdot f(x)

Worked example

How is y=2x2−4y=2x^2-4 obtained from the graph of y=x2y=x^2?

Solution

IdeaMultiplying — vertical stretch; adding — vertical shift. Order: stretch first, then shift.
  1. y=2x2y=2x^2: stretch by a factor of 22 along the yy-axis (a "narrower" parabola).
  2. y=2x2−4y=2x^2-4: shift 44 down.
  3. Vertex (0,−4)(0,-4).
Checkx=1x=1: 2−4=−22-4=-2; from x2x^2: 1→2→−21\to 2\to -2 ✓.
Common mistakeShifting first and then stretching — getting 2(x2−4)=2x2−82(x^2-4)=2x^2-8.
2.3Combining several transformations

Worked example

How is y=−(x−1)2+3y=-(x-1)^2+3 obtained from y=x2y=x^2? What is the vertex?

Solution

IdeaBreak it into steps: horizontal shift, reflection, vertical shift.
  1. (x−1)2(x-1)^2: right by 11.
  2. −(x−1)2-(x-1)^2: reflection in the xx-axis.
  3. +3+3: up by 33. Vertex (1,3)(1,3).
Checky(1)=3y(1)=3, and y(0)=2<3y(0)=2<3 — it is a maximum ✓.
Common mistakex−1x-1 — a shift to the left.
3

Absolute value of the whole function: |f(x)|

y=∣f(x)∣y=|f(x)|: sketch ff and reflect upward whatever is below the xx axis.

Worked example

Sketch y=∣x2−2x−3∣y=|x^2-2x-3| and find the highest point between the roots.

Solution

  1. x2−2x−3=(x−3)(x+1)x^2-2x-3=(x-3)(x+1), roots −1-1 and 33.
  2. Between the roots the parabola is negative, and its vertex is (1,−4)(1,-4).
  3. After the reflection: a local maximum at (1,4)(1,4).
-3-2-112345-4-22468xy(-1, 0)(3, 0)(1, 4)

Variants of this type · 1

3.1∣f(x)∣|f(x)| of a line

Worked example

Sketch y=∣2x−4∣y=|2x-4| and find the minimum point.

Solution

IdeaThe part of the line below the xx-axis "flips" upward.
  1. 2x−4=02x-4=0 at x=2x=2.
  2. For x<2x<2 the graph is 4−2x4-2x; for x≥2x\geq 2 — 2x−42x-4.
  3. Minimum (2,0)(2,0) — a V shape.
Checky(0)=4y(0)=4, y(4)=4y(4)=4 — symmetric about x=2x=2 ✓.
Common mistakeLeaving a negative part in the graph.
4

Absolute value of the variable: f(|x|)

y=f(∣x∣)y=f(|x|): the graph is symmetric about the yy axis. Solve for x≥0x\geq 0 and reflect.

Worked example

How many solutions does x2−4∣x∣+3=0x^2-4|x|+3=0 have?

Solution

  1. For x≥0x\geq 0: x2−4x+3=0x^2-4x+3=0, so x=1x=1 or x=3x=3.
  2. The graph is symmetric, so also x=−1x=-1 and x=−3x=-3.
  3. Answer: 4 solutions.
-5-4-3-2-112345-2-112345xy(-3, 0)(-1, 0)(1, 0)(3, 0)

Variants of this type · 2

4.1f(∣x∣)f(|x|) of a line

Worked example

How many solutions does ∣x∣−2=1|x|-2=1 have?

Solution

Ideaf(∣x∣)f(|x|) — take the right half of the graph and reflect it to the left.
  1. ∣x∣=3|x|=3.
  2. x=±3x=\pm 3 — two solutions.
Check∣−3∣−2=1|-3|-2=1 ✓.
Common mistakeFinding only x=3x=3.
4.2Number of solutions depending on a parameter

Worked example

For which values of kk does x2−4∣x∣+3=kx^2-4|x|+3=k have exactly three solutions?

Solution

IdeaThe graph of x2−4∣x∣+3x^2-4|x|+3 is symmetric and W-shaped. Three solutions — when the line passes through the point on the yy-axis.
  1. For x≥0x\geq 0: x2−4x+3x^2-4x+3, vertex (2,−1)(2,-1).
  2. Value on the yy-axis: (0,3)(0,3).
  3. k=3k=3: the line touches at x=0x=0 and crosses at two more points.
Checkx2−4∣x∣+3=3x^2-4|x|+3=3 ⇔ ∣x∣(∣x∣−4)=0|x|(|x|-4)=0 ⇔ x=0,±4x=0,\pm 4 ✓.
Common mistakeAnswering k=−1k=-1 — there are two solutions there (the two vertices).

Exam-style problems

One problem with several parts on the same data, as on the exam. Each part adds something to the drawing.

Practice · 20

Test yourself with problems and full solutions.

Go to practice