Question: please help me in JAVA. THANKS! Let us now consider an application of difference equations in Mathematical Biology: a model for the growth of certain
Let us now consider an application of difference equations in Mathematical Biology: a model for the growth of certain herbivore insects living on a species of plants. Mathematically, it is a system of difference equations for a sequence (xn), representing the population density of the plants (in some unit) in year n, and a sequence (yn), representing the population density of the insects in year n. These sequences are supposed to fulfill the equation system xn+1=eyn+xnxn,yn+1=(xn+1)yn,n0 with parameters (1,),(0,),(0,1) and with initial conditions x0>0,y0>0. (c) In the class HerbivoreModel, write a function solveModel which takes a HerbivoreParameters record and an integer k as its imputs, and computes from these the solution of (4) for n=0,,k1. The function should return the population density of insects in each year, i.e., y0,,yk1, as an array of floating point numbers. In the event of inconsistencies in the parameters, your code should return null
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
