---
title: "RK-2: simultaneous equations"
subject: "Numerical Method"
chapter: 6
key: "semester_4/numerical_method:rk2-simultaneous"
source: https://www.bctengineer.com/q/semester_4/numerical_method/rk2-simultaneous
site: BCT Engineering
---

# RK-2: simultaneous equations

Numerical Method · Chapter 6: Solution of ordinary differential equations

- Asked in: 2073 Bhadra, 6 marks
- Video: [RK2 METHOD FOR SIMULTANEOUS DIFFERENTL EQUATION](https://www.youtube.com/watch?v=s7cfIV5ZIzc) — NMO
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_4/numerical_method/rk2-simultaneous
- Whole chapter: https://www.bctengineer.com/md/semester_4/numerical_method/chapter-6

## Question

Solve the following simultaneous differential equations using Runge-Kutta second order method at x = 0.1 and 0.2. dy/dx = xz + 1; dz/dx = -xy with initial conditions y(0) = 0, z(0) = 1

## Short answer

Using second-order Runge-Kutta for systems with h=0.1: k1,h*f, l1=h*g, then k2=h*f(x+h,y+k1,z+l1), l2=h*g(x+h,y+k1,z+l1), update with average. y(0.1)≈0.1050, z(0.1)≈0.9995; y(0.2)≈0.2200, z(0.2)≈0.9968.

## Answer

For the system dy/dx = f(x, y, z) = xz + 1 and dz/dx = g(x, y, z) = −xy with y(0) = 0, z(0) = 1, take h = 0.1 (two steps to x = 0.2). Second-order Runge–Kutta (Heun) for a system:

```text
k₁ = h·f(x, y, z)                 l₁ = h·g(x, y, z)
k₂ = h·f(x+h, y+k₁, z+l₁)         l₂ = h·g(x+h, y+k₁, z+l₁)
yₙ₊₁ = yₙ + (k₁+k₂)/2             zₙ₊₁ = zₙ + (l₁+l₂)/2
```

#### Step 1 (x = 0 → 0.1)
```text
k₁ = 0.1(0·1 + 1)           = 0.1000
l₁ = 0.1(−0·0)              = 0.0000
k₂ = 0.1[0.1(1 + 0) + 1]    = 0.1100
l₂ = 0.1[−0.1(0 + 0.1)]     = -0.0010
y(0.1) = 0 + (0.1000 + 0.1100)/2 = 0.1050
z(0.1) = 1 + (0.0000 − 0.0010)/2 = 0.9995
```
#### Step 2 (x = 0.1 → 0.2)
```text
k₁ = 0.1[0.1(0.9995) + 1]      = 0.1100
l₁ = 0.1[−0.1(0.1050)]         = -0.0011
k₂ = 0.1[0.2(z + l₁) + 1]      = 0.1200
l₂ = 0.1[−0.2(y + k₁)]         = -0.0043
y(0.2) = 0.1050 + (0.1100 + 0.1200)/2 = 0.2200
z(0.2) = 0.9995 + (−0.0011 − 0.0043)/2 = 0.9968
```
#### Table
| step | x | y | z | k₁(y) | k₁(z) | k₂(y) | k₂(z) | yₙ₊₁ | zₙ₊₁ |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0.0000 | 0.0000 | 1.0000 | 0.1000 | 0.0000 | 0.1100 | -0.0010 | 0.1050 | 0.9995 |
| 1 | 0.1000 | 0.1050 | 0.9995 | 0.1100 | -0.0011 | 0.1200 | -0.0043 | 0.2200 | 0.9968 |

**Answer: y(0.1) ≈ 0.1050, z(0.1) ≈ 0.9995; y(0.2) ≈ 0.2200, z(0.2) ≈ 0.9968**

## Check yourself

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

1. How are two equations handled?
   A. Solve y fully first
   B. Ignore z
   C. Compute k and l together from the same point
   D. Use RK4
   Answer: C. Both updated each step. (Key point: System)

2. k2 uses?
   A. (x+h,y,z)
   B. (x,y+k1,z)
   C. (x+h/2,y,z)
   D. (x+h, y+k1, z+l1)
   Answer: D. Heun predictor. (Key point: k2 args)

3. y(0.1)?
   A. 0.1050
   B. 0.1
   C. 0.11
   D. 0.2200
   Answer: A. (0.1+0.11)/2. (Key point: y(0.1))

4. z(0.1)?
   A. 1
   B. 0.9995
   C. 0.999
   D. 0.9968
   Answer: B. 1 - 0.0005. (Key point: z(0.1))

## Related in Numerical Method

- [RK-4: dy/dx = (1+x²)y](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark4-y-1-x2) — Numerical Method, chapter 6
- [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' = xy + y²](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark2-xy-y2) — Numerical Method, chapter 6, asked 2×
- [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' = sin x + cos y](https://www.bctengineer.com/question.md?key=semester_4%2Fnumerical_method%3Ark2-sinx-cosy) — Numerical Method, chapter 6

## Related in other subjects

- [Solve x dy/dx + y log y = xy eˣ](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Ade-x-dy-dx-y-log-y) — Mathematics I, chapter 4, asked 4×
- [Solve (1+y²)+(x−e^(tan⁻¹y))dy/dx=0](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Ade-1-plus-y2-x-minus-e-atan-y) — Mathematics I, chapter 4, asked 6×
- [Solve dy/dx = y/x + tan(y/x)](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Ade-dy-dx-y-over-x-tan) — Mathematics I, chapter 4, asked 6×
- [Solve dy/dx − 2y tan x = y² tan x](https://www.bctengineer.com/question.md?key=semester_1%2Fmathematics_i%3Ade-bernoulli-2y-tan-x) — Mathematics I, chapter 4, asked 6×
