---
title: "BVP: y'' + 3y' = y + x²"
subject: "Numerical Method"
chapter: 6
key: "semester_4/numerical_method:bvp-fd-y-double-prime-3y"
source: https://www.bctengineer.com/q/semester_4/numerical_method/bvp-fd-y-double-prime-3y
site: BCT Engineering
---

# BVP: y'' + 3y' = y + x²

Numerical Method · Chapter 6: Solution of ordinary differential equations

- Asked in: 2075 Baisakh, 5 marks
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/numerical_method/bvp-fd-y-double-prime-3y
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-6

## Question

Solve the BVP: y'' + 3y' = y + x², y(0) = 2, y(2) = 5 at x = 0.5, 1, 1.5 using finite difference method.

## Short answer

Applying central differences with h=0.5 to y''+3y'= y+x^2 yields the system y_{i-1}-9y_i+7y_{i+1}=x_i^2, with boundary y0=2, y4=5. Solving gives y(0.5)≈2.7716, y(1)≈3.3134, y(1.5)≈4.0070.

## Answer

Write y'' = −3y' + y + x² and use central differences y''ᵢ = (yᵢ₋₁ − 2yᵢ + yᵢ₊₁)/h², y'ᵢ = (yᵢ₊₁ − yᵢ₋₁)/(2h).

#### Set up
The required points x = 0.5, 1, 1.5 on [0, 2] give h = 0.5; nodes x₀ = 0, x₁ = 0.5, x₂ = 1, x₃ = 1.5, x₄ = 2, with y₀ = 2, y₄ = 5.

```text
(yᵢ₋₁ − 2yᵢ + yᵢ₊₁)/0.25 + 3(yᵢ₊₁ − yᵢ₋₁)/1 − yᵢ = xᵢ²
(4 − 3)yᵢ₋₁ + (−8 − 1)yᵢ + (4 + 3)yᵢ₊₁ = xᵢ²
   yᵢ₋₁ − 9yᵢ + 7yᵢ₊₁ = xᵢ²
```

#### Equations
```text
i=1 (x=0.5):  2 − 9y₁ + 7y₂ = 0.25   →  −9y₁ + 7y₂         = −1.7500
i=2 (x=1.0):  y₁ − 9y₂ + 7y₃ = 1.00  →   y₁ − 9y₂ + 7y₃    =  1.0000
i=3 (x=1.5):  y₂ − 9y₃ + 7(5) = 2.25 →   y₂ − 9y₃          = −32.7500
```
#### Solution (Gaussian elimination)
```text
y₁ = y(0.5) = 2.7716
y₂ = y(1.0) = 3.3134
y₃ = y(1.5) = 4.0070
```
**Answer: y(0.5) ≈ 2.7716, y(1) ≈ 3.3134, y(1.5) ≈ 4.0070**

## Check yourself

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

1. Equation rearranged as?
   A. y'' = 3y' + y
   B. y'' = y + x
   C. y'' = -3y' + y + x²
   D. y'' = -3y' - y
   Answer: C. Move 3y' across. (Key point: Form)

2. Which h?
   A. 0.25
   B. 1
   C. 2
   D. 0.5
   Answer: D. Points 0.5, 1, 1.5. (Key point: h)

3. Node equation?
   A. y(i-1) - 9yi + 7y(i+1) = xi²
   B. 7y(i-1) - 9yi + y(i+1)
   C. y(i-1)+9yi+7y(i+1)
   D. 4y(i-1)-8yi+4y(i+1)
   Answer: A. (4-3), (-8-1), (4+3). (Key point: Node eq)

4. y4=5 effect?
   A. adds 5
   B. 7×5 moves right: -32.75
   C. unchanged
   D. y3 =5
   Answer: B. 2.25 - 35. (Key point: Last eq)

## Related in Numerical Method

- [BVP: y'' = e^x + 2y' - y](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Abvp-finite-difference-e-x-2y) — Numerical Method, chapter 6, asked 4×
- [BVP: y'' = x + y](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Abvp-finite-difference-x-plus-y) — Numerical Method, chapter 6, asked 4×
- [BVP: xy'' + y = 0](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Abvp-fd-xy-double-prime) — Numerical Method, chapter 6
- [LU factorization: x-3y+10z=3](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Alu-factorization-x-3y-10z) — Numerical Method, chapter 3, asked 2×
- [RK-4: y'' - 3y' + y = sin x](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark4-second-order-ivp-y12) — Numerical Method, chapter 6

## Related in other subjects

- [Solve ODE by Laplace transform y''+3y'+2y=e^(−t)](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y-two) — Mathematics III, chapter 3, asked 18×
- [Solve ODE by Laplace transform y''+4y'+3y=0](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y-four) — Mathematics III, chapter 3, asked 18×
- [Solve ODE by Laplace transform y''+4y'+3y=eᵗ](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y-five) — Mathematics III, chapter 3, asked 16×
- [Solve ODE by Laplace transform y''+2y'−3y=sint](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y) — Mathematics III, chapter 3, asked 14×
