Backward Euler Method for 2x2 systems

Hi!!!

I want to write a code in Matlab for the Backward Euler Method for 2x2 systems, using the fixed point iteration to find the y^{n+1}.

y1^{n+1}=y1^{n}+h*f(t^{n+1},y1^{n+1},y2^{n+1}) (1)

y2^{n+1}=y2^{n}+h*g(t^{n+1},y1^{n+1},y2^{n+1}) (2)

Could you tell how I use the fixed point iteration??

At (1) the fixed point iteration will calculate y1^{n+1}, y2^{n+1} will be calculated at (2) but it is already used in the equation (1) ... (Worried)

Re: Backward Euler Method for 2x2 systems

The fixed point algorithm should be the same as the one for single equation but the iteration function function will be a 2*1.

w1=y1+h*f(t,y1,y2)

w2=y2+h*g(t,y1,y2)

w=[w1;w2]

the iteration equation then

while y-y_1<tol

y=w

end

the solutions are:

y1=y(1)

y2=y(2)

hope that helps!

Re: Backward Euler Method for 2x2 systems