Numerical integration
Adapted from Wikipedia · Adventurer experience
Numerical integration is a way to find the value of a definite integral by using special steps. It helps us calculate things that are hard to solve exactly, like finding the area under a curve. This is very useful in science and math.
The main idea is to break a hard problem into smaller, easier pieces that we can add up. There are many different ways, or step-by-step plans, to do this. These methods can be used for problems with one or more dimensions, and sometimes they are called quadrature or cubature.
Numerical integration started from an old problem of finding a square with the same area as another shape. Today, it helps solve many important problems in engineering, physics, and computer science by giving answers that are close enough for practical use. For more information about related topics, see Numerical methods for ordinary differential equations and Numerical methods for partial differential equations.
Motivation and need
We use numerical integration instead of finding the exact answer for a few reasons. Sometimes, we only know the value of a function at certain points, like when we measure it in real life. In other cases, we might have a formula, but it’s very hard or impossible to find the exact answer using normal math. For example, the function f (x) = exp(−x2) doesn’t have a simple answer we can write down. Even when we can find the exact answer, it might be easier to use a computer to estimate it instead.
History
Main article: Quadrature (geometry)
The idea of numerical integration started around 1915. People have always wanted to find the area of different shapes. This is called "quadrature." Ancient mathematicians, like those in Greece, tried to change shapes into squares of the same size. They could only use a compass and straightedge.
Many smart people worked on finding areas of shapes. For example, Archimedes found the area of a sphere and parts of a parabola. Later, in Europe, new methods helped find areas of curves. These efforts helped create the idea of integral calculus, which gives us better ways to calculate areas today.
Methods for one-dimensional integrals
A quadrature rule is a way to guess the definite integral of a function. It usually uses a weighted sum of the function's values at certain points.
Numerical integration methods guess the integral by adding up values of the function at specific points, called integration points. These points and their weights depend on the method and how accurate you want the guess to be.
One easy method guesses the function using a step function that passes through the middle of the interval. This is called the midpoint rule or rectangle rule. Another method uses a straight line through the ends of the interval, called the trapezoidal rule. Both methods can be made better by splitting the interval into smaller parts and adding up the results, called composite rules.
| ∫ a b f ( x ) d x − ( b − a ) f ( a ) | ≤ ( b − a ) 2 2 sup a ≤ x ≤ b | f ′ ( x ) | , {\displaystyle \left|\int _{a}^{b}f(x)\,dx-(b-a)f(a)\right|\leq {(b-a)^{2} \over 2}\sup _{a\leq x\leq b}\left|f'(x)\right|,} | 1 |
Multidimensional integrals
When we want to calculate integrals in more than one dimension, we can break them down into simpler one-dimensional integrals. But this can get very hard as the number of dimensions grows.
One common way to handle this is called Monte Carlo integration. This method uses random sampling to estimate the integral and can often be more accurate. Another approach uses sparse grids, which combine one-dimensional results in a smart way. Bayesian quadrature is a statistical method that helps manage uncertainty in the calculation.
Main article: Monte Carlo integration
Connection with differential equations
Finding the value of a definite integral is connected to solving a special type of equation called an ordinary differential equation. We can use ideas from calculus to change the integral problem into a problem where we look for a function that changes at the same rate as another function.
There are special methods to solve these equations, and they can help us find the integral. One common method is the Runge–Kutta method. Sometimes, solving equations using integrals is called "solving by quadrature."
This article is a child-friendly adaptation of the Wikipedia article on Numerical integration, available under CC BY-SA 4.0.
Safekipedia