Eulers Method for a System of ODEs Consider the system of fi
Euler’s Method for a System of ODE’s. Consider the system of first-order ODE’s:
y1 =5y2y1+y3
y2 =3y1y2+t2
y3 =y3ty2.
Write out explicitly the matrix-vector representation of this system
y(t+h) Fy(t)+g.
Clearly define the elements of y, y, F , and g.
Write an algorithm describing how this would be implemented to solve for y(t) given h and y(0).
Implement this algorithm in MATLAB to solve for y(1) given h = 0.1 and y(0) = (0, 0, 0).
Plot the results for y1, y2, and y3 versus time.
Solution
Euler’s Method for a System of ODE’s. Consider the system of first-order ODE’s:
y1 =5y2y1+y3
y2 =3y1y2+t2
y3 =y3ty2.
Write out explicitly the matrix-vector representation of this system
