Solving systems of differential equations
In the last lecture, we discussed the following question:
For some interval I C R, find a function g: I - R such that
for some known function f I X y(I) R.
We also retalised that we cannot solve all differential equations on paper.
We can also consider sysfems of differential equations, such as the following initial value problems of two
differential equations. For some interval [a, 5] C R, find functions 01.82 [a,b] - R such that
for some known functions fi and f2. together with the initial conditions gi(a) = d1 and g2(a) = d2.
For instance, we can have the following example.
Example 1 Let a = 0, 5 = 1 and consider the system
with gn(0) = 1 and g2(0) = 0.
Upon defining the vector function F: R³ -IR with = and y =
we can write the initial value problem (1) as
y'(x)=F(x,y) = y(a) =(d1,d2² =
with the notation y' (x) meaning
Problem 1 We would like to approzimate the solution to the above system. De-rive a generalisation of the
foraward Euler method for one equation to this case of a sgstem of fao equations.
Problem 2 Wrife an algorithm for the foratard Euler method you derived for the system above.
Problem 3 Write a MATLAB" function on paper implementing the vector func-tion F for Example 1.
Problem 4 During the class, write a MATLABR programme on paper, implementing the foraward Euler
method you derived above for the initial value problem of Ezample 1. After the class, import the MATLABR
programme you wrofe, correct it (if there are any mistakes) and run it for 10, 20, 50, 100 subinteroals. Plot
the graphs of the approximations of y an 1/2 against 2, for 100 subinterzals on the same plof. Exfend the
interval of Ezample 1 from [O, 1] to [0, 5]. Run the programme for a suitable number of subinfervols to
achieve similar accuracy to the plot above.
This material may consist of step-by-step explanations on how to solve a problem or examples of proper writing, including the use of citations, references, bibliographies, and formatting. This material is made available for the sole purpose of studying and learning - misuse is strictly forbidden.