The Wayback Machine - https://web.archive.org/web/20240916050853/https://www.geeksforgeeks.org/computing-definite-integrals/
Open In App

Computing Definite Integrals

Last Updated : 24 Jun, 2021
Summarize
Comments
Improve
Suggest changes
Like Article
Like
Save
Share
Report
News Follow

Integrals are a very important part of the calculus. They allow us to calculate the anti-derivatives, that is given a function’s derivative, integrals give the function as output. Other important applications of integrals include calculating the area under the curve, the volume enclosed by a surface, etc. While the previous application mostly involves indefinite integrals, the latter one requires the boundaries to be well-defined and the integral is calculated in between those boundaries only. Such integrals are called definite integrals. 

Definite Integrals

Definite integrals are mostly used to calculate the areas and the volumes enclosed by the curves. Usually, the area is calculated using well-defined formulas for rectangles, circles, and squares, etc. In real life the shapes are not that simple, thus for calculating the areas for any arbitrary shape we use the definite integrals. For a function f(x) defined on the interval [a, b], the definite integral between these limits is given by, 

\int^{b}_af(x)dx

Here a is called the lower limit of the function and b is called the higher limit of the function. 

Given a function f(x) that is continuous on the interval [a, b] we divide the interval into n subintervals of equal width, \Delta x and from each interval choose a point x^{*}_{i}. Then the definite integral of f(x) from a to b is, 

\int^{b}_{a}f(x)dx = \lim_{n \to \infty}\sum^{n}_{i = 1}f(x_{i}^{*})\Delta x

The above figure explains the limit definition, as we increase the number of rectangles under the curve the approximated area becomes closer and closer to the actual area under the figure. 

Fundamental Theorem of Calculus

The area of the region bounded by the curve f(x) between the ordinates x = a and x = b and the x-axis is given by \int^{b}_{a}f(x)dx. Let’s say x is any point between the limits, then \int^{x}_{a}f(x)dx represents the area of the region from a to x. In other words, the area of this shaded region from “a” up until the value x is called the area function. It is given by, 

A = \int^{x}_{a}f(x)dx

Based on this definition, two fundamental theorems of calculus are defined. 

First Fundamental Theorem of Calculus

Let f(x) be a continuous function on the closed interval [a, b] and let A(x) be the area function. 

Then, A'(x) = f(x), for all x ∈ [a, b]. 

Second Fundamental Theorem of Calculus 

Let f(x) be a continuous function on the closed interval [a, b] and let F(x) be the anti-derivatives of the function f(x). Then, 

\int^{b}_{a}f(x)dx = [F(x)]^{b}_{a} = F(b) - F(a)

Area under the Curve

The area under the curve is given by the definite integrals. We know that the area is always a positive quantity, but while using the definite integrals, sometimes the area that comes out is negative. For example, consider the two functions below, one lies completely above the x-axis, the other one has some part that lies below the x-axis. In such cases, the two areas might cancel out each other. 

In this case, the area is given by, 

A = \int^{b}_{a}f(x)dx

For this case, the negative and positive areas must be calculated separately and only the magnitude of their areas must be added. 

A = \int^{c}_{a}f(x)dx + \int^{b}_{c}f(x)dx

Definite Integrals of Rational Function

For calculating the definite integrals for such functions, these functions are broken down using algebraic manipulation. 

Question: Calculate the value of the following integral

\int^{3}_{1}\frac{1 - x}{x^2}dx

Solution: 

\int^{3}_{1}\frac{1 - x}{x^2}dx \\ = \int^{3}_{1}( \frac{1}{x^2} - \frac{1}{x})dx \\ = \int^{3}_{1}( \frac{1}{x^2} )dx- \int^{3}_{1}(\frac{1}{x})dx \\ = [\frac{-1}{x}]^3_1 - [log(x)]^{3}_{1} \\ = 1 - \frac{1}{3} - (log(3) - log(1)) \\ = \frac{2}{3} - log(3)

Definite Integrals of Radical Functions

For calculating the definite integrals for such functions, we use the reverse power rule. 

Question: Calculate the value of the following integral

\int^{1}_{0}x^{\frac{1}{3}}dx

Solution: 

\int^{1}_{0}x^{\frac{1}{3}}dx

Using the reversed power rule, 

\int^{1}_{0}x^{\frac{1}{3}}dx \\ = [\frac{x^{\frac{4}{3}}}{\frac{3}{4}}]^{1}_{0} \\ = \frac{4}{3}

Definite Integrals of Trigonometric Functions

For calculating the definite integrals for such functions, we use the reverse power rule. 

Question: Calculate the value of the following integral

\int^{1}_{0}sin(x)dx

Solution: 

\int^{1}_{0}sin(x)dx \\ = [-cos(x)]^{1}_{0} \\ = 1 - cos(1)

Definite Integrals of Natural Logarithmic Function

For calculating the definite integrals for such functions, we use the following identity. 

\int ln(x)dx = xln(x) - x + C

Question: Calculate the value of the following integral

\int^{2}_{1}(ln(x) + 1)dx

Solution: 

\int^{2}_{1}(ln(x) + 1)dx \\ = \int^{2}_{1} ln(x)dx + \int^{2}_{1} 1dx

Using the formula mentioned above, 

\int^{2}_{1} ln(x)dx + \int^{2}_{1} 1dx \\ = [xln(x) - x]^2_1 + [x]^2_1 \\ = ((2ln(2) - 2) - (1ln(1) - 1)) + (2 - 1) \\ = (2ln(2) - 1) + 1\\ = 2ln(2)

Let’s look at some sample problems

Sample Problems

Question 1: Calculate the value of the following integral

\int^{3}_{1}(x^2 + x)dx

Solution: 

\int^{3}_{1}(x^2 + x)dx \\ = \int^{3}_{1}x^2dx + \int^{3}_{1}xdx \\ = [\frac{x^3}{3}]^3_1 + [\frac{x^2}{2}]^3_1 \\ = 9 - \frac{1}{3} + \frac{9}{2} - \frac{1}{2} \\ = 12 - \frac{1}{3} \\ = \frac{35}{3}

Question 2: Calculate the value of the following integral

\int^{1}_{0}\frac{(x^2 + x)}{x}dx

Solution: 

\int^{1}_{0}\frac{(x^2 + x)}{x}dx \\ = \int^{1}_{0}xdx + \int^{1}_{0}1dx  \\ = [\frac{x^2}{2}]^1_0 + [x]^{1}_{0} \\ = \frac{1}{2} + 1 \\ = \frac{3}{2}

Question 3: Calculate the value of the following integral

\int^{1}_{0}(\sqrt{x} + x)dx

Solution: 

\int^{1}_{0}(\sqrt{x} + x)dx

Using the reversed power rule

\int^{1}_{0}(\sqrt{x} + x)dx \\ =[\frac{x^{\frac{3}{2}}}{\frac{3}{2}}  + x^2]^1_0 \\ = [\frac{2x^{\frac{3}{2}}}{3}  + x^2]^1_0 \\ = \frac{2}{3} + 1 \\ = \frac{5}{3}

Question 4: Calculate the value of the following integral

\int^{1}_{0}sin(x) + cos(x)dx

Solution: 

\int^{1}_{0}sin(x) + cos(x)dx \\ = [-cos(x) + sin(x)]^1_0 \\ = [-cos(1) + sin(1)] - [1] \\ = sin(1) - cos(1) - 1

Question 5: Calculate the value of the following integral

\int^{2}_{1}(ln(x) + e^x)dx

Solution: 

\int^{2}_{1}(ln(x) + e^x)dx \\ = \int^{2}_{1} ln(x)dx + \int^{2}_{1} e^xdx

Using the formula mentioned above, 

\int^{2}_{1} ln(x)dx + \int^{2}_{1} e^xdx \\ = [xln(x) - x]^2_1 + [e^x]^2_1 \\ = ((2ln(2) - 2) - (1ln(1) - 1)) + (e^2 - e) \\ = (2ln(2) - 1) + e^2 - e\\ = 2ln(2) + e^2 -e -1



Previous Article
Next Article

Similar Reads

Definite Integrals of Piecewise Functions
Imagine a graph with a function drawn on it, it can be a straight line or a curve or anything as long as it is a function. Now, this is just one function on the graph, can 2 functions simultaneously occur on the graph? Imagine two functions simultaneously occurring on the graph, say, a straight line and a curve, and the limits on the x-axis for whi
5 min read
Properties of Definite Integrals
Properties of Definite Integrals: An integral that has a limit is known as a definite integral. It has an upper limit and a lower limit. It is represented as [Tex]\int_{a}^{b}[/Tex]f(x) = F(b) − F(a) There are many properties regarding definite integral. We will discuss each property one by one with proof. Definite IntegralsDefinite integrals are u
8 min read
Evaluating Definite Integrals
Integration, as the name suggests is used to integrate something. In mathematics, integration is the method used to integrate functions. The other word for integration can be summation as it is used, to sum up, the entire function or in a graphical way, used to find the area under the curve function. Integration is known to be the opposite of diffe
9 min read
Applications of Definite Integrals
Definite Integrals are used to find areas of the complex curve, volumes of irregular shapes, and other things. Definite Integrals are defined by, let us take p(x) to be the antiderivative of a continuous function f(x) defined on [a, b] then, the definite integral of f(x) over [a, b] is denoted by[Tex]\int\limits_{a}^{b}f(x)dx [/Tex] and is equal to
10 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.5 | Set 3
Evaluate the following definite integrals as limits of sums:Question 23. [Tex]\int_{0}^{4}(x+e^{2x})dx[/Tex]Solution: We have, I =[Tex]\int_{0}^{4}(x+e^{2x})dx[/Tex] We know, [Tex]\int_{a}^{b}f(x)dx=\lim_{h\to0}h[f(a)+f(a+h)+f(a+2h)+...+f(a+(n-1)h)] [/Tex], where h =[Tex]\frac{b-a}{n}[/Tex] Here a = 0, b = 4 and f(x) = x + e2x. => h = 4/n =>
6 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.5 | Set 2
Evaluate the following definite integrals as limits of sums:Question 12. [Tex]\int_{0}^{2}(x^2+4)dx[/Tex]Solution: We have, I =[Tex]\int_{0}^{2}(x^2+4)dx[/Tex] We know, [Tex]\int_{a}^{b}f(x)dx=\lim_{h\to0}h[f(a)+f(a+h)+f(a+2h)+...+f(a+(n-1)h)] [/Tex], where h =[Tex]\frac{b-a}{n}[/Tex] Here a = 0, b = 2 and f(x) = x2 + 4. => h = 2/n => nh = 2
5 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.5 | Set 1
Evaluate the following definite integrals as limits of sums:Question 1. [Tex]\int_{0}^{3}(x+4)dx[/Tex]Solution: We have, I =[Tex]\int_{0}^{3}(x+4)dx[/Tex] We know,[Tex]\int_{a}^{b}f(x)dx=\lim_{h\to0}h[f(a)+f(a+h)+f(a+2h)+...+f(a+(n-1)h)] [/Tex], where h =[Tex]\frac{b-a}{n}[/Tex] Here a = 0, b = 3 and f(x) = x + 4. => h = 3/n => nh = 3 So, we
5 min read
Class 12 RD Sharma Solutions- Chapter 20 Definite Integrals – Exercise 20.4 Part B
Evaluate of each of the following integrals (1-46):Question 1. [Tex]\int\limits_0^{\frac{π}{2}} \frac{1}{1+tanx}dx[/Tex]Solution: We have, [Tex]\int\limits_0^{\frac{π}{2}} \frac{1}{1+tanx}dx = \int\limits_0^{\frac{π}{2}} \frac{cosx}{cosx+sinx}dx[/Tex] [Tex]\int\limits_0^{\frac{π}{2}} \frac{1}{1+tanx}dx =\int\limits_0^{\frac{π}{2}} \frac{cosx}{cosx+
12 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.1 | Set 2
Evaluate the following definite integrals:Question 23. [Tex]\int_{0}^{\frac{\pi}{2}} (a^2cos^2x+b^2sin^2x)dx[/Tex]Solution: We have, I = [Tex]\int_{0}^{\frac{\pi}{2}} (a^2cos^2x+b^2sin^2x)dx[/Tex] I = [Tex]\int_{0}^{\frac{\pi}{2}} (a^2cos^2x+b^2(1-cos^2x))dx[/Tex] I = [Tex]\int_{0}^{\frac{\pi}{2}} [(a^2-b^2)cos^2x+b^2]dx[/Tex] I = [Tex]\int_{0}^{\f
10 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.1 | Set 3
Evaluate the following definite integrals:Question 45. [Tex]\int_{1}^{4} \frac{x^2+x}{\sqrt{2x+1}}dx[/Tex]Solution: We have, I = [Tex]\int_{1}^{4} \frac{x^2+x}{\sqrt{2x+1}}dx[/Tex] Let 2x + 1 = t2, so we have, => 2 dx = 2t dt => dx = t dt Now, the lower limit is, x = 1 => t2 = 2x + 1 => t2 = 2(1) + 1 => t2 = 3 => t = √3 Also, the
10 min read
Class 12 RD Sharma Solutions- Chapter 20 Definite Integrals - Exercise 20.4 Part A
Evaluate each of the following integrals (1-16):Question 1. [Tex]\int\limits_0^{2π}\frac{e^{sinx}}{e^{sinx}+e^{-sinx}}dx[/Tex]Solution: We know that [Tex]\int\limits_0^{2π }f(x)dx=\int\limits_0^{2π }f(2π -x)dx[/Tex] so, [Tex]\int\limits_0^{2π}\frac{e^{sinx}}{e^{sinx}+e^{-sinx}}dx =\int\limits_0^{2π}\frac{e^{sin(2π-x)}}{e^{sin(2π-x)}+e^{-sin(2π-x)}}
5 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.2 | Set 1
Evaluate the following definite integrals:Question 1. [Tex]\int_{2}^{4}\frac{x}{x^2+1}dx[/Tex]Solution: We have, I = [Tex]\int_{2}^{4}\frac{x}{x^2+1}dx[/Tex] I = [Tex]\frac{1}{2}\int_{2}^{4}\frac{2x}{x^2+1}dx[/Tex] I = [Tex]\left[\frac{1}{2}\log(1+x^2)\right]_{2}^{4}[/Tex] I = [Tex]\frac{1}{2}\log(1+4^2)-\frac{1}{2}\log(1+2^2)[/Tex] I = [Tex]\frac{
13 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.3 | Set 2
Evaluate the following integrals:Question 15. [Tex]\int\limits_{- \pi/2}^{\pi/2} \left\{ \sin \left| x \right| + \cos \left| x \right| \right\} dx[/Tex]Solution: We have, I = [Tex]\int\limits_{- \pi/2}^{\pi/2} \left\{ \sin \left| x \right| + \cos \left| x \right| \right\} dx[/Tex] Since f(- x) = sin|- x| + cos|- x| = sin |x| + cos |x| = f(x) So, f(
13 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.2 | Set 2
Evaluate the following definite integrals:Question 21. [Tex]\int_{0}^{\pi}\frac{sinx}{sinx+cosx}dx[/Tex]Solution: We have, I = [Tex]\int_{0}^{\pi}\frac{sinx}{sinx+cosx}dx[/Tex] Let sin x = A (sin x + cos x) + B[Tex]\frac{d}{dx}(sinx+cosx)[/Tex] => sin x = A (sin x + cos x) + B (cos x – sin x) => sin x = sin x (A – B) + cos x (A + B) On compar
11 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.3 | Set 1
Evaluate the following integrals:Question 1(i). [Tex]\int\limits_1^4 f\left( x \right) dx, where\ f\left( x \right) = \begin{cases}4x + 3 & , & \text{if }1 \leq x \leq 2 \\3x + 5 & , & \text{if }2 \leq x \leq 4\end{cases}[/Tex]Solution: We have, I = [Tex]\int\limits_1^4 f\left( x \right) dx, where\ f\left( x \right) = \begin{cases}4
12 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.2 | Set 3
Evaluate the following definite integrals:Question 42. [Tex]\int_{0}^{\pi}5(5-4\cos\theta)^{\frac{1}{4}}\sin\theta d\theta[/Tex]Solution: We have, I = [Tex]\int_{0}^{\pi}5(5-4\cos\theta)^{\frac{1}{4}}\sin\theta d\theta[/Tex] Let 5 – 4 cos θ = t. So, we have => 4 sin θ dθ = dt => sin θ dθ = dt/4 Now, the lower limit is, θ = 0 => t = 5 – 4 c
14 min read
Class 12 RD Sharma Solutions - Chapter 20 Definite Integrals - Exercise 20.1 | Set 1
Chapter 20 of RD Sharma's Class 12 textbook focuses on Definite Integrals a fundamental concept in calculus. This chapter introduces the concept of definite integrals including their properties, evaluation, and applications. Understanding definite integrals is crucial for solving problems involving the areas under curves and physical quantities in
10 min read
Definite Integral | Mathematics
Definite integrals are the extension after indefinite integrals, definite integrals have limits [a, b]. It gives the area of a curve bounded between given limits. [Tex]\int_{a}^{b}F(x)dx [/Tex], It denotes the area of curve F(x) bounded between a and b, where a is the lower limit and b is the upper limit. Note: If f is a continuous function defined
1 min read
Definite Integral as the Limit of a Riemann Sum
Definite integrals are an important part of calculus. They are used to calculate the areas, volumes, etc of arbitrary shapes for which formulas are not defined. Analytically they are just indefinite integrals with limits on top of them, but graphically they represent the area under the curve. The limits denote the boundaries between which the area
7 min read
How to Calculate a Definite Integral?
A definite integral is a mathematical concept used in calculus to calculate the total effect of a function over a given time frame. It represents the net area between the function's graph and the x-axis during a certain time frame. A definite integral is calculated by determining the area under a curve between two specified locations on the x-axis.
10 min read
Definite Integral | Definition, Formula & How to Calculate
A definite integral is an integral that calculates a fixed value for the area under a curve between two specified limits. The resulting value represents the sum of all infinitesimal quantities within these boundaries. i.e. if we integrate any function within a fixed interval it is called a Definite Integral. The starting point of the interval is th
10 min read
Area as Definite Integral
Integrals are an integral part of calculus. They represent summation, for functions which are not as straightforward as standard functions, integrals help us to calculate the sum and their areas and give us the flexibility to work with any type of function we want to work with. The areas for the standard functions are already known, it is not easy
8 min read
Mathematics | Indefinite Integrals
Antiderivative - Definition :A function ∅(x) is called the antiderivative (or an integral) of a function f(x) of ∅(x)' = f(x). Example : x4/4 is an antiderivative of x3 because (x4/4)' = x3. In general, if ∅(x) is antiderivative of a function f(x) and C is a constant.Then, {∅(x)+C}' = ∅(x) = f(x). Indefinite Integrals
4 min read
Class 12 RD Sharma Solutions - Chapter 19 Indefinite Integrals - Exercise 19.1
Question 1. Integrate the following integrals with respect to x:(i) ∫ x4 dx Solution: ∫ x4 dx = x4+1/(4+1) + Constant = x5/5 + C (ii) ∫ x5/4 dx Solution: ∫ x5/4 dx = x5/4 + 1/(5/4 +1) + Constant = 4/9 x9/4 + C (iii) ∫ 1/x5 dx Solution: ∫ 1/x5 dx = ∫ x-5 dx = x-5+1/(-5+1) + Constant = x-4/(-4)+ C = -1/(4x4) + C (iv) ∫ 1/x3/2 dx Solution: ∫ x-3/2 dx
3 min read
Class 12 RD Sharma Solutions - Chapter 19 Indefinite Integrals - Exercise 19.3 | Set 1
Question 1. Integrate ∫(2x - 3)5 + √3x + 2 dxSolution: Let I = ∫(2x - 3)5 + √3x + 2 dx -(1) On integrating the equation(1), we get = [Tex]\frac{(2x - 3)^6}{(2 × 6)} + \frac{(3x + 2)^{\frac{3}{2}}}{3×\frac{3}{2}} + c[/Tex] = [Tex]\frac{(2x - 3)^6}{12} + \frac{2(3x + 2)^{\frac{3}{2}}}{9} + c[/Tex] Therefore, I = [Tex]\frac{(2x - 3)^6}{12} + \frac{2(3
4 min read
Class 12 RD Sharma Solutions - Chapter 19 Indefinite Integrals - Exercise 19.10
Question 1. Evaluate ∫ x2 √x + 2 dx Solution: Let, I = ∫ x2 √x + 2 dx (i) Substituting x + 2 = t, x= t - 2 dx = dt Substitute the above value in eq (i) = ∫ (t - 2)2 √t dt = ∫ (t2 + 4 - 4t) t1/2 dt = ∫(t5/2 + 4t1/2 - 4t3/2) dt Integrate the above eq then, we get = t7/2/(7/2) + 4t3/2/(3/2) - 4t5/2/(5/2) + c =(2/7) t7/2 + (8/3) t3/2 - (8/5) t5/2 + c N
5 min read
Class 12 RD Sharma Solutions - Chapter 19 Indefinite Integrals - Exercise 19.8 | Set 2
Question 26. Evaluate ∫ 2cosx - 3sinx/ 6cosx + 4sinx dx Solution: Let us assume I = ∫ 2cosx - 3sinx/ 6cosx + 4sinx dx = ∫ 2cosx - 3sinx/ 2(3cosx + 2sinx) dx = ∫ 2cosx - 3sinx/ 2(3cosx + 2sinx) dx ...........(i) Let 3cosx + 2sinx = t d(3cosx + 2sinx) = dt (-3sinx + 2cosx) dx = dt (2cosx - 3sinx) dx = dt Put all these values in equation(i), we get =
13 min read
Class 12 RD Sharma Solutions - Chapter 19 Indefinite Integrals - Exercise 19.5
Question 1. [Tex]\int\frac{x+1}{\sqrt{2x+3}}dx[/Tex] Solution: Given integral, [Tex]\int\frac{x+1}{\sqrt{2x+3}}dx[/Tex] On Multiplying and dividing with 2, we get ⇒ [Tex]\frac{1}{2}\int\frac{2(x+1)}{\sqrt{2x+3}}dx [/Tex] ⇒ [Tex]\frac{1}{2}\int\frac{(2x+3)-1}{\sqrt{2x+3}}dx[/Tex] ⇒ [Tex]\frac{1}{2}(\int\sqrt{2x+3}dx-\int\frac{1}{\sqrt{2x+3}}dx)[/Tex
3 min read
Class 12 RD Sharma Solutions - Chapter 19 Indefinite Integrals - Exercise 19.29
Evaluate the following integrals:Question 1. ∫(x + 1)√(x2 – x + 1)dx Solution: We have, ∫(x + 1)√(x2 – x + 1)dx Let x + 1 = a d(x2 – x + 1)/dx + b => x + 1 = a(2x – 1) + b On comparing both sides, we get, => 2a = 1 and b – a = 1 => a = 1/2 and b = 1 + 1/2 = 3/2 So, our equation becomes, = ∫[(1/2)(2x – 1) + 3/2]√(x2 – x + 1)dx = (1/2)∫(2x –
11 min read
Class 12 RD Sharma Solutions - Chapter 19 Indefinite Integrals - Exercise 19.9 | Set 1
Evaluate the following integrals:Question 1. ∫(log⁡x)/x dx Solution: Given that, I = ∫(log⁡x)/x dx Let us considered log⁡x = t Now differentiating both side we get, d(log⁡x) = dt 1/x dx = dt dx = xdt Then, put log⁡x = t and dx = xdt, we get I = ∫ t/x × (x)dt = ∫ tdt = t2/2 + c = (log⁡x)2/2 + c Hence, I = (log⁡x)2/2 + c Question 2.∫(log⁡(1 + 1/x))/(
11 min read