Home » Continuity

Tag: Continuity

Find continuous functions satisfying given conditions

Find continuous functions which satisfy the given conditions for all x \in \mathbb{R}.

  1. \displaystyle{ \int_0^x f(t) \, dt = e^x}.
  2. \displaystyle{ \int_0^{x^2} f(t) \, dt = 1 - 2^{x^2}}.
  3. \displaystyle{ \int_0^x f(t) \, dt = f^2(x) - 1}.

  1. No such function can exist since for x = 0 we have

        \[ \int_0^x f(t) \, dt = \int_0^0 f(t) \, dt = 0 \neq e^0 = 1. \]

  2. Taking derivatives of both sides of the given equation we have

        \begin{align*}  &&\frac{d}{dx} \left(\int_0^{x^2} f(t) \, dt\right) &= \frac{d}{dx} \left( 1 - 2^{(x^2)} \right) \\[9pt]  \implies && (2x)(f(x^2)) &= \frac{d}{dx} \left(1 - e^{x^2 \log 2}  \right) \\[9pt]  \implies && (2x)(f(x^2)) &= -(2x \log 2) e^{x^2 \log 2} \\[9pt]  \implies && f(x^2) &= -(\log 2)(2^{(x^2)}) \\[9pt]  \implies && f(x) &= - 2^x \log 2. \end{align*}

  3. Again, taking derivatives of both sides we have

        \begin{align*}  &&\frac{d}{dx} \left( \int_0^x f(t) \, dt \right) &= \frac{d}{dx} \left( f^2(x) - 1 \right) \\[9pt]  \impies && f(x) &= 2f(x)f'(x) \\[9pt]  \implies && 1 &= 2f'(x) \end{align*}

    at all points x such that f(x) \neq 0. (Since \int_0^x f(t) \, dt = f^2(x) - 1 is not satisfied by the zero function f(x) = 0, we know there are real x such that f(x) \neq 0.) Then, integrating

        \[ f'(x) = \frac{1}{2} \quad \implies \quad f(x) = \frac{1}{2} x + C. \]

    Now, we can solve for C by evaluating the given identity at x = 0,

        \begin{align*}  && \int_0^x f(t) \, dt &= f^2 (x) - 1 \\[9pt] \implies && \int_0^0 f(t) \, dt &= f^2 (0) - 1 \\[9pt] \implies && 0 &= \left( \frac{0}{2} + C\right)^2 - 1\\[9pt] \implies && 0 &= C^2 - 1 \\[9pt] \implies && C &= \pm 1. \end{align*}

    Therefore, we have

        \[ f(x) = \frac{1}{2} x \pm 1. \]

Fill in a table of implications for the integral of a function

Let f be a function such that the integral

    \[ A(x) = \int_a^x f(t) \, dt \]

exists for all x in an interval [a,b]. Consider the following statements:

a. f is continuous at c.
b. f is discontinuous at c.
c. f is increasing on (a,b).
d. f'(c) exists.
e. f' is continuous at c.

\alpha. A is continuous at c.
\beta. A is discontinuous at c.
\gamma. A is convex on (a,b).
\delta. A'(c) exists.
\varepsilon. A' is continuous at c.

Make a table to indicate by T whether the statement in row (a)-(e) implies the statement in column (\alpha) - (\varepsilon). Leave the cell in the table blank if there is no implication.


The requested table is as follows:

    \[ \begin{tabular}{c | c c c c c} & $\alpha$ & $\beta$ & $\gamma$ & $\delta$ & $\varepsilon$ \\ \hline a & T& & & T& \\ b & T& & & & \\ c & T& & T& & \\ d & T& & & T& \\ e & T& & & T&T  \end{tabular} \]

We know the first column has all T’s since the function A(x) = \int_a^x f(t) \, dt is continuous for any function f by the first fundamental theorem we know the derivative A'(x) exists at every point in the open interval (a,b). Since differentiability implies continuity (by example 7 on page 163 of Apostol), we then know that A(x) is continuous at any point c \in (a,b).

We know the second column can have no T’s anywhere since, by the same argument as above, the function A(x) is continuous at every point c \in (a,b). Thus, it cannot be discontinuous at any point c \in (a,b).

The statement a,b,d, and e cannot imply that A(x) is convex on (a,b) since they are statements regarding continuity and existence of derivatives. None of these properties have anything to do with convexity. Then, statement (c) does imply statement (\gamma) since we know that a function is convex if its derivative is increasing. Since f is the derivative of A and it is increasing, we have that A is convex.

Prove the intermediate value theorem for derivatives

Consider the following statement of the intermediate value theorem for derivatives:

Assume f is differentiable on an open interval I. Let a < b be two points in I. Then, the derivative f' takes every value between f'(a) and f'(b) somewhere in (a,b).

  1. Define a function

        \[ g(x) = \frac{f(x) - f(a)}{x-a} \qquad \text{if } x \neq a, \qquad g(a) = f'(a). \]

    Prove that g takes every value between f'(a) and f'(b) in the interval (a,b). Then, use the mean-value theorem for derivatives to show f' takes all values between f'(a) and g(b) somewhere in the interval (a,b).

  2. Define a function

        \[ h(x) = \frac{f(x) - f(b)}{x-b}, \qquad \text{if } x \neq b, \qquad h(b) = f'(b). \]

    Show that the derivative f' takes on all values between f'(b) and h(a) in the interval (a,b). Conclude that the statement of the intermediate-value theorem is true.


  1. Proof. First, since f is differentiable everywhere on the interval I, we know f is continuous on [a,b] and differentiable on (a,b). Thus, if x \in [a,b] and x \neq a then g is continuous at x since it is the quotient of continuous functions and the denominator is nonzero. If x = a then

        \[ \lim_{x \to a} g(x) = \lim_{x \to a} \frac{f(x) - f(a)}{x-a} = f'(a) = g(a); \]

    hence, g is continuous at x = a as well. Therefore, g is continuous on the closed interval [a,b]. So, by the intermediate value theorem for continuous functions we know g takes on every value between g(a) and g(b) somewhere on the interval (a,b). Since g(a) = f'(a) this means g takes on every value between f'(a) and g(b) somewhere on the interval (a,b).
    By the mean-value theorem for derivatives, we then know there exists some c \in (a,b) such that

        \begin{align*}  &&f(x) - f(a) &= f'(c)(x-a) \\ \implies && f'(c) &= \frac{f(x) - f(a)}{x-a} \\ \implies && f'(c) &= g(x) \end{align*}

    for some c \in (a,x). Since x < b, we then conclude there is some c \in (a,b) such that f'(c) = g(x) for any x. Since g takes on every value between f'(a) and g(b), so does f'.

  2. Proof. This is very similar to part (a). By the same argument we have the function h is continuous on [a,b]; thus, h takes on every value between h(a) and f'(b) by the intermediate value theorem for continuous functions. Then, by the mean value theorem, we know there exists a c \in (x, b) such that

        \[ f'(c) = \frac{f(x) - f(b)}{x-b} = h(x) \qquad \text{for some } c \in (x,b). \]

    Thus, f' takes on every value between f'(b) and h(a). Since h(a) = g(b); f' takes on every value between f'(a) and f'(b). \qquad \blacksquare

Prove a property of the integral of the product of continuous functions

Let f be a continuous function on the interval [a,b] and assume

    \[ \int_a^b f(x) g(x) \, dx = 0 \]

for every function g which is continuous on the interval [a,b]. Prove that f(x) = 0 for all x \in [a,b].


Proof. Since \int_a^b f(x) g(x) \, dx = 0 must hold for every function g that is continuous on [a,b], it must hold for f itself (since f is continuous on [a,b] by hypothesis). Therefore we must have,

    \[ \int_a^b f(x) f(x) \, dx = \int_a^b (f(x))^2 \, dx = 0 \]

However, (f(x))^2 \geq 0 for all x \in [a,b]. We know from the previous exercise (Section 3.20, #7) that a non-negative function whose integral is zero on an interval must be zero at every point at which it is continuous. By hypothesis f is continuous at every point of [a,b]; hence, f^2 is also continuous at every point of [a,b] (since the product of continuous functions is continuous). Therefore,

    \[ (f(x))^2 = 0 \qquad \text{for all } x \in [a,b]. \]

Which implies,

    \[ f(x) = 0 \qquad \text{for all } x \in [a,b]. \qquad \blacksquare\]

Prove that if the integral of nonnegative function is zero then the function is zero

Let f be an integrable, non-negative function on the interval [a,b]. Prove that if

    \[ \int_a^b f(x) \, dx = 0 \]

then f(x) = 0 at each point x \in [a,b] at which f is continuous.


Proof. The proof is by contradiction. Let p \in [a,b] be a point at which f is continuous, and suppose f(p) \neq 0. This implies f(p) > 0 since f is non-negative by hypothesis. Since f is continuous at p, we know by the sign-preserving property of continuous functions (Theorem 3.7 in Apostol), that there is some neighborhood about p, say (p - \delta, p + \delta) such that f(x) has the same sign as f(p) for all x \in (p - \delta, p + \delta), i.e., such that f(x) > 0 for all x \in (p - \delta, p + \delta). But then by the monotone property of the integral we know,

    \[ \int_{p - \delta}^{p + \delta} f(x) \, dx > \int_{p - \delta}^{p + \delta} 0 \,dx = 0.\]

But then,

    \[ \int_a^b f(x) \,dx = \int_a^{p - \delta} f(x)\, dx + \int_{p - \delta}^{p + \delta} f(x) \, dx + \int_{p + \delta}^b f(x) \, dx = 0. \]

This is a contradiction since f is nonnegative we know

    \[ \int_a^{p - \delta} f(x) \, dx \geq 0 \qquad \text{and} \qquad \int_{p + \delta}^b f(x) \, dx \geq 0. \]

Since \int_{p - \delta}^{p + \delta} f(x) \, dx is strictly positive, the sum of the three pieces of the integral \int_a^b f(x) \, dx cannot equal 0. \qquad \blacksquare

Find points at which a given composite function is continuous

Define functions f and g as follows:

    \[ f(x) = \begin{cases} 1 & \text{if } |x| \leq 1 \\ 0 & \text{if } |x| > 1. \end{cases}, \qquad g(x) = \begin{cases} 2-x^2 & \text{if } |x| \leq 2 \\ 2 & \text{if } |x| > 2. \end{cases} \]

Find a formula for h(x) = f(g(x)) and find the values at which h(x) is continuous.


If |x| > 2 then g(x) = 2 and so |g(x)| > 1. Therefore, by the definition of f,

    \[ h(x) = f(g(x)) = 0. \]

If \sqrt{3} < x \leq 2, then |g(x)| = |2 - x^2| > 1 and so again

    \[ h(x) = f(g(x)) = 0. \]

Next, if 1 \leq x \leq \sqrt{3} then |g(x)| = | 2 - x^2| \leq 1 and so

    \[ h(x) = f(g(x)) = 1. \]

Finally, if |x| < 1, then |g(x)| = |2 - x^2| > 1 and we have

    \[ h(x) = f(g(x)) = 0. \]

Putting this all together we have

    \[ h(x) = \begin{cases} 1 & \text{if } 1 \leq |x| \leq \sqrt{3} \\ 0 & \text{otherwise}. \end{cases} \]

From this expression we have h(x) is continuous everywhere except at |x| = 1 and |x| = \sqrt{3}.

Find points at which a given composite function is continuous

Define functions f and g as follows:

    \[ f(x) = \frac{x+|x|}{2}, \text{ for all } x, \qquad g(x) = \begin{cases} x & \text{for } x < 0,\\ x^2 &\text{for } x \geq 0. \end{cases} \]

Find a formula for h(x) = f(g(x)). Find the values at which h(x) is continuous.


If x < 0, we have |x| = -x and we compute the composition,

    \[ h(x) = f(g(x)) = f(x) = \frac{x-x}{2} = 0. \]

If x \geq 0, then |x| = x and we compute the composition,

    \[ h(x) = f(g(x)) = f(x^2) = \frac{2x^2}{2} = x^2. \]

Putting these together,

    \[ h(x) = \begin{cases} 0 & \text{if } x < 0, \\ x^2 & \text{if } x \geq 0. \end{cases} \]

Certainly h is continuous for all x \neq 0 since the constant function h(x) =0 and the polynomial h(x) = x^2 are continuous. Further, h is continuous at x = 0 since

    \[ \lim_{x \to 0^-} h(x) = \lim_{x \to 0^+} h(x) = \lim_{x \to 0} h(x) = 0 = h(0). \]

Prove some continuity properties of a function

Given a function f and a closed interval [a,b] such that

    \[ |f(u) - f(v)| \leq |u-v| \]

for all u,v \in [a,b].

  1. Prove f is continuous at every point x \in [a,b].
  2. If f is integrable on [a,b] prove

        \[ \left| \int_a^b f(x) \, dx - (b-a)f(a) \right| \leq \frac{(b-a)^2}{2}. \]

  3. If c \in [a,b] is any point prove

        \[ \left| \int_a^b f(x) \, dx - (b-a) f(c) \right| \leq \frac{(b-a)^2}{2}. \]


  1. Proof. Let p be any point in [a,b]. Then, for any \varepsilon > 0 let \delta = \varepsilon. Then

        \begin{align*}   |x-p| < \delta &&\implies && |x-p| &< \varepsilon \\  && \implies && |f(x) - f(p)| &< \varepsilon. \end{align*}

    Thus, for any \varepsilon > 0, we have |f(x) - f(p)| < \varepsilon whenever |x-p| < \delta. Hence,

        \[ \lim_{x \to p} f(x) = f(p). \]

    Therefore, f is continuous at every point p \in [a,b]. \qquad \blacksquare

  2. Proof. Since f(a) is a constant (the value of the function f evaluated at the constant a), we have

        \[ (b-a) f(a) = \int_a^b f(a) \, dx. \]

    Therefore, we can compute,

        \begin{align*}  \left| \int_a^b f(x) \, dx - (b-a) f(a) \right| &= \left| \int_a^b f(x) \, dx - \int_a^b f(a) \, dx \right| \\  &= \left| \int_a^b (f(x) - f(a)) \, dx \right|\\  &\leq \int_a^b |f(x) - f(a)| \, dx. \end{align*}

    The final inequality follows since, using the monotone property of the integral,

        \begin{align*}  - |f(x)| \leq f(x) \leq |f(x)| && \implies && \int_a^b -|f(x)| \, dx \leq \int_a^b f(x) \, dx \leq \int_a^b |f(x)| \, dx \\  && \implies && - \int_a^b |f(x)| \, dx \leq \int_a^b f(x) \, dx \leq \int_a^b |f(x)| \, dx \\  && \implies && \left| \int_a^b f(x) \, dx \right| \leq \int_a^b |f(x)| \, dx. \end{align*}

    Then, since |f(x) - f(a)| \leq |x-a| by our hypothesis on f, we have

        \begin{align*}  \int_a^b |f(x) - f(a)| \, dx &\leq \int_a^b |x-a| \, dx \\  &= \int_a^b (x-a) \, dx &(x-a\geq 0 \text{ since } x \in [a,b]) \\  &= \frac{b^2}{2} - \frac{a^2}{2} - ab + a^2 \\  &= \frac{b^2-2ab+a^2}{2} \\  & = \frac{(b-a)^2}{2}. \qquad \blacksquare \end{align*}

  3. Proof. The proof proceeds similarly to that of part (b),

        \begin{align*}  \left| \int_a^b f(x) \, dx - (b-a) f(c) \right| &= \left| \int_a^b f(x) \, dx - \int_a^b f(c) \, dx \right|\\ &= \left| \int_a^b (f(x) - f(c)) \, dx \right| \\ &\leq \int_a^b | f(x) - f(c) | \, dx \\ &\leq \int_a^b |x-c| \, dx. \end{align*}

    Then, since c \in [a,b], we break the integral into two pieces (to deal with the fact that |x-c| = -(x-c) for x < c and |x-c| = x-c for x \geq c):

        \begin{align*}   \int_a^b |x-c| \, dx &= \int_a^c -(x-c) \, dx + \int_c^b (x-c) \, dx \\  &= \left. -\frac{x^2}{2} \right|_a^c + c \cdot x \biggr \rvert_a^c + \left. \frac{x^2}{2} \right|_c^b - c \cdot x \biggr \rvert_c^b \\  &= \frac{a^2-c^2}{2} + c(c-a) + \frac{b^2-c^2}{2} - c(b-c) \\  &= \frac{a^2 - 2c^2 + b^2}{2} + 2c^2-ac-bc \\  &= \frac{a^2+b^2}{2} + c^2 - c(b+a). \end{align*}

    But now, we know c \in [a,b] implies c \leq b, so we have the inequality,

        \begin{align*}    \frac{a^2+b^2}{2} + c^2 - c(b+a) &= \frac{a^2+b^2}{2} + c(c-(b+a)) \\  &\leq \frac{b^2+a^2}{2} + b(b-b-a) \\  &= \frac{b^2+a^2}{2} - ab \\  &= \frac{b^2 - 2ab + a^2}{2} \\  &= \frac{(b-a)^2}{2}. \qquad \blacksquare \end{align*}

Find a way to define f(0) so that the function x sin (1/x) is continuous at 0

For x \neq 0 define

    \[ f(x) = x \sin \frac{1}{x}. \]

Give a value for f(0) to make f continuous at x = 0.


We claim that if we define f(0) = 0, then the function f with this additional point defined is continuous at x = 0.

Proof. Since -1 \leq \sin \frac{1}{x} \leq 1 for all x \neq 0 we know

    \[ -x \leq x \sin \left( \frac{1}{x} \right) \leq x \qquad x \neq 0. \]

Then since

    \[ \lim_{x \to 0} -x = \lim_{x \to 0} x  = 0 \]

we apply the squeeze theorem (Theorem 3.3 in Apostol) to conclude

    \[ \lim_{x \to 0} x \sin \frac{1}{x} = 0. \]

Therefore, by defining f(0) = 0, we have extended f to a function continuous at 0. \qquad \blacksquare