---
title: "Functions"
book: "High School Mathematics"
subject: math
language: en
chapter: 3
exercises: 10
source: https://one-course.com/books/math/2/en/chapter/3-functions
---

# Chapter 3 — Functions

A [function](#def-g10-functions-function) is a machine that takes a number in and produces a number out, always the same output for the same input. [Functions](#def-g10-functions-function) are the central objects of the analysis you will build over the next years ([Chapter 10](https://one-course.com/books/math/2/en/chapter/10-quadratic-functions-and-equations#ch-g11-quad) onward); this chapter sets up the vocabulary — [domain](#def-g10-functions-function), [image](#def-g10-functions-function), [graph](#def-g10-functions-graph), variations — and trains the essential skill of reading information off a [graph](#def-g10-functions-graph).

## 3.1 Vocabulary: images and preimages

**Definition 3.1 (Function).**

Let $D$ be a set of [real numbers](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-sets). A *function* $f$ defined on $D$ associates to each number $x \in D$ exactly one [real number](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-sets), written $f(x)$ and called the *image* of $x$. The set $D$ is the *domain* of $f$. We write

$$
f : x \longmapsto f(x).
$$

If $f(x) = y$, then $x$ is a *preimage* of $y$.

**Remark 3.2.**

Each $x$ in the [domain](#def-g10-functions-function) has exactly one [image](#def-g10-functions-function), but a number $y$ can have several [preimages](#def-g10-functions-function), or none. For $f(x) = x^2$: the [image](#def-g10-functions-function) of $3$ is $9$, and $9$ has two [preimages](#def-g10-functions-function), $3$ and $-3$; the number $-4$ has no [preimage](#def-g10-functions-function).

**Example 3.3 (Finding a domain).**

When a [function](#def-g10-functions-function) is given by a formula, its [domain](#def-g10-functions-function) is the set of $x$ for which the formula makes sense.

- $f(x) = 3x^2 - 5x + 1$ makes sense for every $x$ : the [domain](#def-g10-functions-function) is $\R$ .
- $g(x) = \dfrac{1}{x - 2}$ requires $x - 2 \neq 0$ : the [domain](#def-g10-functions-function) is all reals except $2$ .
- $h(x) = \sqrt{x - 3}$ requires $x - 3 \geq 0$ : the [domain](#def-g10-functions-function) is $\intco{3}{+\infty}$ .

**Example 3.4 (Computing images and preimages).**

Let $f(x) = x^2 - 4x + 3$, defined on $\R$.

*[Image](#def-g10-functions-function) of $5$:* substitute $x = 5$: $f(5) = 25 - 20 + 3 = 8$.

*[Preimages](#def-g10-functions-function) of $3$:* solve $f(x) = 3$:

$$
x^2 - 4x + 3 = 3
\quad\Longleftrightarrow\quad
x^2 - 4x = 0
\quad\Longleftrightarrow\quad
x(x - 4) = 0,
$$

so the [preimages](#def-g10-functions-function) of $3$ are $0$ and $4$.

## 3.2 The graph of a function

**Definition 3.5 (Graph).**

In a coordinate system, the *graph* (or *curve*) of $f$ is the set of all points $(x, f(x))$ for $x$ in the [domain](#def-g10-functions-function). In other words, a point $(x, y)$ lies on the graph exactly when $y = f(x)$.

![Reading an image on a graph: start from x = 3 on the horizontal axis, go vertically to the curve, then horizontally to the vertical axis to read f(3) = -1.](https://one-course.com/images/onecourse/chapters/math-2/g10-functions/fig-7b566b99be89.svg)

*Reading an [image](#def-g10-functions-function) on a [graph](#def-g10-functions-graph): start from $x = 3$ on the horizontal axis, go vertically to the curve, then horizontally to the vertical axis to read $f(3) = -1$.*

**Method 3.6 (Reading a graph).**

On the [graph](#def-g10-functions-graph) of $f$:

1. *[image](#def-g10-functions-function) of $a$* : go vertically from $x = a$ on the horizontal axis to the curve, then horizontally to the vertical axis; the value read there is $f(a)$ ;
2. *[preimages](#def-g10-functions-function) of $b$* : draw the horizontal line $y = b$ ; the [preimages](#def-g10-functions-function) are the $x$ -coordinates of all its [intersection](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interunion) points with the curve;
3. *solutions of $f(x) = k$* : same as the [preimages](#def-g10-functions-function) of $k$ ;
4. *solutions of $f(x) \leq k$* : the $x$ for which the curve is on or below the line $y = k$ .

![Solving f(x) = k graphically: the solutions x_1 and x_2 are the abscissas of the intersection points of the curve with the horizontal line y = k. Here f(x) ≤ k holds on (x_1, x_2), where the curve is below the line.](https://one-course.com/images/onecourse/chapters/math-2/g10-functions/fig-d26495113fd4.svg)

*Solving $f(x) = k$ graphically: the solutions $x_1$ and $x_2$ are the abscissas of the [intersection](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interunion) points of the curve with the horizontal line $y = k$. Here $f(x) \leq k$ holds on $\intcc{x_1}{x_2}$, where the curve is below the line.*

**Example 3.7.**

Is the point $A(2, 5)$ on the [graph](#def-g10-functions-graph) of $f(x) = x^2 + 1$? Compute $f(2) = 4 + 1 = 5$: yes, since $f(2)$ equals the $y$-coordinate of $A$. The point $B(3, 8)$ is not on the [graph](#def-g10-functions-graph), because $f(3) = 10 \neq 8$.

## 3.3 Variations of a function

**Definition 3.8 (Increasing, decreasing).**

Let $f$ be defined on an [interval](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interval) $I$.

- $f$ is *increasing* on $I$ when for all $u, v \in I$ , if $u < v$ then $f(u) \leq f(v)$ : the outputs grow with the inputs, and the [graph](#def-g10-functions-graph) climbs from left to right.
- $f$ is *decreasing* on $I$ when $u < v$ implies $f(u) \geq f(v)$ : the [graph](#def-g10-functions-graph) falls from left to right.

With strict inequalities $f(u) < f(v)$ (resp. $>$) we say *strictly* increasing (resp. decreasing).

**Definition 3.9 (Variation table).**

A *variation table* summarizes on which [intervals](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interval) $f$ increases and decreases, with arrows $\nearrow$ and $\searrow$, and records the values of $f$ at the turning points.

**Example 3.10.**

Consider the [function](#def-g10-functions-function) graphed below on $\intcc{-2}{4}$.

![A function defined on (-2, 4), increasing then decreasing.](https://one-course.com/images/onecourse/chapters/math-2/g10-functions/fig-0353dee9a0b8.svg)

*A [function](#def-g10-functions-function) defined on $\intcc{-2}{4}$, [increasing](#def-g10-functions-variations) then [decreasing](#def-g10-functions-variations).*

Reading the [graph](#def-g10-functions-graph): $f$ increases from $f(-2) = -1.5$ up to its [maximum](#def-g10-functions-extrema) $f(1) = 3$, then decreases down to $f(4) = -1.5$. Its [variation table](#def-g10-functions-table) is

| $x$ | $-2$ |  | $1$ |  | $4$ |
| --- | --- | --- | --- | --- | --- |
| $f$ | $-1.5$ | $\nearrow$ | $3$ | $\searrow$ | $-1.5$ |

**Example 3.11 (Proving a variation).**

Show that $f(x) = 3x + 1$ is strictly [increasing](#def-g10-functions-variations) on $\R$. Take any $u < v$ and compare the [images](#def-g10-functions-function):

$$
f(v) - f(u) = (3v + 1) - (3u + 1) = 3(v - u) > 0,
$$

because $v - u > 0$. So $f(u) < f(v)$: the [function](#def-g10-functions-function) is strictly [increasing](#def-g10-functions-variations). The same computation with a negative slope, e.g. $g(x) = -2x + 5$, gives $g(v) - g(u) = -2(v-u) < 0$: strictly [decreasing](#def-g10-functions-variations).

## 3.4 Extrema

**Definition 3.12 (Maximum, minimum).**

Let $f$ be defined on $D$ and $a \in D$. The value $f(a)$ is the *maximum* of $f$ on $D$ when $f(x) \leq f(a)$ for all $x \in D$; it is the *minimum* when $f(x) \geq f(a)$ for all $x \in D$. On a [graph](#def-g10-functions-graph), they are the highest and lowest points of the curve.

**Example 3.13.**

Show that $f(x) = (x - 1)^2 + 2$ has [minimum](#def-g10-functions-extrema) $2$ on $\R$, attained at $x = 1$. For every $x$, the square $(x-1)^2$ is $\geq 0$, so $f(x) = (x-1)^2 + 2 \geq 2$; and $f(1) = 0 + 2 = 2$, so the value $2$ is actually reached. Both facts together prove that $2$ is the [minimum](#def-g10-functions-extrema).

![The curve of f(x) = (x-1)2 + 2 never goes below the dashed line y = 2, and touches it at x = 1: the minimum of f is 2.](https://one-course.com/images/onecourse/chapters/math-2/g10-functions/fig-87e2c2026d31.svg)

*The curve of $f(x) = (x-1)^2 + 2$ never goes below the dashed line $y = 2$, and touches it at $x = 1$: the [minimum](#def-g10-functions-extrema) of $f$ is $2$.*

## 3.5 Exercises

**Exercise 3.1 ★.**

Let $f(x) = 2x^2 - 3x + 1$. Compute the [images](#def-g10-functions-function) of $0$, $2$, $-1$ and $\frac12$.

**Solution of Exercise 3.1.**

$f(0) = 1$; $f(2) = 8 - 6 + 1 = 3$; $f(-1) = 2 + 3 + 1 = 6$; $f\!\left(\tfrac12\right) = 2 \times \tfrac14 - \tfrac32 + 1 = \tfrac12 -
\tfrac32 + 1 = 0$.

**Exercise 3.2 ★.**

Give the [domain](#def-g10-functions-function) of each [function](#def-g10-functions-function):

$$
f(x) = 5x - 2, \qquad
g(x) = \frac{3}{x + 4}, \qquad
h(x) = \sqrt{2x - 6}, \qquad
k(x) = \frac{1}{x^2 + 1}.
$$

**Solution of Exercise 3.2.**

$f$: no constraint, [domain](#def-g10-functions-function) $\R$.

$g$: requires $x + 4 \neq 0$, [domain](#def-g10-functions-function) all reals except $-4$.

$h$: requires $2x - 6 \geq 0$, i.e. $x \geq 3$: [domain](#def-g10-functions-function) $\intco{3}{+\infty}$.

$k$: $x^2 + 1 \geq 1 > 0$ never vanishes, [domain](#def-g10-functions-function) $\R$.

**Exercise 3.3 ★.**

Let $f(x) = x^2 - 2x$. Find all [preimages](#def-g10-functions-function) of $0$, of $3$, and of $-1$.

**Solution of Exercise 3.3.**

*[Preimages](#def-g10-functions-function) of $0$:* $x^2 - 2x = x(x-2) = 0$, so $0$ and $2$.

*[Preimages](#def-g10-functions-function) of $3$:* $x^2 - 2x = 3$, i.e. $x^2 - 2x - 3 = 0$, i.e. $(x-3)(x+1) = 0$ (check by [expanding](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-expand)), so $3$ and $-1$.

*[Preimages](#def-g10-functions-function) of $-1$:* $x^2 - 2x + 1 = (x - 1)^2 = 0$, so the single [preimage](#def-g10-functions-function) $1$.

**Exercise 3.4 ★.**

Does the point $A(-1, 4)$ belong to the [graph](#def-g10-functions-graph) of $f(x) = x^2 - 2x + 1$? And the point $B(2, 1)$? Justify by a computation.

**Solution of Exercise 3.4.**

$f(-1) = 1 + 2 + 1 = 4$: yes, $A(-1, 4)$ is on the [graph](#def-g10-functions-graph). $f(2) = 4 - 4 + 1 = 1$: yes, $B(2, 1)$ is on the [graph](#def-g10-functions-graph) too.

**Exercise 3.5 ★.**

A [function](#def-g10-functions-function) $g$ defined on $\intcc{-3}{5}$ has the [variation table](#def-g10-functions-table)

| $x$ | $-3$ |  | $0$ |  | $3$ |  | $5$ |
| --- | --- | --- | --- | --- | --- | --- | --- |
| $g$ | $1$ | $\searrow$ | $-2$ | $\nearrow$ | $4$ | $\searrow$ | $0$ |

1. What are the [maximum](#def-g10-functions-extrema) and the [minimum](#def-g10-functions-extrema) of $g$ on $\intcc{-3}{5}$ ?
2. Compare $g(-1)$ and $g(-0.5)$ without knowing their values.
3. How many solutions does the [equation](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-equation) $g(x) = 0$ have at most on each [interval](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interval) of the table?

**Solution of Exercise 3.5.**

*1.* The largest value in the table is $4 = g(3)$ ([maximum](#def-g10-functions-extrema)), the smallest is $-2 = g(0)$ ([minimum](#def-g10-functions-extrema)).

*2.* On $\intcc{-3}{0}$ the [function](#def-g10-functions-function) decreases, and $-1 < -0.5$, so $g(-1) \geq g(-0.5)$.

*3.* On each [interval](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interval) of monotonicity, $g$ takes each value at most once, so $g(x) = 0$ has at most one solution per [interval](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interval): at most $3$ solutions in total. (Here $0$ lies between $-2$ and $1$, between $-2$ and $4$, and between $0$ and $4$, so there are exactly three.)

**Exercise 3.6 ★★.**

Let $f(x) = -2x + 7$. Show, by comparing $f(u)$ and $f(v)$ for $u < v$, that $f$ is strictly [decreasing](#def-g10-functions-variations) on $\R$.

**Solution of Exercise 3.6.**

Let $u < v$. Then

$$
f(v) - f(u) = (-2v + 7) - (-2u + 7) = -2(v - u) < 0,
$$

since $v - u > 0$. So $f(v) < f(u)$: $f$ is strictly [decreasing](#def-g10-functions-variations) on $\R$.

**Exercise 3.7 ★★.**

Show that the [function](#def-g10-functions-function) $f(x) = x^2 + 6x + 11$ has a [minimum](#def-g10-functions-extrema) on $\R$, and give its value and where it is attained. (Hint: write $f(x) = (x + 3)^2 + c$ for the right constant $c$.)

**Solution of Exercise 3.7.**

Complete the square: $(x+3)^2 = x^2 + 6x + 9$, so

$$
f(x) = x^2 + 6x + 11 = (x + 3)^2 + 2 .
$$

For every $x$, $(x+3)^2 \geq 0$, so $f(x) \geq 2$; and $f(-3) = 0 + 2 = 2$. The [minimum](#def-g10-functions-extrema) of $f$ is $2$, attained at $x = -3$.

**Exercise 3.8 ★★.**

A rectangular garden has perimeter $40$ m. Let $x$ be its width, in meters.

1. Express the length, then the area $A(x)$ , as [functions](#def-g10-functions-function) of $x$ . For which $x$ does this make sense?
2. Compute $A(4)$ , $A(8)$ , $A(10)$ , $A(12)$ and $A(16)$ . What do you conjecture about the shape of largest area?

**Solution of Exercise 3.8.**

*1.* Length $+$ width $= 20$, so the length is $20 - x$ and

$$
A(x) = x(20 - x).
$$

Both dimensions must be positive: $0 < x < 20$.

*2.* $A(4) = 64$, $A(8) = 96$, $A(10) = 100$, $A(12) = 96$, $A(16) = 64$. The values rise until $x = 10$ then fall symmetrically: the area seems largest for $x = 10$, i.e. for a *square* garden. ([Chapter 10](https://one-course.com/books/math/2/en/chapter/10-quadratic-functions-and-equations#ch-g11-quad) proves this conjecture.)

**Exercise 3.9 ★★.**

Let $f(x) = \dfrac{1}{x^2 + 1}$, defined on $\R$.

1. Show that $0 < f(x) \leq 1$ for every real $x$ .
2. Does $f$ have a [maximum](#def-g10-functions-extrema) on $\R$ ? A [minimum](#def-g10-functions-extrema) ? Justify.

**Solution of Exercise 3.9.**

*1.* For every $x$: $x^2 + 1 \geq 1 > 0$, so $f(x) = \frac{1}{x^2+1}$ is positive, and since $x^2 + 1 \geq 1$, taking inverses (both sides positive) gives $f(x) \leq 1$.

*2.* [Maximum](#def-g10-functions-extrema): $f(0) = 1$ and $f(x) \leq 1$ for all $x$, so $1$ is the [maximum](#def-g10-functions-extrema), attained at $0$. [Minimum](#def-g10-functions-extrema): $f(x) > 0$ always, but no value of $x$ achieves $0$ (a quotient of nonzero numbers is nonzero), and $f$ takes values as close to $0$ as we like for large $x$; so $f$ has no [minimum](#def-g10-functions-extrema).

**Exercise 3.10 ★★★.**

Let $f(x) = x^2$ on $\R$.

1. Let $0 \leq u < v$ . Factor $f(v) - f(u)$ and deduce that $f$ is strictly [increasing](#def-g10-functions-variations) on $\intco{0}{+\infty}$ .
2. Adapt the argument to show that $f$ is strictly [decreasing](#def-g10-functions-variations) on $\intoc{-\infty}{0}$ .

**Solution of Exercise 3.10.**

*1.* $f(v) - f(u) = v^2 - u^2 = (v-u)(v+u)$. If $0 \leq u < v$, then $v - u > 0$ and $v + u > 0$ (sum of a nonnegative and a positive number), so $f(v) - f(u) > 0$: $f$ is strictly [increasing](#def-g10-functions-variations) on $\intco{0}{+\infty}$.

*2.* If $u < v \leq 0$, then $v - u > 0$ still, but now $v + u < 0$ (sum of a nonpositive and a negative number), so $f(v) - f(u) < 0$: $f$ is strictly [decreasing](#def-g10-functions-variations) on $\intoc{-\infty}{0}$.

## 3.6 Problem: Machines fed their own output

**Problem 3.1.**

Weekend problem — fixed points, iteration, and three famous machines: Heron’s improver, the squarer, and the unsolved hailstone

A [function](#def-g10-functions-function) is a machine: a number goes in, a number comes out. The most interesting experiments feed the machine *its own output*, again and again — and then two questions dominate: does the process settle somewhere (a *[fixed point](#pb-g10-functions-1)*), and how does the machine’s variation drive it there? One of this problem’s machines has been polishing square roots for two thousand years; another guards the most famous unsolved problem elementary mathematics has to offer.

**Part I — Heron’s machine.** Consider the [function](#def-g10-functions-function)

$$
f(x) = \frac12\left(x + \frac2x\right).
$$

1. Give the [domain](#def-g10-functions-function) of $f$ , and compute $f(1)$ , $f(2)$ and $f\!\left(\frac32\right)$ as exact fractions.
2. Find all [preimages](#def-g10-functions-function) of $\frac32$ : solve $f(x) = \frac32$ (clear the denominator and use the methods of [Problem 2.1](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#pb-g10-algebra-1) ).
3. A *fixed point* of $f$ is a number unchanged by the machine: $f(x) = x$ . Find both [fixed points](#pb-g10-functions-1) of $f$ . Which old acquaintance guards the positive one?
4. Starting from $x = 1$ , feed the machine its own output three times and record the exact results. Which sequence of the irrationality weekend problem of the Middle School volume have you rebuilt — and what was “Heron’s recipe”, in the language of [functions](#def-g10-functions-function) ?
5. On one picture, sketch the [graph](#def-g10-functions-graph) of $f$ (for $x > 0$ ) and the diagonal line $y = x$ . Where are the [fixed points](#pb-g10-functions-1) on this picture? (Compare the two-thermometers weekend problem of the Middle School volume: the temperature reading the same in both scales was the same idea.)

**Part II — Why the machine cannot miss.**

6. For $0 < u < v$, show by reduction to a common denominator that $$f(v) - f(u) = \frac{(v - u)(uv - 2)}{2uv} ,$$ and deduce the variations of $f$ on $\intoo{0}{+\infty}$: [decreasing](#def-g10-functions-variations) up to a point, then [increasing](#def-g10-functions-variations) — which point? (Same technique as [Exercise 3.10](#exo-g10-functions-10).)
7. Deduce that on $\intoo{0}{+\infty}$ the [function](#def-g10-functions-function) $f$ has a [minimum](#def-g10-functions-extrema) , worth exactly $\sqrt2$ , attained at $\sqrt2$ . What does this say about *every* output of the machine (positive inputs)?
8. Show that if $x > \sqrt2$ then $\sqrt2 < f(x) < x$ : a too-big guess is always improved, never overshot. (For $f(x) < x$ , compare $\frac2x$ with $x$ .)
9. Assemble questions 6–8 into the [variation table](#def-g10-functions-table) of $f$ on $\intoo{0}{+\infty}$ ( [Definition 3.9](#def-g10-functions-table) ), [minimum](#def-g10-functions-extrema) included.
10. A second machine: $g(x) = x^2$ . Its [fixed points](#pb-g10-functions-1) are $0$ and $1$ (check). Iterate $g$ four times from $x = 0.9$ , then four times from $x = 1.1$ (calculator, three decimals). One [fixed point](#pb-g10-functions-1) attracts, the other repels: which is which?

**Part III — The hailstone machine.** On the whole numbers, define: $h(n) = \frac n2$ if $n$ is even, and $h(n) = 3n + 1$ if $n$ is odd. Numbers bounce under $h$ like hailstones in a storm cloud.

11. Compute the full flight of $7$ under $h$ , down to $1$ . How many steps does it take, and how high does it fly?
12. Start the flight of $27$ and compute ten steps. (Its full flight lasts $111$ steps and peaks at $9\,232$ — from a starting point of $27$ .) What lesson about simple rules do $7$ and $27$ teach?
13. Explain why any flight that reaches a power of $2$ crashes straight to $1$ , and what happens at $1$ (compute $h(1)$ , $h(4)$ , $h(2)$ ). Does $h$ have any [fixed point](#pb-g10-functions-1) among the positive whole numbers? What does the end of every observed flight form instead?
14. The *Collatz conjecture* claims every starting number eventually reaches $1$ . Computers have verified it far beyond $10^{20}$ ; no human has proved it. What two kinds of discovery would *disprove* it? And why does massive verification still not close the case (the matchstick-oracle weekend problem of the Middle School volume rang this bell)?
15. “Mathematics is not yet ripe for such questions,” said Paul Erdős of this conjecture. In one sentence: what separates the hailstone machine from Heron’s, where questions 6–8 settled everything?

**Part IV — The machine user’s manual.**

16. [Domains](#def-g10-functions-function) as [intervals](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interval) ( [Problem 1.1](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#pb-g10-numbers-1) ’s language): give the [domains](#def-g10-functions-function) of $x \mapsto \sqrt{x - 3}$ , $x \mapsto \frac{1}{x^2 - 9}$ , $x \mapsto \sqrt{9 - x^2}$ .
17. Back to Heron’s $f$ : find the exact [preimages](#def-g10-functions-function) of $3$ (solve $f(x) = 3$ by completing the square).
18. A stone is thrown upward: its height is $H(t) = 20t - 5t^2$ meters after $t$ seconds. On which time [interval](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-interval) does the formula make physical sense? Complete the square to find the maximal height and its time ( [Definition 3.12](#def-g10-functions-extrema) ), and give the [variation table](#def-g10-functions-table) .
19. For how long is the stone at least $15$ m high? (Solve $H(t) \geq 15$ with a [sign table](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#def-g10-algebra-signtable) , [Method 2.17](https://one-course.com/books/math/2/en/chapter/2-algebra-equations-and-inequalities#met-g10-algebra-signtable) .)
20. Finale: this problem ran four machines — Heron’s improver, the squarer, the hailstone, the stone’s height. In two or three sentences, state what every [function](#def-g10-functions-function) has (a [domain](#def-g10-functions-function) , a rule, a [graph](#def-g10-functions-graph) ) and the two great questions this problem asked of each (where does iteration settle? how does the [function](#def-g10-functions-function) vary?) — questions the next chapters take up one by one.

**Solution of Problem 3.1.**

**1.** [Domain](#def-g10-functions-function): $x \neq 0$ (division by $x$). $f(1) =
\frac12(1 + 2) = \frac32$; $f(2) = \frac12(2 + 1) = \frac32$; $f\!\left(\frac32\right) = \frac12\left(\frac32 +
\frac43\right) = \frac{17}{12}$.

**2.** $\frac12\left(x + \frac2x\right) = \frac32$ gives $x^2 + 2 = 3x$, i.e. $x^2 - 3x + 2 = (x - 1)(x - 2) = 0$: the [preimages](#def-g10-functions-function) of $\frac32$ are $1$ and $2$ — as question 1 announced.

**3.** $f(x) = x$ gives $x + \frac2x = 2x$, so $\frac2x = x$, $x^2 = 2$: [fixed points](#pb-g10-functions-1) $\sqrt2$ and $-\sqrt2$. The positive one is the diagonal of the unit square, [irrational](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#ex-g10-numbers-classify) by the irrationality weekend problem of the Middle School volume.

**4.** $1 \to \frac32 \to \frac{17}{12} \to
\frac{577}{408}$: Heron’s [approximations](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-approx) of $\sqrt2$. His recipe “average the guess with $2/$guess” is exactly *iterating the [function](#def-g10-functions-function) $f$* — and the number the process chases is $f$’s [fixed point](#pb-g10-functions-1).

**5.** The [fixed points](#pb-g10-functions-1) are the crossings of the [graph](#def-g10-functions-graph) with the diagonal $y = x$: feeding outputs back in walks the point along the [graph](#def-g10-functions-graph) towards that crossing. In the two-thermometers weekend problem of the Middle School volume, the reading $-40^\circ$ was the same crossing-the-diagonal idea for the conversion [function](#def-g10-functions-function).

**6.** $f(v) - f(u) = \frac{v - u}{2} + \frac1v - \frac1u
= \frac{v - u}{2} + \frac{u - v}{uv}
= (v - u)\left(\frac12 - \frac{1}{uv}\right)
= \frac{(v - u)(uv - 2)}{2uv}$. For $0 < u < v \leq \sqrt2$: $uv < 2$, the bracket is negative, $f(v) < f(u)$: [decreasing](#def-g10-functions-variations). For $\sqrt2 \leq u < v$: $uv > 2$: [increasing](#def-g10-functions-variations). Turning point: $\sqrt2$.

**7.** [Decreasing](#def-g10-functions-variations) before $\sqrt2$, [increasing](#def-g10-functions-variations) after: $f$ attains its [minimum](#def-g10-functions-extrema) at $\sqrt2$, worth $f(\sqrt2) = \frac12\left(\sqrt2 + \frac{2}{\sqrt2}\right)
= \sqrt2$. Consequence: every output of the machine (positive input) is at least $\sqrt2$ — after one turn of the crank, guesses live in $\intco{\sqrt2}{+\infty}$.

**8.** If $x > \sqrt2$, then $x^2 > 2$, so $\frac2x < x$ and the average $f(x)$ of $x$ and $\frac2x$ is less than $x$; and $f(x) \geq \sqrt2$ by question 7, with equality only at $x = \sqrt2$. So $\sqrt2 < f(x) < x$: each iteration strictly improves without overshooting — the sequence of question 4 slides down onto $\sqrt2$.

**9.** On $\intoo{0}{+\infty}$: [decreasing](#def-g10-functions-variations) from $+\infty$ (near $0$) down to the [minimum](#def-g10-functions-extrema) $\sqrt2$ at $x = \sqrt2$, then [increasing](#def-g10-functions-variations) without bound.

**10.** $g(x) = x$ gives $x^2 = x$, $x(x - 1) = 0$: [fixed points](#pb-g10-functions-1) $0$ and $1$. From $0.9$: $0.81$, $0.656$, $0.430$, $0.185$ — sliding towards $0$. From $1.1$: $1.21$, $1.464$, $2.144$, $4.595$ — fleeing to infinity. The [fixed point](#pb-g10-functions-1) $0$ attracts, $1$ repels: a hair’s difference at the start, opposite destinies.

**11.** $7 \to 22 \to 11 \to 34 \to 17 \to 52 \to 26 \to
13 \to 40 \to 20 \to 10 \to 5 \to 16 \to 8 \to 4 \to 2 \to 1$: sixteen steps, peaking at $52$.

**12.** $27 \to 82 \to 41 \to 124 \to 62 \to 31 \to 94 \to
47 \to 142 \to 71 \to 214 \to \dots$ — still climbing after ten steps, on its way to a peak of $9\,232$ and a $111$-step flight. Lesson: a two-line rule can produce behavior no one can predict at a glance — next-door numbers ($26$, $27$, $28$) have wildly different flights.

**13.** A power of $2$ halves down its whole ladder: $2^k \to 2^{k-1} \to \dots \to 2 \to 1$. At the bottom, $h(1) = 4$, $h(4) = 2$, $h(2) = 1$: the flight enters the cycle $4 \to 2 \to 1 \to 4$. [Fixed points](#pb-g10-functions-1) would need $\frac n2 = n$ (only $n = 0$) or $3n + 1 = n$ (negative): none among the positive [integers](https://one-course.com/books/math/2/en/chapter/1-numbers-and-sets-of-numbers#def-g10-numbers-sets) — the observed flights end not at a [fixed point](#pb-g10-functions-1) but in that little *cycle*.

**14.** A counterexample would be either a flight that grows forever (never returning to $1$) or a second cycle disjoint from $4 \to 2 \to 1$. Verification up to $10^{20}$ leaves infinitely many untested numbers — exactly the circle-regions lesson of the matchstick-oracle weekend problem of the Middle School volume: agreement on finitely many cases proves nothing about all of them.

**15.** For Heron’s machine we had *structure* — a factored difference (question 6) revealing variations, a [minimum](#def-g10-functions-extrema), a squeeze — while the hailstone’s parity-switching rule offers no such handle: nobody has found the structure that tames it.

**16.** $\sqrt{x - 3}$: needs $x - 3 \geq 0$: $\intco{3}{+\infty}$. $\frac{1}{x^2 - 9}$: needs $x \neq \pm 3$: $\R$ deprived of $-3$ and $3$. $\sqrt{9 - x^2}$: needs $x^2 \leq 9$: $\intcc{-3}{3}$.

**17.** $f(x) = 3$ gives $x + \frac2x = 6$, so $x^2 - 6x + 2 = 0$, i.e. $(x - 3)^2 = 7$: $x = 3 - \sqrt7$ or $x = 3 + \sqrt7$ (both positive: two exact [preimages](#def-g10-functions-function)).

**18.** Physical sense while the stone is aloft: $H(t) = 5t(4 - t) \geq 0$ for $t \in \intcc{0}{4}$. Completing: $H(t) = 20 - 5(t - 2)^2$: [maximum](#def-g10-functions-extrema) $20$ m at $t = 2$ s. Variations: [increasing](#def-g10-functions-variations) on $\intcc{0}{2}$ from $0$ to $20$, [decreasing](#def-g10-functions-variations) on $\intcc{2}{4}$ back to $0$.

**19.** $20t - 5t^2 \geq 15 \iff t^2 - 4t + 3 \leq 0 \iff
(t - 1)(t - 3) \leq 0 \iff t \in \intcc{1}{3}$: two full seconds above $15$ m.

**20.** Each machine has a [domain](#def-g10-functions-function) (where the rule is allowed), a rule (the formula or the parity switch), and a [graph](#def-g10-functions-graph) or table displaying it whole. Of each we asked the two great questions: *where does repetition lead* ([fixed points](#pb-g10-functions-1), cycles, attraction — solved for Heron, open for the hailstone) and *how does the output move with the input* (variations, extrema — the stone’s summit, Heron’s [minimum](#def-g10-functions-extrema)). The chapters ahead sharpen both: reference [functions](#def-g10-functions-function) next, then, in later years, derivatives to measure variation and limits to certify where iterations land.
