Theorem of Bolzano

Let f(x) be a continuous function defined in an interval [a,b].

Then, if f(a)f(b)<0 (therefore, f(a)<0 and f(b)>0 or f(a)>0 and f(b)<0), there exists at least a point c inside the interval (a,b) such that f(c)=0.

This theorem can turn out to be very intuitive since if we have a continuous function that is negative in f(a) (below the x axis) and is positive in f(b) (above the x axis), or vice versa, given that the function is continuous and has to connect the points f(a) and f(b), the graph will cross the x axis at least once, so a value c will exist inside the interval so that f(c)=0.

Let's see an example of the application of the theorem:

Example

Let's take the function f(x)=xln2x defined in the interval [0.1,0.5] and we wonder whether it has a zero within the interval.

We observe that: f(0.1)=5.201898111<0f(0.5)=0.0195469860>0

As the interval is closed and the function is continuous, the hypotheses of Bolzano's theorem are satisfied and consequently it can be applied.

The theorem says that t a point c inside the interval [0.1,0.5] exists such that f(c)=0.

Consequently it will be satisfied that 0=f(c)=cln2c, or c=ln2c.

Notice that we found the existence of a solution in the interval [0.1,0.5] of the equation x=ln2x which could not be previously solved.

Example

Let's see if the equation x3+lnx=x has a solution.

We will consider the function f(x)=x3+lnx+x.

If we find two points a and b where f(a)f(b)<0, it will mean that a certain value c exists between a and b such that it will be a solution to our equation.

If a=0.1f(0.1)=0.13+ln0.1+0.1=1.985357<0

If b=1f(1)=13+ln1+1=2>0

Therefore, in the interval [0.1,1] a point c exists such that f(c)=0 and we can say our equation has a solution (since 0=f(c)=c3+lnc+c).

Application of the theorem

Now, using Bolzano’s theorem, we can define a method to bound a zero of a function or a solution in an equation:

  1. To find an interval where at least one solution exists by Bolzano.
  2. To divide the interval in 2 subintervals (dividing it by half, for example).
  3. To evaluate the function at the median point and depending on the sign of the value, repeat the process in the new subinterval where the Bolzano conditions are satisfied (f(a)f(b)<0).

This process can be done as many times as we want, until we eventually find a very small interval where it is known with certainty that a zero of our function exists.

Let's see an example of an application of the algorithm:

Example

Let's see if the equation x2sinx=lnx has a solution.

Before starting we will consider the function f(x)=x2sinxlnx. Finding the zeros of this function is equivalent to finding the solutions to our equation.

  • First, we will look for a closed interval where Bolzano’s theorem is satisfied, containing two values, a and b, where the function f(x) is positive and negative respectively:

We will try with different values: if x=2f(2)=22sin2ln2=2.94404>0if x=6f(6)=62sin6ln6=11.8507<0 Therefore, in the interval [2,6] a point c exists such that f(c)=0.

We have bound our solution, but of course we can improve the interval.

  • We will divide our interval in two subintervals: I1=[2,4]I2=[4,6] and we are going to evaluate the function at the median point: f(4)=13.495<0

Since we had f(2)>0, in the interval I1=[2,4] the theorem will be satisfied.

  • Now we are going to repeat the same process until we find the bounds that we need.

We divide again the interval: I1=[2,3]I2=[3,4]f(3)=0.171467>0 And we are left with the interval I2=[3,4], since f(3)>0 and f(4)<0.

We divide again the interval: I1=[3,3.5]I2=[3.5,4]f(3.5)=5.54<0 We are left with the interval I1=[3,3.5].

We divide again the interval: I1=[3,3.25]I2=[3.25,3.5]f(3.25)=2.32<0 We are left with the interval I1=[3,3.25].

We divide the interval for the last time: I1=[3,3.125]I2=[3.125,3.25]f(3.125)=0.97<0 We are left with the interval I1=[3,3.125].

In conclusion, the equation x2sinx=lnx has a solution inside the interval I1=[3,3.125].

For example, we might bring the solution near the median point of the interval: x=3.0625, and we would obtain the expressions: f(3.0625)=0.3780 or on the other hand x2sinx=lnx0.7410291.1119

We would remind you that when doing more iterations a better approximation of the exact solution may be found.