# Intermediate value theorem

This page is a stub, so it contains little or minimal information and is on a to-do list for being expanded.The message provided is:
Needs linking to from other pages!

## Statement

Let [ilmath](X,\mathcal{ J })[/ilmath] be a connected topological space and suppose [ilmath]f:X\rightarrow[/ilmath][ilmath]\mathbb{R} [/ilmath] is a continuous function, then[1]:

• [ilmath]\forall x_1,x_2\in X\forall r\in\mathbb{R}\Big[\big(\text{Min}(f(x_1),f(x_2))\le r\le\text{Max}(f(x_1),f(x_2))\big)\implies\exists x\in X[f(x)\eq r]\Big][/ilmath][Note 1]
• In words: for any [ilmath]x_1,\ x_2\in X[/ilmath] and any [ilmath]r\in\mathbb{R} [/ilmath], if [ilmath]r[/ilmath] is between [ilmath]f(x_1)[/ilmath] and [ilmath]f(x_2)[/ilmath] then there exists an [ilmath]x\in X[/ilmath] such that [ilmath]f(x)[/ilmath] equals [ilmath]r[/ilmath].

## Proof

• Let [ilmath]x_1,\ x_2\in X[/ilmath] be given
• Let [ilmath]r\in\mathbb{R} [/ilmath] be given
• Define [ilmath]m:\eq\text{Min}(f(x_1),f(x_2))[/ilmath] and let [ilmath]M:\eq\text{Max}(f(x_1),f(x_2))[/ilmath]
1. Suppose that [ilmath](m\le r)\wedge(r\le M)[/ilmath] is false, that it doesn't hold. Then by the nature of logical implication the implication evaluates to true regardless of the truth or falsity of the RHS
2. Suppose that [ilmath](m\le r)\wedge(r\le M)[/ilmath] holds, by the nature of logical implication we must show that in this case [ilmath]\exists x\in X[f(x)\eq r][/ilmath] for the implication to be true
• By the image of a connected topological space is connected we see that, as [ilmath]X[/ilmath] is connected, so is [ilmath]f(X)\subseteq\mathbb{R} [/ilmath]
• By a non-empty subset of the reals is connected if and only if it is a singleton or an interval we see that [ilmath]f(X)[/ilmath] is an interval if we consider [ilmath][a,a][/ilmath] as [ilmath]\{a\} [/ilmath] - which is sensible.
• As [ilmath]m\in f(X)[/ilmath] and [ilmath]M\in f(X)[/ilmath] we see that [ilmath][m,M]\subseteq f(X)[/ilmath] - note this may be a singleton or it may be an interval
• We can perform the rest of the analysis using case analysis
• Notice first:
• [ilmath][m,M]\subseteq f(X)[/ilmath] may be a singleton, but it may not be
• we are considering the case where [ilmath]r\in[m,M][/ilmath] this is okay because we know [ilmath]m\le r\le M[/ilmath] - which is the very definition of [ilmath]r\in[m,M][/ilmath] - see closed interval for more.
• The case analysis follows, we have 2 main cases: [ilmath][m,M][/ilmath] is a singleton and it is not, then some cases on [ilmath]r[/ilmath][Note 2]
1. Suppose [ilmath][m,M][/ilmath] is a singleton
• then as [ilmath]r\in[m,M][/ilmath] we must have [ilmath]r\eq m[/ilmath] and [ilmath]r\eq M[/ilmath] (as [ilmath]m\eq M[/ilmath] for it to be a singleton)
• We see next that [ilmath]r\eq f(x_1)[/ilmath] and [ilmath]r\eq f(x_2)[/ilmath]
• Choose [ilmath]x:\eq x_1[/ilmath] ([ilmath]x_2[/ilmath] would have worked)
• We see that [ilmath]f(x)\eq r[/ilmath] as required for our choice of [ilmath]x[/ilmath]
2. Suppose [ilmath][m,M][/ilmath] is not a singleton. We create 3 cases: [ilmath]r\eq m[/ilmath], [ilmath]r\eq M[/ilmath] and [ilmath]r\in(m,M)[/ilmath]
1. [ilmath]r\eq m[/ilmath]
• This means [ilmath]r\eq f(x_i)[/ilmath] for some [ilmath]i\in\{1,2\} [/ilmath], as [ilmath]m:\eq\text{Min}(f(x_1),f(x_2))[/ilmath] remember.
• Choose [ilmath]x:\eq x_i[/ilmath]
• We see that [ilmath]f(x)\eq f(x_i)\eq r[/ilmath] so [ilmath]f(x)\eq r[/ilmath] as required
2. [ilmath]r\eq M[/ilmath]
• This means [ilmath]r\eq f(x_i)[/ilmath] for some [ilmath]i\in\{1,2\} [/ilmath], as [ilmath]M:\eq\text{Max}(f(x_1),f(x_2))[/ilmath] remember.
• Choose [ilmath]x:\eq x_i[/ilmath]
• We see that [ilmath]f(x)\eq f(x_i)\eq r[/ilmath] so [ilmath]f(x)\eq r[/ilmath] as required
3. [ilmath]r\in(m,M)[/ilmath]
• As [ilmath](m,M)\subseteq[m,M]\subseteq f(X)[/ilmath] we see [ilmath](m,M)\subseteq f(X)[/ilmath][Note 3]
• so [ilmath]r\in f(X)[/ilmath]
• By definition of image, [ilmath]r\in f(X)\iff \exists p\in X[f(p)\eq r][/ilmath]
• Choose [ilmath]x:\eq p[/ilmath] that we know to exist from [ilmath]r\in f(X)\iff \exists p\in X[f(p)\eq r][/ilmath]
• Now [ilmath]f(x)\eq r[/ilmath] as required.
• We see that in all cases (and their sub-cases) that: [ilmath]\exists x\in X[f(x)\eq r][/ilmath], as required.
• Note: We could have tidied up the cases a bit, however we chose not to, as per[Note 2].
• We have seen that if [ilmath](m\le r)\wedge(r\le M)[/ilmath] that [ilmath]\exists x\in X[f(x)\eq r][/ilmath] indeed holds
• The implication holds
• Since [ilmath]r\in\mathbb{R} [/ilmath] was arbitrary the implication holds for all such [ilmath]r[/ilmath]
• Since [ilmath]x_1,x_2\in X[/ilmath] were arbitrary the implication holds for all such [ilmath]x_1,x_2[/ilmath]

This completes the proof.

## Notes

1. Recall that [ilmath]a\le b\le c[/ilmath] really means [ilmath](a\le b)\wedge(b\le c)[/ilmath] - so [ilmath]a\le b[/ilmath] and [ilmath]b\le c[/ilmath].
2. We could get rid of one of our cases by noting that [ilmath]m\in[m,M][/ilmath] regardless of whether or not it is a singleton, we didn't do this to keep the "purity" of the case analysis
3. Really in this case we have [ilmath](m,M)\subset[m,M][/ilmath] but [ilmath]\subseteq[/ilmath] still works, remember to claim it's a proper subset means to claim they're not equal, we do not bother with this here, even though it is true