krit.club logo

Calculus - Numerical integration

Grade 12IB_AI

Review the key concepts, formulae, and examples before starting your quiz.

🔑Concepts

•

Numerical integration provides an approximation for the definite integral ∫abf(x) dx\int_{a}^{b} f(x) \, dx when the function is difficult to integrate analytically or is only known at specific points.

•

The Trapezoidal Rule approximates the area under a curve by dividing it into nn equal sub-intervals (strips) and treating each strip as a trapezium.

•

The width of each strip, denoted by hh, is uniform and is calculated using the upper limit bb, lower limit aa, and the number of strips nn.

•

Each strip has a height determined by the function values yi=f(xi)y_i = f(x_i). The first and last yy-values are used once, while the 'middle' yy-values are used twice because they are shared by adjacent trapeziums.

•

Accuracy increases as the number of strips nn increases. The error depends on the concavity: if the graph is concave up, the rule overestimates the area; if concave down, it underestimates the area.

📐Formulae

h=b−anh = \frac{b - a}{n}

∫abf(x) dx≈h2[(y0+yn)+2(y1+y2+⋯+yn−1)]\int_{a}^{b} f(x) \, dx \approx \frac{h}{2} \left[ (y_0 + y_n) + 2(y_1 + y_2 + \dots + y_{n-1}) \right]

xi=a+i⋅hx_i = a + i \cdot h

💡Examples

Problem 1:

Estimate the value of ∫02x2+1 dx\int_{0}^{2} \sqrt{x^2 + 1} \, dx using the Trapezoidal Rule with n=4n = 4 strips.

Solution:

  1. Find the width of each strip hh: h=2−04=0.5h = \frac{2 - 0}{4} = 0.5

  2. Calculate the xx values and corresponding yy values (y=x2+1y = \sqrt{x^2 + 1}):

    • x0=0  ⟹  y0=02+1=1.000x_0 = 0 \implies y_0 = \sqrt{0^2 + 1} = 1.000
    • x1=0.5  ⟹  y1=0.52+1≈1.118x_1 = 0.5 \implies y_1 = \sqrt{0.5^2 + 1} \approx 1.118
    • x2=1.0  ⟹  y2=12+1≈1.414x_2 = 1.0 \implies y_2 = \sqrt{1^2 + 1} \approx 1.414
    • x3=1.5  ⟹  y3=1.52+1≈1.803x_3 = 1.5 \implies y_3 = \sqrt{1.5^2 + 1} \approx 1.803
    • x4=2.0  ⟹  y4=22+1≈2.236x_4 = 2.0 \implies y_4 = \sqrt{2^2 + 1} \approx 2.236
  3. Apply the Trapezoidal Rule formula: Area≈0.52[(1.000+2.236)+2(1.118+1.414+1.803)]\text{Area} \approx \frac{0.5}{2} [ (1.000 + 2.236) + 2(1.118 + 1.414 + 1.803) ] Area≈0.25[3.236+2(4.335)]\text{Area} \approx 0.25 [ 3.236 + 2(4.335) ] Area≈0.25[3.236+8.670]=0.25[11.906]=2.9765\text{Area} \approx 0.25 [ 3.236 + 8.670 ] = 0.25 [ 11.906 ] = 2.9765

Explanation:

First, we determine the strip width hh. Then, we generate a table of values for xx starting from the lower bound 00 in increments of 0.50.5 up to the upper bound 22. Finally, we substitute the boundary yy-values and the interior yy-values into the sum formula.

Problem 2:

A velocity-time graph for a car is given by the following data points. Estimate the distance traveled in the first 1212 seconds.

03691205874\begin{array}{r} 036912 \\ \hline 05874 \end{array}

Solution:

  1. Identify parameters: Interval [0,12][0, 12], n=4n = 4 intervals (since there are 55 data points). h=12−04=3h = \frac{12 - 0}{4} = 3 (The interval between tt values).

  2. The yy-values are the velocities: y0=0,y1=5,y2=8,y3=7,y4=4y_0 = 0, y_1 = 5, y_2 = 8, y_3 = 7, y_4 = 4.

  3. Calculate distance using the Trapezoidal Rule: Distance≈32[(0+4)+2(5+8+7)]\text{Distance} \approx \frac{3}{2} [ (0 + 4) + 2(5 + 8 + 7) ] Distance≈1.5[4+2(20)]\text{Distance} \approx 1.5 [ 4 + 2(20) ] Distance≈1.5[44]=66 m\text{Distance} \approx 1.5 [ 44 ] = 66 \text{ m}

Explanation:

Distance is the integral of velocity over time. Since we have discrete data points with a constant interval of h=3h = 3, we apply the Trapezoidal Rule using the provided velocity values as yy-coordinates.