Ching-Kuang Shene (冼鏡光), Professor Emeritus
Department of Computer Science
Michigan Technological University
Houghton, MI 49931
USA
Created October 15, 2025
The following Theorem can be found in nearly every general topology textbook (e.g., Stephen Willard, General Topology, Dover, p. 89)
If \( f, g: X \rightarrow Y \) are continuous, \( Y \) is Hausdorff, and \( f \) and \( g \) agree on a dense set \( D \) in \( X \), then \( f = g \). |
We don't have to go that far to learn general topology to get this result.
First, we know that \( \sin() \) and \( \cos() \) are continuous functions from A Few Useful Results. Proving \( \sin() \) and \( \cos() \) being continuous does not need the Pythagorean Theorem and the Pythagorean Identity.
We shall only consider the open interval \( (0,\frac{1}{2}\pi ) \) because the Pythagorean Identity holds for \( x = 0 \) and \( x = \frac{1}{2}\pi \). A subset \( D \) in \( (0,\frac{1}{2}\pi ) \) is dense if and only if for every \( x \in (0,\frac{1}{2}\pi ) \) every open interval that contains \( x \) also contains a point in \( D \). Let \( f(x) =\sin^2(x) + \cos^2(x) \) and \( g(x) = 1 \) be functions defined on \( (0,\frac{1}{2}\pi ) \), where \( g(x) \) is a constant function. Our goal is: Constructing a dense set \( D \) in \( (0,\frac{1}{2}\pi ) \) such that for every \( d \in D \) we have \( f(d) = \ g(d) = 1 \). Then, we have \( f = g \) on \( (0,\frac{1}{2}\pi ) \). A simple proof of this fact will be presented at the end of this page.
The angle sum and angle differences of \( \sin() \) and \( \cos() \) give the following: $$ \begin{eqnarray*} \sin(x\pm y) &=& \sin(x)\cos(y) \pm \cos(x)\sin(y) \\ \cos(x\pm y) &=& \cos(x)\cos(y) \mp \sin(x)\sin(y) \end{eqnarray*} $$ Squaring them and adding the results together gives \[ \sin^2(x\pm y) + \cos^2(x\pm y) = \left( \sin^2(x)+\cos^2(x) \right) \left( \sin^2(y)+\cos^2(y) \right) \] Using induction yields \[ \sin^2\left( \sum_{i=1}^k \alpha_i \right)+ \cos^2\left( \sum_{i=1}^k \alpha_i \right) = \prod_{i=1}^k \left( \sin^2(\alpha_i)+ \cos^2( \alpha_i) \right), \] where \( \alpha_1, \alpha_2, \dots, \alpha_k \) are given angles. Therefore, the following holds: \[ \sin^2(k\alpha)+\cos^2(k\alpha) = \left( \sin^2(\alpha)+\cos^2(\alpha) \right)^k \] for any non-negative integers. If we know an angle \( \alpha \) such that \( \sin^2(\alpha) + \cos^2(\alpha) = 1 \) holds, \( \sin^2(k\alpha) + \cos^2(k\alpha) = 1 \) also holds.
Obviously, the set \( D = \cup_{i=1}^{\infty} D_i \) is dense in \( \left(0,\frac{1}{2}\pi \right) \). As a result, the Pythagorean Identity holds for any \( x \) in \( \left[0,\frac{1}{2}\pi \right] \) from the theorem cited at the beginning of this page.
Suppose that \( f, g : I \rightarrow J \) are two continuous functions from an open interval \( I \) to another \( J \) and that \( D \) is a dense set in \( I \) so that \( f(x) = g(x) \) holds for every \( x \in D \). Suppose \( y \in I-D \) and \(f(y) \neq g(y) \). There is a small enough \( \epsilon > 0 \) such that \( ( f(y)-\epsilon, f(y)+\epsilon ) \) and \( ( g(y)-\epsilon, g(y)+\epsilon ) \) are disjoint. Because \( f \) is continuous, there is a \( \delta_f \) so that for every \( v \in (y-\delta_f,y+\delta_f ) \) we have \( f(v) \in ( f(y)-\epsilon, f(y)+\epsilon ) \). By the same reason, there is a \( \delta_g \) such that for every \( v \in (y-\delta_g,y+\delta_g ) \) we have \( g(v) \in ( g(y)-\epsilon, g(y)+\epsilon ) \).
Let \( \delta = \min(\delta_f,\delta_g ) \). In this way, for every \( w\in (y-\delta,y+\delta) \) we have \( f(w) \in ( f(y)-\epsilon, f(y)+\epsilon ) \) and \( g(w) \in ( g(y)-\epsilon, g(y)+\epsilon ) \). Because \( D \) is a dense set in \( I \), \( (y-\delta,y+\delta) \) contains a \( u \in D \). Because we know \( f(u) = g(u) \), it is impossible as \( f(u) \) and \( g(u) \) are in two disjoint intervals. Thus, the cited theorem holds. The general case will not be treated here.
Is this proof an overkill? Perhaps, it is. On the other hand, in doing so it does provide you with a calculus-based proof of the Pythagorean Identity without using the the Pythagorean Theorem and the Pythagorean Identity. Consequently, it clearly shows that the new techniques introduced to calculus open a door for proving the Pythagorean Theorem and the Pythagorean Identity with techniques not available in classical Euclidean geopmetry and trigonometry.
Go back to Home Page.