---
title: "RK-2: y' = 4e^(0.8x) - 0.5y"
subject: "Numerical Method"
chapter: 6
key: "semester_4/numerical_method:rk2-xy-prime"
source: https://www.bctengineer.com/q/semester_4/numerical_method/rk2-xy-prime
site: BCT Engineering
---

# RK-2: y' = 4e^(0.8x) - 0.5y

Numerical Method · Chapter 6: Solution of ordinary differential equations

- Asked in: 2074 Bhadra, 6 marks
- Video: [Runge Kutta Method of Second Order ODE - Part 1 | Engineering Mathematics](https://www.youtube.com/watch?v=cWL1sc2b868) — Mathematics Tutor
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/numerical_method/rk2-xy-prime
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-6

## Question

Solve y' = 4e^(0.8x) - 0.5y; subject to initial condition y(0) = 2, for y(0.5) and y(1.0) using Runge-Kutta 2nd order method.

## Short answer

Using RK2 (Heun) with h=0.5 for y'=4e^(0.8x)-0.5y, y(0)=2: y(0.5)≈3.8043, y(1.0)≈6.3165.

## Answer

Given y' = 4e^(0.8x) − 0.5y, y(0) = 2. Since y is needed at x = 0.5 and 1.0, take h = 0.5 (two steps).

The second-order Runge–Kutta (Heun / modified Euler) formulas are:

```text
k₁ = h·f(xₙ, yₙ)
k₂ = h·f(xₙ + h, yₙ + k₁)
yₙ₊₁ = yₙ + ½(k₁ + k₂)
```


#### First step
```text
k₁ = h·f(x₀, y₀) = 0.5·f(0.0000, 2.0000) = 1.5000
k₂ = h·f(x₀+h, y₀+k₁) = 0.5·f(0.5000, 3.5000) = 2.1086
y₁ = y₀ + (k₁+k₂)/2 = 2.0000 + (1.5000 + 2.1086)/2 = 3.8043
```

#### All steps (h = 0.5)
| step | xₙ | yₙ | k₁ = h·f(xₙ,yₙ) | k₂ = h·f(xₙ+h, yₙ+k₁) | yₙ₊₁ = yₙ + (k₁+k₂)/2 |
|---|---|---|---|---|---|
| 0 | 0.0000 | 2.0000 | 1.5000 | 2.1086 | 3.8043 |
| 1 | 0.5000 | 3.8043 | 2.0326 | 2.9919 | 6.3165 |

**Answer: y(0.5) ≈ 3.8043, y(1) ≈ 6.3165**

For comparison, the exact solution y = (4/1.3)(e^(0.8x) − e^(−0.5x)) + 2e^(−0.5x) gives y(0.5) = 3.7515, y(1.0) = 6.1946.

## Check yourself

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

1. What h is used?
   A. 0.1
   B. 1
   C. 0.5
   D. 0.25
   Answer: C. Two steps reach 1. (Key point: h)

2. k1 at the start?
   A. 4
   B. 0.75
   C. 2
   D. 0.5×(4-1) = 1.5
   Answer: D. f(0,2) = 4 - 1 = 3. (Key point: k1)

3. k2 evaluated at?
   A. (x0+h, y0+k1)
   B. (x0, y0)
   C. (x0+h/2, y0+k1/2)
   D. (x0+h, y0)
   Answer: A. Predicted slope. (Key point: k2)

4. y(0.5)?
   A. 3.5
   B. 3.8043
   C. 3.7515
   D. 2.1086
   Answer: B. 2 + (1.5+2.1086)/2. (Key point: Result)

## Related in Numerical Method

- [Program for RK-4 second order IVP](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark4-program-second-order) — Numerical Method, chapter 6
- [RK-2: y' = sin x + cos y](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark2-sinx-cosy) — Numerical Method, chapter 6
- [Program for RK-4 first order IVP](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark4-program-first-order) — Numerical Method, chapter 6
- [RK-2: y'' = y - x y'](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark2-y-double-prime-y-xy) — Numerical Method, chapter 6, asked 2×
- [RK-2: y' = xy + y²](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark2-xy-y2) — Numerical Method, chapter 6, asked 2×
- [RK-2: simultaneous equations](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark2-simultaneous) — Numerical Method, chapter 6

## Related in other subjects

- [Initial value problem y''+2y'+5y=0](https://www.bctengineer.com/question.md?key=semester_2%2Fmathematics%3Ainitial-value-problem-y-2y) — Mathematics, chapter 4, asked 3×
- [Solve ODE by Laplace transform y''+2y'+5y=e^(−t)sint](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Asolve-ode-by-laplace-transform-y-six) — Mathematics III, chapter 3, asked 2×
- [Duality LPP min:Z=8x+9y](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Aduality-lpp-min-z-8x-9y) — Mathematics III, chapter 5, asked 6×
- [Duality LPP min:Z=8x₁+9x₂](https://www.bctengineer.com/question.md?key=semester_3%2Fmathematics_iii%3Aduality-lpp-min-z-8x-9x) — Mathematics III, chapter 5, asked 4×
