Solveeit Logo

Question

Question: How do you use the Trapezoidal Rule with step size \(n = 4\) to estimate \(\int {\left( {{x^3} + x} ...

How do you use the Trapezoidal Rule with step size n=4n = 4 to estimate (x3+x)dx\int {\left( {{x^3} + x} \right)} dx with [0,2]\left[ {0,2} \right]?

Explanation

Solution

In the above question we need to estimate the given function for the given range with size n=4n = 4 using the trapezoidal rule which states that abf(x)dx=Δx2[f(x0)+2f(x1)+2f(x2)+.......+2f(xn1)+f(xn)]\int\limits_a^b {f\left( x \right)} dx = \dfrac{{\Delta x}}{2}\left[ {f\left( {{x_0}} \right) + 2f\left( {{x_1}} \right) + 2f\left( {{x_2}} \right) + ....... + 2f\left( {{x_{n - 1}}} \right) + f\left( {{x_n}} \right)} \right]. We would initiate by finding Δx\Delta x, then moving on to find the sub-intervals of the function given. Substituting all the values and getting the results by solving.
Formula used:
1.abf(x)dx=Δx2[f(x0)+2f(x1)+2f(x2)+.......+2f(xn1)+f(xn)]\int\limits_a^b {f\left( x \right)} dx = \dfrac{{\Delta x}}{2}\left[ {f\left( {{x_0}} \right) + 2f\left( {{x_1}} \right) + 2f\left( {{x_2}} \right) + ....... + 2f\left( {{x_{n - 1}}} \right) + f\left( {{x_n}} \right)} \right]
2.Δx=ban\Delta x = \dfrac{{b - a}}{n}

Complete answer: We are given with the function (x3+x)dx\int {\left( {{x^3} + x} \right)} dx, for which we need to estimate the values using the intervals and size given.
Writing the function as f(x)dx=(x3+x)dx\int {f\left( x \right)} dx = \int {\left( {{x^3} + x} \right)} dx.
Considering the intervals [0,2]\left[ {0,2} \right] to be written as [a,b]\left[ {a,b} \right], that gives us a=0a = 0 and b=2b = 2.
Since, we know that Δx=ban\Delta x = \dfrac{{b - a}}{n}, substituting the values of a, b and n, we get:
Δx=204=24=12\Rightarrow \Delta x = \dfrac{{2 - 0}}{4} = \dfrac{2}{4} = \dfrac{1}{2}
We need to find the endpoints of the subintervals and that can be found with a=0a = 0 adding Δx\Delta x each step until, we reach xn=b=2{x_n} = b = 2.
Therefore, we have:
x0=a=0\Rightarrow {x_0} = a = 0
For next endpoint adding Δx\Delta x to x0{x_0}:
x1=0+12=12\Rightarrow {x_1} = 0 + \dfrac{1}{2} = \dfrac{1}{2}
x2=12+12=1\Rightarrow {x_2} = \dfrac{1}{2} + \dfrac{1}{2} = 1
x3=1+12=32\Rightarrow {x_3} = 1 + \dfrac{1}{2} = \dfrac{3}{2}
x4=32+12=42=2=b\Rightarrow {x_4} = \dfrac{3}{2} + \dfrac{1}{2} = \dfrac{4}{2} = 2 = b
Since, we obtained 2 which is the end interval, so we ended.

We know that trapezoidal rule states the formula as:
abf(x)dx=Δx2[f(x0)+2f(x1)+2f(x2)+.......+2f(xn1)+f(xn)]\int\limits_a^b {f\left( x \right)} dx = \dfrac{{\Delta x}}{2}\left[ {f\left( {{x_0}} \right) + 2f\left( {{x_1}} \right) + 2f\left( {{x_2}} \right) + ....... + 2f\left( {{x_{n - 1}}} \right) + f\left( {{x_n}} \right)} \right]
Substituting the values in the above equation, we get:
02f(x)dx=122[f(0)+2f(12)+2f(1)+2f(32)+f(2)]\int\limits_0^2 {f\left( x \right)} dx = \dfrac{{\dfrac{1}{2}}}{2}\left[ {f\left( 0 \right) + 2f\left( {\dfrac{1}{2}} \right) + 2f\left( 1 \right) + 2f\left( {\dfrac{3}{2}} \right) + f\left( 2 \right)} \right]
After simplifying, we get:
02(x3+x)dx=14[f(0)+2f(12)+2f(1)+2f(32)+f(2)]\int\limits_0^2 {\left( {{x^3} + x} \right)} dx = \dfrac{1}{4}\left[ {f\left( 0 \right) + 2f\left( {\dfrac{1}{2}} \right) + 2f\left( 1 \right) + 2f\left( {\dfrac{3}{2}} \right) + f\left( 2 \right)} \right] ….(1)
We need to find the values of all the endpoints of the interval:
Substituting f(0)f\left( 0 \right) in place of f(x)f\left( x \right):
For f(0)f\left( 0 \right):
f(0)=03+0=0f\left( 0 \right) = {0^3} + 0 = 0
Similarly, for others too:
For f(12)f\left( {\dfrac{1}{2}} \right):
f(12)=(12)3+12=18+12=1+48=58f\left( {\dfrac{1}{2}} \right) = {\left( {\dfrac{1}{2}} \right)^3} + \dfrac{1}{2} = \dfrac{1}{8} + \dfrac{1}{2} = \dfrac{{1 + 4}}{8} = \dfrac{5}{8}
For f(1)f\left( 1 \right):
f(1)=(1)3+1=1+1=2f\left( 1 \right) = {\left( 1 \right)^3} + 1 = 1 + 1 = 2

For f(32)f\left( {\dfrac{3}{2}} \right):
f(32)=(32)3+32=278+32=27+128=398f\left( {\dfrac{3}{2}} \right) = {\left( {\dfrac{3}{2}} \right)^3} + \dfrac{3}{2} = \dfrac{{27}}{8} + \dfrac{3}{2} = \dfrac{{27 + 12}}{8} = \dfrac{{39}}{8}
For f(2)f\left( 2 \right):
f(2)=(2)3+2=8+2=10f\left( 2 \right) = {\left( 2 \right)^3} + 2 = 8 + 2 = 10

Substituting all these values in the equation 1, we get:
02(x3+x)dx=14[0+2×58+2×2+2×398+10]\Rightarrow \int\limits_0^2 {\left( {{x^3} + x} \right)} dx = \dfrac{1}{4}\left[ {0 + 2 \times \dfrac{5}{8} + 2 \times 2 + 2 \times \dfrac{{39}}{8} + 10} \right]
Solving the brackets, we get:
02(x3+x)dx=14[54+4+394+10]\Rightarrow \int\limits_0^2 {\left( {{x^3} + x} \right)} dx = \dfrac{1}{4}\left[ {\dfrac{5}{4} + 4 + \dfrac{{39}}{4} + 10} \right]
Taking 4 as a common denominator, we get:
02(x3+x)dx=14[5+16+39+404]\Rightarrow \int\limits_0^2 {\left( {{x^3} + x} \right)} dx = \dfrac{1}{4}\left[ {\dfrac{{5 + 16 + 39 + 40}}{4}} \right]
02(x3+x)dx=14[5+16+39+404]\Rightarrow \int\limits_0^2 {\left( {{x^3} + x} \right)} dx = \dfrac{1}{4}\left[ {\dfrac{{5 + 16 + 39 + 40}}{4}} \right]
02(x3+x)dx=14[1004]\Rightarrow \int\limits_0^2 {\left( {{x^3} + x} \right)} dx = \dfrac{1}{4}\left[ {\dfrac{{100}}{4}} \right]
02(x3+x)dx=14[25]\Rightarrow \int\limits_0^2 {\left( {{x^3} + x} \right)} dx = \dfrac{1}{4}\left[ {25} \right]
02(x3+x)dx=254\Rightarrow \int\limits_0^2 {\left( {{x^3} + x} \right)} dx = \dfrac{{25}}{4}, which is the required solution;

Therefore, the value of (x3+x)dx\int {\left( {{x^3} + x} \right)} dx for the interval [0,2]\left[ {0,2} \right] is 254\dfrac{{25}}{4}.

Note:
Remember, since we found the estimated value, it can be somehow different from the actual value obtained by directly integrating the functions and putting off the limits. The difference between the estimated and the real value is known as error, which can be obtained by subtracting the estimated value from the real value. Therefore, the integral found using the Trapezoidal rule is an approximate value not the real value.