![]() Looking at the graph, we observe that the rabbit population has a vertical intercept at its midline and then decreases. Now we just have to decide if we want to use sine or cosine to model the function. We already found the amplitude, midline and period for \(r(t)\) in part (a). Looking at the graph of the given points, we again see the general shape of a sine or cosine function with amplitude 50 foxes, midline 100 foxes and period 12 months. The number of foxes shows a similar pattern starting at a maximum of 150, reaching a minimum of 50 after 6 months and returning close to the maximum at the end of the year. Even though we don’t have any additional data, it is reasonable to assume that this pattern will repeat itself in the next year, and we are looking at a periodic function with amplitude 500 rabbits, midline 1000 rabbits and period 12 months. Graphing the available points, we see the general shape of a sine or cosine function. The number of rabbits starts at 1000, decreases to a minimum of 500 after 3 months, increases back to 1000 in the next 3 months, reaches a maximum of 1500 after another 3 months and almost decreases to its starting value of 1000 at the end of the year. Looking at the table, we notice a pattern in the number of rabbits and foxes. Different groups might come up with different function formulas, since it is possible to use positive or negative sine or cosine functions with different horizontal shifts for both populations. It lends itself well for students working together in groups and comparing their modeling functions. In that case, students have to decide which data values to use for their model and the modeling function will not be a perfect fit for the data. ![]() Such a scenario is implemented in the task F-TF Foxes and Rabbits 3. A more realistic situation, and a good follow-up task to the current one, would be to present students with data points that do not perfectly fit on a trigonometric graph. ![]() Indeed, for the given data a sine function can be found which perfectly fits the data, a highly unusual state of affairs. The data in the current task has been simplified (it is much too regular to be completely realistic) so that students can come up with a clear workable model. ![]() Note that the verb "model" in the task means to find a function which well approximates the data presented in the table. We are now in a position to actually model the data given previously with trigonometric functions and investigate the behavior of this predator-prey situation. savefig ( 'rabbits_and_foxes_2.The example of rabbits and foxes was introduced in the task ( 8-F Foxes and Rabbits) to illustrate two functions of time given in a table. quiver ( X1, Y1, DX1, DY1, M, pivot = 'mid', cmap = p. title ( 'Trajectories and direction fields' ) Q = p. # Avoid zero division errors DX1 /= M # Normalize each arrows DY1 /= M #- # Drow direction fields, using matplotlib 's quiver function # I choose to plot normalized arrows and to use colors to give information on # the growth speed p. xlim ( xmin = 0 ) nb_points = 20 x = linspace ( 0, xmax, nb_points ) y = linspace ( 0, ymax, nb_points ) X1, Y1 = meshgrid ( x, y ) # create a grid DX1, DY1 = dX_dt () # compute growth rate on the gridt M = ( hypot ( DX1, DY1 )) # Norm of the growth rate M = 1. ylim ( ymin = 0 ) # get axis limits xmax = p. plot ( X, X, lw = 3.5 * v, color = col, label = 'X0=(%.f, %.f)' % ( X0, X0 ) ) #- # define a grid and compute direction at each point ymax = p. odeint ( dX_dt, X0, t ) # we don't need infodict here p. Find the rabbit and fox population as a function of time zip#figure () #- # plot trajectories for v, col in zip ( values, vcolors ): X0 = v * X_f1 # starting point X = integrate. ![]() , len ( values ))) # colors for each trajectory f2 = p. Values = linspace ( 0.3, 0.9, 5 ) # position of X0 between X_f0 and X_f1 vcolors = p. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |