Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Population growth can be modeled via a differential equation of the form (5) where represents the number of individuals in a population as a function

Population growth can be modeled via a differential equation of the form

image text in transcribed (5)

where image text in transcribed represents the number of individuals in a population as a function of time, image text in transcribed represents time, and image text in transcribed is a proportionality constant. Consider a particular population of vertebrates whose population growth can be modeled as follows:

The proportionality constant image text in transcribed is 0.1; the units for image text in transcribed are 1/year.

The initial time (i.e. image text in transcribed) for the population is 0 years.

The final time (i.e. image text in transcribed) for the population is 40 years.

The initial population (i.e. image text in transcribed) is 10 individuals.

Assume that no individuals leave the population during the time interval of interest.

Complete the following:

1. Analytically solve this population growth problem using the techniques of calculus. Note that this first-order ordinary differential equation is separable, so you do not need to make use of any mathematical techniques beyond those you saw in MATH 140 or MATH 141; all you need to do is write Eqtn. 5 in the form image text in transcribed and then integrate both sides. Do not submit any written analysis for this task, though you will use this information for other portions of this problem.

2. Numerically solve this population growth problem using the forward Euler integration technique. Use a time step size of 2 years. Store your derivative term in an anonymous function and use that anonymous function in your forward Euler solution implementation. You may recall that we discussed anonymous functions in Lecture 07.

3. Next, numerically solve this population growth problem using the built-in function ode45. Instead of using a separate programmer-defined function file, however, define your function inside the ode45 function call like such: ode45(@(t,p) your_function, ...) Remember that one of the inputs to ode45 is another function; here, we are merely defining what the function is inside of the ode45 function call instead of listing the name of another function created elsewhere. The programming paradigm of using functions as inputs to other functions is aptly known in computer science as "functional programming."

4. Finally, plot the analytic (i.e. exact) result, the forward Euler solution, and the ode45 solution on the same plot. Include an appropriate title, an appropriate image text in transcribed-label, and an appropriate image text in transcribed-label. Use different line colors and data markers for each line. Include a legend, and programmatically set the legend so it will automatically be out of the way of the data.

Remember that the results from the forward Euler and ode45 numerical solution approaches are approximate. You may reasonably anticipate, therefore, some error between the numerical solutions and the analytic solution. Generally, however, the more rigorous the numerical solution approach is, the better the approximate numerical solution will be. The trade-off between effect required and solution quality is a common theme in many STEM fields.

Hints:

For the forward Euler portion of this problem, note I am asking you to code the algorithm we discussed in slides 15-18 of Lecture 25. In that lecture, I showed you how to perform the operation by hand; now, you will implement the algorithm programmatically.

A sample solution plot follows:

image text in transcribed

P(t) k P(t)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Administrator Limited Edition

Authors: Martif Way

1st Edition

B0CGG89N8Z

More Books

Students also viewed these Databases questions