Skip to main content

RK-4: (y²-x²)/(y²+x²)

Short answer

Using classical RK4 with h=0.2 for dy/dx=(y^2-x^2)/(y^2+x^2), y(0)=1. Step 1: y(0.2)=1.1960; Step 2: y(0.4)=1.3753.

Solve dy/dx = (y² - x²)/(y² + x²) using RK-4 method, for y(0.4). (Given, y(0) = 1, h = 0.2)

Given f(x, y) = (y² − x²)/(y² + x²), y(0) = 1, h = 0.2. To reach y(0.4) two steps are needed.

The classical fourth-order Runge–Kutta formulas are:

k₁ = h·f(xₙ, yₙ)
k₂ = h·f(xₙ + h/2, yₙ + k₁/2)
k₃ = h·f(xₙ + h/2, yₙ + k₂/2)
k₄ = h·f(xₙ + h, yₙ + k₃)
yₙ₊₁ = yₙ + (k₁ + 2k₂ + 2k₃ + k₄)/6

Step 1: x = 0, y = 1.0000

k₁ = 0.2·f(0.0000, 1.0000)                       = 0.2000
k₂ = 0.2·f(0.1000, 1.1000)                       = 0.1967
k₃ = 0.2·f(0.1000, 1.0984)                       = 0.1967
k₄ = 0.2·f(0.2000, 1.1967)                       = 0.1891
y(0.2) = 1.0000 + (0.2000 + 2(0.1967) + 2(0.1967) + 0.1891)/6 = 1.1960

Step 2: x = 0.2, y = 1.1960

k₁ = 0.2·f(0.2000, 1.1960)                       = 0.1891
k₂ = 0.2·f(0.3000, 1.2906)                       = 0.1795
k₃ = 0.2·f(0.3000, 1.2857)                       = 0.1793
k₄ = 0.2·f(0.4000, 1.3753)                       = 0.1688
y(0.4) = 1.1960 + (0.1891 + 2(0.1795) + 2(0.1793) + 0.1688)/6 = 1.3753

Answer: y(0.2) ≈ 1.1960, y(0.4) ≈ 1.3753

✓ Answer checked by Claude Opus 5.5 (high effort)

All Numerical Method chapter 6 questions →