In the previous chapter, we showed that the definite integral of the continuous function f(x) with positive values between [a, b] gives the area bounded by the graph of the function and the x-axis. For general functions, however, we have a small problem. You can see this, for example, by calculating the integral by Geogebra for a function that also has negative values:
The image shows areas in blue where the function is positive. In these areas, the integral returns positive values (b = 4.73 and d = 1.68), so in terms of area, the situation is ok. When a function has negative values, the red area, the integral becomes, of course, negative (c = -1.28) because the integral sums the pieces that are in the form of the width of the gap times the value of the function. If the value of the function is negative, even the integral becomes negative.
It is easy to fix this by taking its absolute value instead of the value of the function, i.e. the general continuous function f(x) gives the area bounded by it and the x-axis
The calculation take this into account as follows:
Find the zeros of the function and see whether the function changes its sign in them. In other words, we find out the areas where the function is positive and the areas where the function is negative (remember Bolzano's theorem!)
Divide a given integral into parts corresponding to these regions. The whole integral is the sum of these parts.
In positive parts, the absolute value of f(x) returns f(x), so the absolute values can be dropped.
In negative parts, the absolute value of f(x) returns -f(x), so absolute values can be dropped as long as a minus sign is placed in front of it.
For example, in the figure above, the zeros of the function are x = 3/2 and x = 4, so the area would be obtained by calculating the integral
The middle integral is now preceded by a minus sign, so the “negative area problem” is solved.
Example 1: Calculate the area between the function f x) = x² + 1 and the area bounded by the x-axis in interval [1,2].
f(x) has only positive values, so we don't need to care about the absolute value and the result is obtained directly as a definite integral
[When drawing a diagram with Geogebra, it is a good idea to calculate the integral with the “Integral(<function>, <start>, <end>)” command. In this case, the Integral (x ^ 2 + 1, 1, 2) = 3.33, from which it is easy to check the analytically calculated result.]
Example 2: Calculate the area bounded by the continuous function g(x) =x² - 1 and the x-axis in interval [0,2].
Now g(x) also has negative values, so we have to find out if it has zeros between [0,2].
The function has a zero point at x = 1. As an upward-opening parabola, it can be concluded that it is negative between [0,1] and positive between [1,2]. The same is obtained from a graph drawn with Geogebra
Since the function changes its sign in the integration interval, the integral must be divided into two parts. A minus sign is placed in front of the first part because there the function is negative.
Sometimes the integration has to be done with respect to y (rather than x). In this case, the function must first be solved first in the form x(y). That is, for example
After that, the function x(y) can be integrated in exactly the same way as in other cases.
Example: Find the area between the function f x) = 2x + 1 and the y-axis when y is in interval [-1,3].
A graph with Geogebra
So we must firstchange y(x) = 2x + 1 to x(y) = 12 (y-1). This function has a zero point when y = 1. When y < 1, x is negative. When y > 1, x is positive. When calculating the area, the integral must again be divided into two parts
When calculating with a computer, it is a good idea to change the name of y to x, as many calculators assume that the integration variable is x. In this case, for example, you can enter the following expression in Geogebra:
Turn on the subtitles if needed