- Asked 2/13
- 2072 Asoj · 6 marks
- 2069 Bhadra · 10 marks
RK-2: y'' + x y' + y = 0
Short answer
Convert to first-order system y'=z, z'=-xz-y. With h=0.1, Heun's method gives y(0.1)=0.9950, y(0.2)=0.9801.
Solve y'' + xy' + y = 0; y(0) = 1, y'(0) = 0 for x = 0(0.1)0.2 using the RK2 method.
Convert the 2nd-order equation to two first-order equations. Let z = y', then
dy/dx = z = f₁(x, y, z)
dz/dx = −x·z − y = f₂(x, y, z)
y(0) = 1, z(0) = 0, h = 0.1
The second-order Runge–Kutta (Heun / modified Euler) formulas are:
k₁ = h·f(xₙ, yₙ)
k₂ = h·f(xₙ + h, yₙ + k₁)
yₙ₊₁ = yₙ + ½(k₁ + k₂)
applied to y and z together: k₁(y) and k₂(y) use f₁, k₁(z) and k₂(z) use f₂, and in k₂ both y and z are advanced by their own k₁ values.
Step 1 (x₀ = 0 → 0.1)
k₁(y) = 0.1·z₀ = 0.1(0) = 0.0000
k₁(z) = 0.1(−0·0 − 1) = -0.1000
k₂(y) = 0.1(z₀ + k₁(z)) = 0.1(0 − 0.1) = -0.0100
k₂(z) = 0.1[−0.1(−0.1) − (1 + 0)] = -0.0990
y₁ = 1 + ½(0 − 0.01) = 0.9950
z₁ = 0 + ½(−0.1 − 0.0990) = -0.0995
Step 2 (x₁ = 0.1 → 0.2)
k₁(y) = 0.1(−0.0995) = -0.0100
k₁(z) = 0.1[−0.1(−0.0995) − 0.995] = -0.0985
k₂(y) = -0.0198, k₂(z) = -0.0945
y₂ = 0.9801, z₂ = -0.1960
Summary table
| step | x | y | z=y' | k₁(y) | k₁(z) | k₂(y) | k₂(z) | yₙ₊₁ | zₙ₊₁ |
|---|---|---|---|---|---|---|---|---|---|
| 0 | 0.0000 | 1.0000 | 0.0000 | 0.0000 | -0.1000 | -0.0100 | -0.0990 | 0.9950 | -0.0995 |
| 1 | 0.1000 | 0.9950 | -0.0995 | -0.0100 | -0.0985 | -0.0198 | -0.0945 | 0.9801 | -0.1960 |
Answer: y(0.1) ≈ 0.9950, y(0.2) ≈ 0.9801 (with y'(0.1) ≈ -0.0995, y'(0.2) ≈ -0.1960). The exact solution y = e^(−x²/2) gives 0.9950 and 0.9802.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- RK-2: y' = xy + y² · Numerical Method, chapter 6 · asked 2×
- Program for RK-4 first order IVP · Numerical Method, chapter 6
- RK-4: (y²-x²)/(y²+x²) · Numerical Method, chapter 6
- RK-4: dy/dx = (1+x²)y · Numerical Method, chapter 6
- RK-2: simultaneous equations · Numerical Method, chapter 6
- RK-2: y'' = y - x y' · Numerical Method, chapter 6 · asked 2×
- Solve x dy/dx + y log y = xy eˣ · Mathematics I, chapter 4 · asked 4×
- Solve xy(p²+2)=2py³+x³ · Mathematics I, chapter 4 · asked 2×
- Solve x²y''−xy'+2y=x log x · Mathematics I, chapter 4 · asked 4×
- Solve x²y''−xy'+y=log x · Mathematics I, chapter 4 · asked 2×