1. ## diff. eq.

Hey Guys,
Can you help figure out how to set up excel to solve this, or a way to calculate it by hand?

Calculate the first 3 terms of the RK-2 (improved euler) solution of the differential equation:

y' = y - x when y(1) = 1

n = 0, Xn = 1, Yn = 1, Yn+1 = ?

n = 1, Xn = 1.1, Yn =?, Yn+1 = ?

n = 2, Xn = 1.2, Yn =?, Yn+1 = ?

2. Originally Posted by boousaf
Hey Guys,
Can you help figure out how to set up excel to solve this, or a way to calculate it by hand?

Calculate the first 3 terms of the RK-2 (improved euler) solution of the differential equation:

y' = y - x when y(1) = 1

n = 0, Xn = 1, Yn = 1, Yn+1 = ?

n = 1, Xn = 1.1, Yn =?, Yn+1 = ?

n = 2, Xn = 1.2, Yn =?, Yn+1 = ?
Here you have y'=f(x,y)=y-x

You need to set up the spread sheet with columns:

Code:
   n      x_n       y_n        f(x_n,y_n)     k1_n=h*f(x_n,y_n)    k2_n=f(x_n+h/2,y_n+k_1/2)
0       1         1             0                0                        1+h/2
1   x_{n-1}+h  y_n+k2_{n-1}              ...  etc
After the first row the second column is set equal to the seventh column of the preceeding row.

You put h in some cell away from the table so references to h above are to that cell

RonL

RonL

3. ty kindly!