Chapter II · Functions of real variables

Transcendental functions and strange examples

§§28–29 35 min

Functions that are not algebraical, why no periodic function except a constant can be rational or algebraical, and Hardy’s gallery of instructive oddities built from [x] and from the rational/irrational distinction.

Why this matters

Everything that is not algebraical is transcendental (§28). The definition is purely negative, so to use it you need a way to prove that a function is not algebraical. Hardy gives a neat one: periodicity. Then, in §29, he collects functions that matter less for their own sake than as warnings: graphs made of steps, curves that oscillate infinitely often, and “graphs” that look like lines but have infinitely many holes. They are the test cases on which the definitions of limit and continuity in Chapters IV and V will be tried.

The idea

The most important transcendental functions in this chapter are the circular functions sin⁡x\sin x, cos⁡x\cos x, tan⁡x\tan x, … and their inverses (exponentials and logarithms come in Chapter IX). All the circular functions repeat themselves: sin⁡(x+2π)=sin⁡x\sin(x + 2\pi) = \sin x. A rational function cannot do this without being constant, because a polynomial with infinitely many zeros must be the zero polynomial. That single observation proves that sin⁡x\sin x is not rational, and with more care not algebraical either.

Hardy’s other examples are built from the integral part [x][x], the greatest integer not exceeding xx, and from the distinction between rational and irrational numbers. Here is the first family.

Explore Steps, saw-teeth, and a step function that is unbroken

Try this. Step through [x][x], x−[x]x - [x], x−[x]\sqrt{x - [x]} and [x]+x−[x][x] + \sqrt{x - [x]}. At each integer, drag the trace point across and read off the value on each side.

y=[x]y = [x]Hardy: Examples XVI; Fig. 15
xy
  • [x]
  • trace point (drag)
At x=1.55x = 1.55: y=1y = 1
What to notice

[x][x] jumps by 11 at every integer, and the value at the integer belongs to the step on the right (filled dot) not the left (open dot). x−[x]x - [x] climbs from 00 towards 11 and drops back. In [x]+x−[x][x] + \sqrt{x - [x]} the rise of x−[x]\sqrt{x - [x]} from 00 to 11 exactly fills each jump of [x][x], so the graph has no breaks, although it is made from broken pieces.

The second family cannot be drawn honestly at all. A function that is 11 at rational xx and 00 at irrational xx has a value everywhere, but its graph is two “lines”, each with infinitely many points missing, packed so densely that no drawing can tell them from unbroken lines.

Explore Graphs that are not curves

Try this. With “1 or 0”, raise the largest denominator QQ and shrink the window. With “denominator”, step NN and count the points on the purple-marked segment. With “swarm”, raise QQ and watch where the points gather.

xy
  • value 1 at rationals p/qp/q with q≤8q \le 8; value 0 elsewhere (gaps at those rationals)
Function
Showing 98 rationals with denominator at most 8 in a window of width 4.4. However far you zoom and however large QQ is, both rows keep their gaps: every interval contains rationals and irrationals, so neither row is really a line. To the eye, though, the graph is two straight lines.
What to notice

Any finite picture shows only rationals with bounded denominators; raising QQ fills the gaps you see, but there are always more. The denominator function puts exactly φ(N)\varphi(N) points on the segment from (N−1,N)(N-1, N) to (N,N)(N, N), one for each k<Nk < N prime to NN, and nothing at irrational xx. In the swarm (Examples XVI, 11), only (1,1)(1, 1) lies on y=xy = x; the other rational points crowd round y=xy = x from above for 0<x<10 < x < 1 and from below for x>1x > 1, and round y=−xy = -x for x<0x < 0.

Precise statements

Definition Transcendental function Hardy: §28

A function of xx is transcendental if it is not algebraical (in the sense of §27).

Definition Periodic function Hardy: Examples XV, 14

ff is periodic with period aa (a≠0a \neq 0) if f(x+a)=f(x)f(x + a) = f(x) for every xx at which f(x)f(x) is defined (and then f(x+a)f(x + a) is defined too).

Theorem A periodic rational function is constant Hardy: Examples XV, 14

If a rational function is periodic, it is constant. In particular cos⁡x\cos x and sin⁡x\sin x are not rational functions.

Theorem A periodic algebraical function is made of constants Hardy: Examples XV, 15

If an algebraical function is periodic, then its values at every xx are the same finite set of constants k,k′,…k, k', \dots. In particular sin⁡x\sin x and cos⁡x\cos x are transcendental.

Corollary The inverse circular functions are transcendental Hardy: Examples XV, 16

arcsin⁡x\arcsin x and arccos⁡x\arccos x are not algebraical.

The corollary is immediate from the definitions: for each xx in (−1,1)(-1, 1), arccos⁡x\arccos x has the infinitely many values 2nπ±α2n\pi \pm \alpha (with α\alpha the value in [0,π][0, \pi]), while an algebraical function of degree mm has at most mm values at each xx.

Proofs

Proof A periodic rational function is constant
Strategy

A periodic function takes its value at one point again at infinitely many points. For a rational function P/QP/Q that turns into a polynomial equation with infinitely many roots, and a nonzero polynomial of degree nn has at most nn roots.

Set up

Let f=P/Qf = P/Q in standard form, periodic with period a≠0a \neq 0. Choose a point x0x_0 where ff is defined (there is one: QQ has only finitely many zeros) and let k=f(x0)k = f(x_0).

The value kk recurs infinitely often

By periodicity ff is defined at x0+a,x0+2a,…x_0 + a, x_0 + 2a, \dots and equals kk at each. These points are all different, because a≠0a \neq 0.

A polynomial with infinitely many roots

At each of these points P(x)=kQ(x)P(x) = kQ(x), so the polynomial P(x)−kQ(x)P(x) - kQ(x) has infinitely many roots. Hence it is the zero polynomial: P=kQP = kQ.

Conclude

So f(x)=P(x)/Q(x)=kf(x) = P(x)/Q(x) = k wherever ff is defined. Since cos⁡x\cos x and sin⁡x\sin x have period 2π2\pi and are not constant, neither is rational.

The algebraical case runs the same way, one root at a time.

Proof A periodic algebraical function is made of constants
Strategy

Clear denominators, so that yy satisfies P0(x)ym+P1(x)ym−1+⋯+Pm(x)=0P_0(x)y^m + P_1(x)y^{m-1} + \dots + P_m(x) = 0 with polynomial coefficients. Show that a value kk at one point is a root of this equation for every xx, split off the factor y−ky - k, and repeat.

One value recurs

Let kk be a value of the function at x=0x = 0 (or at any point where it is defined). By periodicity kk is also a value at a,2a,3a,…a, 2a, 3a, \dots, so P0(na)km+P1(na)km−1+⋯+Pm(na)=0P_0(na)k^m + P_1(na)k^{m-1} + \dots + P_m(na) = 0 for every nn.

So y=ky = k solves the equation for all xx

The polynomial P0(x)km+⋯+Pm(x)P_0(x)k^m + \dots + P_m(x) in xx has the infinitely many roots nana, so it is identically zero. That is, the constant y=ky = k satisfies the equation whatever xx is.

Divide out y−ky - k

Because y=ky = k is a root for every xx, dividing by y−ky - k (as a polynomial in yy) leaves an equation of degree m−1m - 1 in yy, again with polynomial coefficients, satisfied (at every xx) by every value of the function other than kk. Repeat with such a value k′k' at some point x1x_1: by periodicity it is a value at every x1+nax_1 + na, and since k′≠kk' \neq k it satisfies the reduced equation there, so as before y=k′y = k' satisfies it for all xx. (The argument never needs to know whether kk is a repeated root.)

Conclude

After at most mm steps every value has been shown to be a constant. A non-constant periodic function such as sin⁡x\sin x (which takes infinitely many different values) is therefore not algebraical.

Worked examples and exercises

Exercise ●○○ Hardy: Examples XV, 1

Show that acos⁡x+bsin⁡x=βcos⁡(x−α)a\cos x + b\sin x = \beta\cos(x - \alpha), where β=a2+b2\beta = \sqrt{a^2 + b^2} and cos⁡α=a/β\cos\alpha = a/\beta, sin⁡α=b/β\sin\alpha = b/\beta (with aa, bb not both zero). What does this say about the graph of acos⁡x+bsin⁡xa\cos x + b\sin x?

Hint
Expand cos⁡(x−α)\cos(x - \alpha).

Solution

βcos⁡(x−α)=βcos⁡xcos⁡α+βsin⁡xsin⁡α=acos⁡x+bsin⁡x\beta\cos(x - \alpha) = \beta\cos x\cos\alpha + \beta\sin x\sin\alpha = a\cos x + b\sin x. Such an α\alpha exists because (a/β)2+(b/β)2=1(a/\beta)^2 + (b/\beta)^2 = 1. So the graph is the cosine curve stretched vertically by β\beta and moved α\alpha to the right: the same wave as cos⁡x\cos x and sin⁡x\sin x, with amplitude a2+b2\sqrt{a^2 + b^2}.

Exercise ●●○ Hardy: Examples XV, 6–7

Find where sin⁡(1/x)\sin(1/x) equals 00, 11 and −1-1, and explain why its graph oscillates infinitely often near x=0x = 0. Show that xsin⁡(1/x)x\sin(1/x) lies between the lines y=xy = x and y=−xy = -x, and touches each infinitely often.

Hint
sin⁡t=0\sin t = 0 exactly when t=mπt = m\pi; sin⁡t=1\sin t = 1 when t=(2m+12)πt = (2m + \tfrac12)\pi.

Solution

sin⁡(1/x)=0\sin(1/x) = 0 when 1/x=mπ1/x = m\pi, i.e. x=1/(mπ)x = 1/(m\pi) for nonzero integers mm; it equals 11 when x=1/{(2m+12)π}x = 1/\{(2m + \frac12)\pi\} and −1-1 when x=1/{(2m−12)π}x = 1/\{(2m - \frac12)\pi\}. Infinitely many of each of these points lie in every interval (0,δ)(0, \delta), so between 00 and any δ>0\delta > 0 the curve goes up to 11 and down to −1-1 infinitely often. It is undefined at 00. For large ∣x∣|x|, 1/x1/x is near 00 and so is sin⁡(1/x)\sin(1/x).

Since ∣sin⁡(1/x)∣≤1|\sin(1/x)| \le 1, ∣xsin⁡(1/x)∣≤∣x∣|x\sin(1/x)| \le |x|: the curve lies between y=∣x∣y = |x| and y=−∣x∣y = -|x|, which for x>0x > 0 are the lines y=xy = x and y=−xy = -x (and the same lines, swapped, for x<0x < 0). It touches y=xy = x where sin⁡(1/x)=1\sin(1/x) = 1 and y=−xy = -x where sin⁡(1/x)=−1\sin(1/x) = -1, infinitely often near 00. (You can see this with the shared grapher’s preset xsin⁡(1/x)x\sin(1/x), which also draws ∣x∣|x|.)

Exercise ●○○ Hardy: Examples XV, 10

Let α\alpha be the value of arccos⁡x\arccos x in [0,π][0, \pi], for −1<x<1-1 < x < 1. Show that the values of yy with cos⁡y=x\cos y = x are exactly 2nπ±α2n\pi \pm \alpha, nn an integer.

Hint
On [0,2π)[0, 2\pi), the cosine takes each value in (−1,1)(-1, 1) exactly twice.

Solution

cos⁡(2nπ±α)=cos⁡(±α)=cos⁡α=x\cos(2n\pi \pm \alpha) = \cos(\pm\alpha) = \cos\alpha = x, so these all work. Conversely, if cos⁡y=x\cos y = x, reduce yy by a multiple of 2π2\pi to y0∈[0,2π)y_0 \in [0, 2\pi). On [0,π][0, \pi] the cosine decreases from 11 to −1-1, so it takes the value xx only at α\alpha; on [π,2π)[\pi, 2\pi) it increases, and cos⁡(2π−α)=x\cos(2\pi - \alpha) = x, so it takes the value xx there only at 2π−α2\pi - \alpha. Hence y0=αy_0 = \alpha or 2π−α2\pi - \alpha, and yy is of the form 2nπ±α2n\pi \pm \alpha. So arccos⁡x\arccos x is infinitely many-valued on (−1,1)(-1, 1) and undefined for ∣x∣>1|x| > 1.

Exercise ●●○ Hardy: Examples XVI, 8

Let yy be the denominator of xx (xx rational, in lowest terms with positive denominator). Show that the number of points of the graph on the segment joining (N−1,N)(N-1, N) and (N,N)(N, N) is the number of positive integers less than NN and prime to NN (for N≥2N \ge 2).

Hint
A point of the graph on that segment has ordinate NN, so its abscissa is p/Np/N in lowest terms, with N−1≤p/N≤NN - 1 \le p/N \le N.

Solution

A graph point (x,N)(x, N) has x=p/Nx = p/N with gcd⁡(p,N)=1\gcd(p, N) = 1. Being on the segment means N(N−1)≤p≤N2N(N-1) \le p \le N^2. The endpoints p=N(N−1)p = N(N-1) and p=N2p = N^2 are multiples of NN, so not coprime to NN when N≥2N \ge 2. Write p=N(N−1)+kp = N(N-1) + k with 0<k<N0 < k < N; then gcd⁡(p,N)=gcd⁡(k,N)\gcd(p, N) = \gcd(k, N). So the points correspond exactly to the kk with 1≤k<N1 \le k < N and gcd⁡(k,N)=1\gcd(k, N) = 1. Their number is Euler’s function φ(N)\varphi(N); check it in the widget, e.g. φ(10)=4\varphi(10) = 4 (k=1,3,7,9k = 1, 3, 7, 9).

Exercise ●●● Hardy: Examples XVI, 11

Let y=xy = x for irrational xx, and y=(1+p2)/(1+q2)y = \sqrt{(1 + p^2)/(1 + q^2)} for x=p/qx = p/q in lowest terms (q>0q > 0). Show that for positive rational xx the point lies on y=xy = x only when x=1x = 1, above it when x<1x < 1 and below it when x>1x > 1, and that there are rational points as close to the line as we please near any positive xx.

Hint
Compare the squares: (1+p2)/(1+q2)(1 + p^2)/(1 + q^2) against p2/q2p^2/q^2.
Hint
For closeness, use fractions p/qp/q near xx with large qq. How big is (1+p2)/(1+q2)−p2/q2(1 + p^2)/(1 + q^2) - p^2/q^2?

Solution

For p,q>0p, q > 0: 1+p21+q2−p2q2=q2−p2q2(1+q2)\dfrac{1 + p^2}{1 + q^2} - \dfrac{p^2}{q^2} = \dfrac{q^2 - p^2}{q^2(1 + q^2)}. This is zero only when p=qp = q, i.e. x=1x = 1; positive (point above the line) when p<qp < q, i.e. x<1x < 1; negative when x>1x > 1. Since both sides are positive, the same comparison holds after taking square roots.

For closeness, let x>0x > 0 and let qq be a large prime. Of the two consecutive integers [qx][qx] and [qx]+1[qx] + 1, at most one is a multiple of qq; call the other pp. Then p/qp/q is in lowest terms and ∣p/q−x∣≤1/q|p/q - x| \le 1/q. The squares of the two ordinates differ by ∣q2−p2∣/{q2(1+q2)}≤{1+(p/q)2}/(1+q2)|q^2 - p^2|/\{q^2(1 + q^2)\} \le \{1 + (p/q)^2\}/(1 + q^2), which is small when qq is large (since p/qp/q stays near xx); and two positive numbers whose squares are close and which are not near 00 are themselves close, because ∣A−B∣=∣A2−B2∣/(A+B)|A - B| = |A^2 - B^2|/(A + B). So near every positive xx there are rational points of the graph as close to the line as we please: they swarm round it, more densely the closer one looks. For x=p/q<0x = p/q < 0 the value depends only on ∣p∣|p|, so these points are the mirror images of those for ∣x∣|x| and gather round y=−xy = -x, which is not part of the graph.

Check yourself

Check yourself True or false?

[−2.5]=−3[-2.5] = -3.

Why

True. [x][x] is the greatest integer not exceeding xx, and −3≤−2.5<−2-3 \le -2.5 < -2. “Chop off the decimals” would give −2-2, which is wrong for negative numbers.

Check yourself Choose one

Which fact is the heart of the proof that sin⁡x\sin x is not a rational function?

Why

Boundedness proves nothing (1/(1+x2)1/(1 + x^2) is bounded and rational). The argument uses periodicity: P(x)−kQ(x)P(x) - kQ(x) would vanish at infinitely many points, hence identically. The third option is false (sin⁡x\sin x has its power series), and the last is irrelevant.

Check yourself Enter a number

How many points of the denominator function’s graph lie on the segment from (11,12)(11, 12) to (12,12)(12, 12)?

Why

φ(12)=4\varphi(12) = 4: the integers 1,5,7,111, 5, 7, 11 are below 1212 and prime to it, giving the points 11+k/1211 + k/12, i.e. x=133/12,137/12,139/12,143/12x = 133/12, 137/12, 139/12, 143/12.

Check yourself True or false?

Because [x][x] jumps at every integer, the graph of [x]+x−[x][x] + \sqrt{x - [x]} must have breaks there too.

Why

False. Just to the left of an integer nn, the function is close to (n−1)+1=n(n - 1) + 1 = n, and at nn it is n+0=nn + 0 = n. The rise of x−[x]\sqrt{x - [x]} fills the jump of [x][x] exactly. Sums of broken functions can be unbroken.

Hardy’s language

To the eye it is not distinguishable from two continuous straight lines, but in reality an infinite number of points are missing from each line.

— G. H. Hardy, §29

Summary

Summary
  • A transcendental function is one that is not algebraical; the circular functions and their inverses are the first examples.
  • A periodic rational function is constant, and a periodic algebraical function consists of constants, because a nonzero polynomial has finitely many roots. So sin⁡x\sin x, cos⁡x\cos x are transcendental; arcsin⁡x\arcsin x, arccos⁡x\arccos x are too, being infinitely many-valued.
  • [x][x] jumps at the integers; [x]+x−[x][x] + \sqrt{x - [x]} shows that broken pieces can add up to an unbroken graph.
  • Functions defined separately at rational and irrational points have graphs that no drawing represents faithfully: Dirichlet’s function, the denominator function (with φ(N)\varphi(N) points on Hardy’s segment), and the swarm round y=xy = x.