# Differential equation assignment

#### KIPKORIR

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
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$

#### DarnItJimImAnEngineer

Runge-Kutta is pretty cut and dry. What part are you having trouble with, exactly?

yes,I meant it

#### skipjack

Forum Staff
The RK4 method is described here.