examples of continuous functions on the extended real numbers

Polynomial functions: Let f∈ℝ⁢[x]fℝxf\in\mathbb{R}[x] with f⁢(x)=∑j=0nan⁢xnfxsuperscriptsubscriptj0nsubscriptansuperscriptxn\displaystyle f(x)=\sum_{{j=0}}^{n}a_{n}x^{n} for some n∈ℕnℕn\in\mathbb{N} and a0,…,an∈ℝsubscripta0normal-…subscriptanℝa_{0},\ldots,a_{n}\in\mathbb{R} with an≠0subscriptan0a_{n}\neq 0 if n≠0n0n\neq 0. Then f¯normal-¯f\overline{f} is defined in the following manner:

(a)

If n=0n0n=0, then f¯⁢(x)=a0normal-¯fxsubscripta0\overline{f}(x)=a_{0} for all x∈ℝ¯xnormal-¯ℝx\in\overline{\mathbb{R}}.

(b)

If nnn is odd and an>0subscriptan0a_{n}>0, then f¯⁢(x)={f⁢(x) if ⁢x∈ℝx if ⁢x∉ℝ.normal-¯fx⁢fx∈⁢ if xRx∉⁢ if xR\displaystyle\overline{f}(x)=\begin{cases}f(x)&\text{ if }x\in\mathbb{R}\\
x&\text{ if }x\notin\mathbb{R}.\end{cases}

(c)

If nnn is odd and an<0subscriptan0a_{n}<0, then f¯⁢(x)={f⁢(x) if ⁢x∈ℝ-x if ⁢x∉ℝ.normal-¯fx⁢fx∈⁢ if xR-x∉⁢ if xR\displaystyle\overline{f}(x)=\begin{cases}f(x)&\text{ if }x\in\mathbb{R}\\
-x&\text{ if }x\notin\mathbb{R}.\end{cases}

(d)

If n≠0n0n\neq 0 is even and an>0subscriptan0a_{n}>0, then f¯⁢(x)={f⁢(x) if ⁢x∈ℝ∞ if ⁢x∉ℝ.normal-¯fx⁢fx∈⁢ if xR∞∉⁢ if xR\displaystyle\overline{f}(x)=\begin{cases}f(x)&\text{ if }x\in\mathbb{R}\\
\infty&\text{ if }x\notin\mathbb{R}.\end{cases}

(e)

If n≠0n0n\neq 0 is even and an<0subscriptan0a_{n}<0, then f¯⁢(x)={f⁢(x) if ⁢x∈ℝ-∞ if ⁢x∉ℝ.normal-¯fx⁢fx∈⁢ if xR-∞∉⁢ if xR\displaystyle\overline{f}(x)=\begin{cases}f(x)&\text{ if }x\in\mathbb{R}\\
-\infty&\text{ if }x\notin\mathbb{R}.\end{cases}

Exponential functions: Let f⁢(x)=axfxsuperscriptaxf(x)=a^{x} for some a∈ℝaℝa\in\mathbb{R} with a>0a0a>0 and a≠1a1a\neq 1. Then f¯normal-¯f\overline{f} is defined in the following manner:

(a)

If a<1a1a<1, then f¯⁢(x)={f⁢(x) if ⁢x∈ℝ0 if ⁢x=∞∞ if ⁢x=-∞.normal-¯fx⁢fx∈⁢ if xR0=⁢ if x∞∞=⁢ if x-∞\displaystyle\overline{f}(x)=\begin{cases}f(x)&\text{ if }x\in\mathbb{R}\\
0&\text{ if }x=\infty\\
\infty&\text{ if }x=-\infty.\end{cases}

(b)

If a>1a1a>1, then f¯⁢(x)={f⁢(x) if ⁢x∈ℝ∞ if ⁢x=∞0 if ⁢x=-∞.normal-¯fx⁢fx∈⁢ if xR∞=⁢ if x∞0=⁢ if x-∞\displaystyle\overline{f}(x)=\begin{cases}f(x)&\text{ if }x\in\mathbb{R}\\
\infty&\text{ if }x=\infty\\
0&\text{ if }x=-\infty.\end{cases}

Let f⁢(x)=arctan⁡xfxxf(x)=\arctan x. Then f¯normal-¯f\overline{f} is defined by f¯⁢(x)={f⁢(x) if ⁢x∈ℝπ2 if ⁢x=∞-π2 if ⁢x=-∞.normal-¯fx⁢fx∈⁢ if xRπ2=⁢ if x∞-π2=⁢ if x-∞\displaystyle\overline{f}(x)=\begin{cases}f(x)&\text{ if }x\in\mathbb{R}\\
&\\
\displaystyle\frac{\pi}{2}&\text{ if }x=\infty\\
&\\
\displaystyle-\frac{\pi}{2}&\text{ if }x=-\infty.\end{cases}

(b)

Let f⁢(x)=tanh⁡xfxxf(x)=\tanh x. Then f¯normal-¯f\overline{f} is defined by f¯⁢(x)={f⁢(x) if ⁢x∈ℝ1 if ⁢x=∞-1 if ⁢x=-∞.normal-¯fx⁢fx∈⁢ if xR1=⁢ if x∞-1=⁢ if x-∞\displaystyle\overline{f}(x)=\begin{cases}f(x)&\text{ if }x\in\mathbb{R}\\
1&\text{ if }x=\infty\\
-1&\text{ if }x=-\infty.\end{cases}

Of course, not every function fff that is continuous on ℝℝ\mathbb{R} extends to a continuous function on ℝ¯normal-¯ℝ\overline{\mathbb{R}}. Common examples of these include the real functionsx↦sin⁡xmaps-toxxx\mapsto\sin x and x↦cos⁡xmaps-toxxx\mapsto\cos x. (It is proven that these are continuous on ℝℝ\mathbb{R} in the entry continuity of sine and cosine.)

On the other hand, there are some continuous functions f¯:ℝ¯→ℝ¯normal-:normal-¯fnormal-→normal-¯ℝnormal-¯ℝ\overline{f}\colon\overline{\mathbb{R}}\to\overline{\mathbb{R}} that have no analogous function f:ℝ→ℝnormal-:fnormal-→ℝℝf\colon\mathbb{R}\to\mathbb{R}. For example, consider

f¯⁢(x)={1x2 if ⁢x∈ℝ∖{0}∞ if ⁢x=00 if ⁢x=±∞.normal-¯fx1x2∈⁢ if x∖R0∞=⁢ if x00=⁢ if x±∞\overline{f}(x)=\begin{cases}\displaystyle\frac{1}{x^{2}}&\text{ if }x\in%
\mathbb{R}\setminus\{0\}\\
\infty&\text{ if }x=0\\
0&\text{ if }x=\pm\infty.\end{cases}