Approximate $$$\int\limits_{0}^{4} e^{x^{2}}\, dx$$$ with $$$n = 100$$$ using the Simpson's rule

The calculator will approximate the integral of $$$e^{x^{2}}$$$ from $$$0$$$ to $$$4$$$ with $$$n = 100$$$ subintervals using the Simpson's rule, with steps shown.

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

If the calculator did not compute something or you have identified an error, or you have a suggestion/feedback, please write it in the comments below.

Your Input

Approximate the integral $$$\int\limits_{0}^{4} e^{x^{2}}\, dx$$$ with $$$n = 100$$$ using the Simpson's rule.

Solution

The Simpson's 1/3 rule (also known as the parabolic rule) uses parabolas to approximate the area:

$$$\int\limits_{a}^{b} f{\left(x \right)}\, dx\approx \frac{\Delta x}{3} \left(f{\left(x_{0} \right)} + 4 f{\left(x_{1} \right)} + 2 f{\left(x_{2} \right)} + 4 f{\left(x_{3} \right)} + 2 f{\left(x_{4} \right)}+\dots+4 f{\left(x_{n-3} \right)} + 2 f{\left(x_{n-2} \right)} + 4 f{\left(x_{n-1} \right)} + f{\left(x_{n} \right)}\right)$$$

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

We have that $$$f{\left(x \right)} = e^{x^{2}}$$$, $$$a = 0$$$, $$$b = 4$$$, and $$$n = 100$$$.

Therefore, $$$\Delta x = \frac{4 - 0}{100} = \frac{1}{25}$$$.

Divide the interval $$$\left[0, 4\right]$$$ into $$$n = 100$$$ subintervals of the length $$$\Delta x = \frac{1}{25}$$$ with the following endpoints: $$$a = 0$$$, $$$\frac{1}{25}$$$, $$$\frac{2}{25}$$$, $$$\frac{3}{25}$$$, $$$\frac{4}{25}$$$, $$$\frac{1}{5}$$$, $$$\frac{6}{25}$$$, $$$\frac{7}{25}$$$, $$$\frac{8}{25}$$$, $$$\frac{9}{25}$$$, $$$\frac{2}{5}$$$, $$$\frac{11}{25}$$$, $$$\frac{12}{25}$$$, $$$\frac{13}{25}$$$, $$$\frac{14}{25}$$$, $$$\frac{3}{5}$$$, $$$\frac{16}{25}$$$, $$$\frac{17}{25}$$$, $$$\frac{18}{25}$$$, $$$\frac{19}{25}$$$, $$$\frac{4}{5}$$$, $$$\frac{21}{25}$$$, $$$\frac{22}{25}$$$, $$$\frac{23}{25}$$$, $$$\frac{24}{25}$$$, $$$1$$$, $$$\frac{26}{25}$$$, $$$\frac{27}{25}$$$, $$$\frac{28}{25}$$$, $$$\frac{29}{25}$$$, $$$\frac{6}{5}$$$, $$$\frac{31}{25}$$$, $$$\frac{32}{25}$$$, $$$\frac{33}{25}$$$, $$$\frac{34}{25}$$$, $$$\frac{7}{5}$$$, $$$\frac{36}{25}$$$, $$$\frac{37}{25}$$$, $$$\frac{38}{25}$$$, $$$\frac{39}{25}$$$, $$$\frac{8}{5}$$$, $$$\frac{41}{25}$$$, $$$\frac{42}{25}$$$, $$$\frac{43}{25}$$$, $$$\frac{44}{25}$$$, $$$\frac{9}{5}$$$, $$$\frac{46}{25}$$$, $$$\frac{47}{25}$$$, $$$\frac{48}{25}$$$, $$$\frac{49}{25}$$$, $$$2$$$, $$$\frac{51}{25}$$$, $$$\frac{52}{25}$$$, $$$\frac{53}{25}$$$, $$$\frac{54}{25}$$$, $$$\frac{11}{5}$$$, $$$\frac{56}{25}$$$, $$$\frac{57}{25}$$$, $$$\frac{58}{25}$$$, $$$\frac{59}{25}$$$, $$$\frac{12}{5}$$$, $$$\frac{61}{25}$$$, $$$\frac{62}{25}$$$, $$$\frac{63}{25}$$$, $$$\frac{64}{25}$$$, $$$\frac{13}{5}$$$, $$$\frac{66}{25}$$$, $$$\frac{67}{25}$$$, $$$\frac{68}{25}$$$, $$$\frac{69}{25}$$$, $$$\frac{14}{5}$$$, $$$\frac{71}{25}$$$, $$$\frac{72}{25}$$$, $$$\frac{73}{25}$$$, $$$\frac{74}{25}$$$, $$$3$$$, $$$\frac{76}{25}$$$, $$$\frac{77}{25}$$$, $$$\frac{78}{25}$$$, $$$\frac{79}{25}$$$, $$$\frac{16}{5}$$$, $$$\frac{81}{25}$$$, $$$\frac{82}{25}$$$, $$$\frac{83}{25}$$$, $$$\frac{84}{25}$$$, $$$\frac{17}{5}$$$, $$$\frac{86}{25}$$$, $$$\frac{87}{25}$$$, $$$\frac{88}{25}$$$, $$$\frac{89}{25}$$$, $$$\frac{18}{5}$$$, $$$\frac{91}{25}$$$, $$$\frac{92}{25}$$$, $$$\frac{93}{25}$$$, $$$\frac{94}{25}$$$, $$$\frac{19}{5}$$$, $$$\frac{96}{25}$$$, $$$\frac{97}{25}$$$, $$$\frac{98}{25}$$$, $$$\frac{99}{25}$$$, $$$4 = b$$$.

Now, just evaluate the function at these endpoints.

$$$f{\left(x_{0} \right)} = f{\left(0 \right)} = 1$$$

$$$4 f{\left(x_{1} \right)} = 4 f{\left(\frac{1}{25} \right)} = 4 e^{\frac{1}{625}}\approx 4.006405122731759$$$

$$$2 f{\left(x_{2} \right)} = 2 f{\left(\frac{2}{25} \right)} = 2 e^{\frac{4}{625}}\approx 2.012841047521323$$$

...

$$$2 f{\left(x_{98} \right)} = 2 f{\left(\frac{98}{25} \right)} = 2 e^{\frac{9604}{625}}\approx 9431325.252825402360056$$$

$$$4 f{\left(x_{99} \right)} = 4 f{\left(\frac{99}{25} \right)} = 4 e^{\frac{9801}{625}}\approx 2.5851892346161568240556 \cdot 10^{7}$$$

$$$f{\left(x_{100} \right)} = f{\left(4 \right)} = e^{16}\approx 8886110.520507872636763$$$

Finally, just sum up the above values and multiply by $$$\frac{\Delta x}{3} = \frac{1}{75}$$$: $$$\frac{1}{75} \left(1 + 4.006405122731759 + 2.012841047521323\dots 2.5851892346161568240556 \cdot 10^{7} + 8886110.520507872636763\right) = 1149470.375384353424875.$$$

Answer

$$$\int\limits_{0}^{4} e^{x^{2}}\, dx\approx 1149470.375384353424875$$$A