---
title: "Composite Simpson 3/8: e^x + sin 2x"
subject: "Numerical Method"
chapter: 5
key: "semester_4/numerical_method:simpson-38-composite"
source: https://www.bctengineer.com/q/semester_4/numerical_method/simpson-38-composite
site: BCT Engineering
---

# Composite Simpson 3/8: e^x + sin 2x

Numerical Method · Chapter 5: Numerical Differentiation and Integration

- Asked in: 2071 Bhadra, 5 marks
- Video: [Introduction to Simpson's 3/8th rule|Numerical Methods|Dream Maths](https://www.youtube.com/watch?v=M1-PGXnm-no) — Dream Maths
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/numerical_method/simpson-38-composite
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-5

## Question

Evaluate ∫ from 0 to 2 of f(x) dx, for the function f(x) = e^x + sin 2x using composite Simpson's 3/8 formula taking step size h = 0.4.

## Short answer

With h=0.4, n=5, use 3/8 rule on [0,1.2]: I1 = (3h/8)[1 + 3(2.2092) + 3(3.2251) + 3.9956] = 3.1948. Simpson’s 1/3 on [1.2,2]: I2 = (h/3)[3.9956 + 4(4.8947) + 6.6323] = 4.0275. Total integral ≈ 7.2223.

## Answer

Simpson's 3/8 rule: ∫ f dx ≈ (3h/8)[f₀ + 3f₁ + 3f₂ + 2f₃ + 3f₄ + 3f₅ + 2f₆ + … + fₙ], and it needs the number of sub-intervals n to be a multiple of 3.

With h = 0.4 on [0, 2], n = (2 − 0)/0.4 = 5, which is not a multiple of 3. So the 3/8 rule is applied to the first three sub-intervals [0, 1.2] and Simpson's 1/3 rule (n = 2) to the remaining two, [1.2, 2.0].

#### Function values f(x) = eˣ + sin 2x

| i | x | eˣ | sin 2x | f(x) |
|---|---|---|---|---|
| 0 | 0 | 1.0000 | 0.0000 | 1.0000 |
| 1 | 0.4 | 1.4918 | 0.7174 | 2.2092 |
| 2 | 0.8 | 2.2255 | 0.9996 | 3.2251 |
| 3 | 1.2 | 3.3201 | 0.6755 | 3.9956 |
| 4 | 1.6 | 4.9530 | -0.0584 | 4.8947 |
| 5 | 2 | 7.3891 | -0.7568 | 6.6323 |

#### Simpson's 3/8 on [0, 1.2]

```text
I₁ = (3h/8)[f₀ + 3f₁ + 3f₂ + f₃]
   = (3 × 0.4/8)[1.0000 + 3(2.2092) + 3(3.2251) + 3.9956]
   = 0.15 × 21.2985 = 3.1948
```

#### Simpson's 1/3 on [1.2, 2.0]

```text
I₂ = (h/3)[f₃ + 4f₄ + f₅]
   = (0.4/3)[3.9956 + 4(4.8947) + 6.6323]
   = 0.13333 × 30.2065 = 4.0275
```

#### Total

I = I₁ + I₂ = 3.1948 + 4.0275 = 7.2223

**Answer: ∫₀² (eˣ + sin 2x) dx ≈ 7.2223** (the exact value e² − 1 + (1 − cos 4)/2 = 7.2159).

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. What condition does Simpson's 3/8 rule need on n?
   A. n must be even
   B. n must be odd
   C. n must be a multiple of 3
   D. n must be a multiple of 4
   Answer: C. The 3/8 rule fits a cubic over three sub-intervals. (Key point: Condition)

2. With h = 0.4 on [0, 2], n = 5. How is it handled?
   A. 1/3 rule on the first three and 3/8 on the last two
   B. Apply 3/8 rule to all five with weights 3,3,2,3,3,1
   C. Change h to 0.5 silently
   D. 3/8 rule on the first three sub-intervals and 1/3 rule on the last two
   Answer: D. Three intervals suit the 3/8 rule and the remaining two suit the 1/3 rule. (Key point: Handling n = 5)

3. What is the 3/8 rule on one block [0, 1.2]?
   A. (3h/8)[f0 + 3f1 + 3f2 + f3]
   B. (h/3)[f0 + 4f1 + 4f2 + f3]
   C. (3h/8)[f0 + 4f1 + 4f2 + f3]
   D. (h/3)[f0 + 3f1 + 3f2 + f3]
   Answer: A. Weights are 1, 3, 3, 1 with factor 3h/8. (Key point: 3/8 weights)

4. What is the final result?
   A. 7.2159
   B. 7.2223, from 3.1948 + 4.0275
   C. 3.1948
   D. 8.0000
   Answer: B. I = I1 + I2 = 7.2223, close to the exact 7.2159. (Key point: Total)

## Related in Numerical Method

- [Composite Simpson 1/3 algorithm](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Asimpson-13-algorithm) — Numerical Method, chapter 5
- [Gauss 2-point and 3-point: log(x+1)+sin 2x](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-2pt-3pt-log-sin) — Numerical Method, chapter 5
- [Simpson 1/3: 4e^x/(1+x³)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Asimpson-13-4e-x) — Numerical Method, chapter 5
- [Gauss 3-point: cos2x/(1+sin x)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-3pt-cos2x-over-1-sinx) — Numerical Method, chapter 5
- [Gauss 3-point: 1/(x²+2x+1)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-3pt-1-over-x2-2x-1) — Numerical Method, chapter 5, asked 3×
- [Gauss 3-point: e^(sin x)](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Agauss-3pt-e-sinx) — Numerical Method, chapter 5, asked 3×

## Related in other subjects

- [Gamma function: ∫ sin⁶(x/2) cos⁶(x/2) dx](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Agamma-sin6-cos6-half-x) — Mathematics I, chapter 2, asked 3×
- [Integral of (sin x+cos x)/(9+16 sin 2x)](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Aintegral-sinx-cosx-over-9-16-sin2x) — Mathematics I, chapter 2
- [DUIS: ∫ e^(−x) sin bx / x dx](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Aduis-e-x-sin-bx-over-x) — Mathematics I, chapter 2, asked 10×
- [DUIS: ∫ log((a+b sin x)/(a−b sin x)) dx/sin x](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Aduis-log-a-plus-b-sinx) — Mathematics I, chapter 2, asked 9×
