Question: NOTE: Python or MATLAB may be used. Subject: Numerical Methods for Ordinary Differential Equations: Initial Value Problems. 4. Recall the Rabbit (ui(t)) and Fox (uz(t))

NOTE:
Python or MATLAB may be used.
Subject: Numerical Methods for Ordinary Differential Equations: Initial Value Problems.
4. Recall the Rabbit (ui(t)) and Fox (uz(t)) population model: d [ui] [kiui k2u1u2] dt (u2] [k3u1 U2 k4u2] u1(0) = 1000, u2(0) = 500, ki = 3, k2 = 2 x 10-3, kz = 6 x 10-4, k4 = 0.5. (a) Write a PYTHON code to solve the above system using the implicit Trapezoidal method: def trapezoidal(f, eta,1,N,J,TOL, MaxIters): Note that f(tu) is the right-hand side function, n is the vector of initial conditions, T is final time, N is the number of time-steps, and Jit, u) is the Jacobian matrix needed in the Newton solver: 2.6. 2) = .2) = 2 Recall that the Newton's method for the system of equations g(u) = 0 looks like for m =1,2,3,... z(m) = zum-1) - (.(4m-1))) [(y(m-1)). U (b) Use your code to solve the Rabbit-Fox problem. Choose a final time of T = 20 and a time step k and tolerance TOL in order to get a sufficiently resolved solution. Produce a plot of the time-series of ui(t) and u2(t) and a plot of the solution in phase space (i.e., U2 vs. ui)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
