Differential equation assignment

Aug 2019
2
0
Australia
Problem 2: Consider the following Initial Value Problem (IVP) where (𝑡) is the dependent function:
𝑦 ′ = 𝑦 − 𝑦 2 + 1.14 cos(𝑒 𝑡/2 ) with 𝑦(0) = 𝑦0 and 𝑡 ≥ 0
Approximate the solution to the IVP using the RK4 method with the following conditions:
Initial condition 𝑦0 = 1;
time steps ℎ = 1 8 , 1 16 , 1 32 , 1 64 ; and time interval 𝑡 ∈ [0,20]
Plot the RK4 approximation for all 4 time steps
Discuss the results of these approximations
 

skipjack

Forum Staff
Dec 2006
21,480
2,470
Is the equation below what you intended?
$y' = y - y^2 + 1.14\cos\left(e^{t/2}\right)$ with $y(0) = y_0$ and $t \geqslant 0$
 

skipjack

Forum Staff
Dec 2006
21,480
2,470
The RK4 method is described here.