import numpy as np from scipy.integrate import odeint import matplotlib.pyplot as plt # function that returns dy/dt def model(y,t): # u steps from 0 to 2 at t=10 if t<10.0: u = 0 else: u = 2 dydt = (-y + u)/5.0 return dydt # initial condition y0 = 1…