Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

The population P of a gut bacteria species at time t is described by the differential equation d P d t = k P (

The population P of a gut bacteria species at time t is described by the differential equation
dPdt=kP(rt4+3t4+3t2+1-P)
with initial condition P(0)=104.
(a) Write a MATLAB function BactIVP that takes the values k,r,N and tau as inputs, and outputs the following:
(i) a vector t containing N points from 0 to tau.
(ii) a vector P of numerical solution values that are computed using the RungeKutta fourth-order method and correspond to the entries in the vector t.
(b) Write MATLAB commands that use BactIVP to produce overlaid plots of the numerical solution to the given initial-value problem when k=10-5,r=2,=100 and
(i)N=10
(ii)N=15
(iii)N=25
(iv)N=50.
The plot lines corresponding to N=10,15,25 and 50 should be coloured green, red, black and blue respectively.
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered 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

Students also viewed these Databases questions