Separate variables and find an explicit solution of x′ - t/(1 + x), x(0) = 1.
a) Use ode45 to find the numerical solution of the initial value problem on the interval [0, 3]. Store the solution in the variables t and x_ode45.
b) Use the explicit solution to find exact solution values at each point in the vector t obtained in part a). Store the results in the variable x_exact. Compare the solutions graphically with plot (t, x_exact, t, x_ode45, ‘r.’). Obtain a printout with a legend.
c) For a finer graphical image of the error plot x_exact - x_ode45 versus t in a new figure. Pay special attention to the dimensions on the y-axis.
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.