Question 1: Consider the initial-value problem:
y'= 1 + (x -y)2, 2 ≤ x ≤ 3 ; y(2) = 1
Its actual solution is y(x) = x + 1/(1 - x ). Use h = 1/2 and a calculator to get the approximate solution at x = 3 by applying
a. Euler's method
b. RK2
c. Modified Euler method
d. RK4
Then, compare their results with the actual value y(3) = 2.5.
Question 2: Consider the following system of first-order differential equations:
u1' = u2 - u3 + t u1(0) = 1
u2' = 3t2 u2(0) = 1 0 ≤ t ≤1
u3' = u2 + e-t u3(0) = -1
The actual solution is
u1(t) = -t5/20 + t4/4 + t + 2 - e-t
u2(t) = t3 + 1
u3(t) = t4/4 + t - e-t
Use "RK4SYSTEM" to approximate the solution with h = 0.2, 0.1, 0.05, and compare the errors to see if you can conclude that RK4SYSTEM is a fourth-order method for systems of differential equations.