# Runge kutta method for solving PDE

1. Apr 4, 2008

### kthouz

Hi!
Am a given a problem like f(x,y,y')= y''= x+y with y(0)=0, y'(0)=1 and h=0.1 and i want to solve it using Ringe Kutta.
As we know y_(n+1)= y_n + h(y'_n+(A_n + B_n + C_n)/3)
And y'_(n+1) = y'_n+(A_n + 2B_n + 2C_n + D_n)/3
x_(n+1)=x_0+(n+1)h
where
k=h/2
A_n=kf(x_n,y_n,y'_n)
$$\beta$$_n= k(y'_n+(1/2)A_n) and so for
B_n=kf(x_n +k,y_n + $$\beta$$_n,y'_n + A_n)
C_n= kf(x_n + k, y_n + $$\beta$$_n, y'_n + B_n)
$$\delta$$_n=h(y'_n + C_n)
D_n=kf(x_n +h, y_n + $$\delta$$_n,y'_n + 2 C_n)
My problem is this:
For that given function(above) we can see that the y'_n ,i.e the third term in the brackets, is useless in the funtion. So i all the calculations the third term will be neglected. First tell me if i am right or not!
I did like that but during the class, the lecturer took the third term into account and add it to both x + y with reasons that only y'_n is zero but the third term will not be always zero because it contains the sums of A_n which is not zero.

File size:
111 KB
Views:
107