Maths WorkshopMaths problems with full solutions
Exercise 110Calculus › Single-variable calculus › Continuity › Intermediate Value TheoremHigh schoolAdded 8 Nov 2026

Continuous functions with f^2=1 on an interval

#IVT#sign#constant functions

Statement

Let II be an interval of R\mathbb{R} and f:I→Rf:I\to\mathbb{R} continuous with (f(x))2=1(f(x))^2=1 for all x∈Ix\in I. Show that f=1f=1 or f=−1f=-1.

Hint

Assume ff takes both values and apply the IVT to reach f(z)=0f(z)=0, contradicting (f(z))2=1(f(z))^2=1.

Show solutionHide solution

Solution

At each x∈Ix\in I, (f(x))2=1(f(x))^2=1 gives f(x)∈{−1,1}f(x)\in\{-1,1\}. Suppose ff is neither identically 11 nor identically −1-1. Then there exist x0,y0∈Ix_0,y_0\in I with f(x0)=1f(x_0)=1 and f(y0)=−1f(y_0)=-1.

Since II is an interval, it contains the whole segment between x0x_0 and y0y_0. The IVT applied to the continuous ff on this segment provides zz between x0x_0 and y0y_0 with f(z)=0f(z)=0. But then (f(z))2=0≠1(f(z))^2=0\neq1: contradiction.

Conclusion. ff is constant on II, with value 11 or −1-1.