Simpson's 3/8 Rule Calculator for a Function

Approximate an integral (given by a function) using the Simpson's 3/8 rule step by step

An online calculator for approximating a definite integral using Simpson's 3/8 rule, with steps shown.

Related calculators: Simpson's Rule Calculator for a Function, Simpson's 3/8 Rule Calculator for a Table

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please contact us.

Your Input

Approximate the integral 03x3+5dx\int\limits_{0}^{3} \sqrt{x^{3} + 5}\, dx with n=6n = 6 using the Simpson's 3/8 rule.

Solution

The Simpson's 3/8 rule uses cubic polynomials to approximate the area:

abf(x)dx3Δx8(f(x0)+3f(x1)+3f(x2)+2f(x3)+3f(x4)+3f(x5)+2f(x6)++3f(xn5)+3f(xn4)+2f(xn3)+3f(xn2)+3f(xn1)+f(xn))\int\limits_{a}^{b} f{\left(x \right)}\, dx\approx \frac{3 \Delta x}{8} \left(f{\left(x_{0} \right)} + 3 f{\left(x_{1} \right)} + 3 f{\left(x_{2} \right)} + 2 f{\left(x_{3} \right)} + 3 f{\left(x_{4} \right)} + 3 f{\left(x_{5} \right)} + 2 f{\left(x_{6} \right)}+\dots+3 f{\left(x_{n-5} \right)} + 3 f{\left(x_{n-4} \right)} + 2 f{\left(x_{n-3} \right)} + 3 f{\left(x_{n-2} \right)} + 3 f{\left(x_{n-1} \right)} + f{\left(x_{n} \right)}\right)

where Δx=ban\Delta x = \frac{b - a}{n}.

We have that f(x)=x3+5f{\left(x \right)} = \sqrt{x^{3} + 5}, a=0a = 0, b=3b = 3, and n=6n = 6.

Therefore, Δx=306=12\Delta x = \frac{3 - 0}{6} = \frac{1}{2}.

Divide the interval [0,3]\left[0, 3\right] into n=6n = 6 subintervals of the length Δx=12\Delta x = \frac{1}{2} with the following endpoints: a=0a = 0, 12\frac{1}{2}, 11, 32\frac{3}{2}, 22, 52\frac{5}{2}, 3=b3 = b.

Now, just evaluate the function at these endpoints.

f(x0)=f(0)=52.23606797749979f{\left(x_{0} \right)} = f{\left(0 \right)} = \sqrt{5}\approx 2.23606797749979

3f(x1)=3f(12)=38246.7915388536030623 f{\left(x_{1} \right)} = 3 f{\left(\frac{1}{2} \right)} = \frac{3 \sqrt{82}}{4}\approx 6.791538853603062

3f(x2)=3f(1)=367.3484692283495343 f{\left(x_{2} \right)} = 3 f{\left(1 \right)} = 3 \sqrt{6}\approx 7.348469228349534

2f(x3)=2f(32)=13425.7879184513951132 f{\left(x_{3} \right)} = 2 f{\left(\frac{3}{2} \right)} = \frac{\sqrt{134}}{2}\approx 5.787918451395113

3f(x4)=3f(2)=31310.8166538263919683 f{\left(x_{4} \right)} = 3 f{\left(2 \right)} = 3 \sqrt{13}\approx 10.816653826391968

3f(x5)=3f(52)=3330413.6244265934387123 f{\left(x_{5} \right)} = 3 f{\left(\frac{5}{2} \right)} = \frac{3 \sqrt{330}}{4}\approx 13.624426593438712

f(x6)=f(3)=425.65685424949238f{\left(x_{6} \right)} = f{\left(3 \right)} = 4 \sqrt{2}\approx 5.65685424949238

Finally, just sum up the above values and multiply by 3Δx8=316\frac{3 \Delta x}{8} = \frac{3}{16}: 316(2.23606797749979+6.791538853603062+7.348469228349534+5.787918451395113+10.816653826391968+13.624426593438712+5.65685424949238)=9.79911172128198.\frac{3}{16} \left(2.23606797749979 + 6.791538853603062 + 7.348469228349534 + 5.787918451395113 + 10.816653826391968 + 13.624426593438712 + 5.65685424949238\right) = 9.79911172128198.

Answer

03x3+5dx9.79911172128198\int\limits_{0}^{3} \sqrt{x^{3} + 5}\, dx\approx 9.79911172128198A