Question: Solve With Matlab Bacteria population: boundary value problem # 2 Consider the following differential equation used to help determine population for a bacteria over time:
Solve With Matlab
Bacteria population: boundary value problem #
Consider the following differential equation used to help determine population for a bacteria over time:
dPdtdPdtsqrtP
where t is time in days and P is population in hundred thousands. The population on day is hundred thousand. On day the population is hundred thousand. Solve the boundary value
problem
A Solve the problem with the shooting method. Use fprintf statement to display the calculated guess for the initial condition eg Calculated Pdots and the calculated value for P at the end point
eg Calculated Pdots
B Solve the problem using the finite difference approach with Delta x and a magnitude percent relative approximate error tolerance of For your initial guess values make all your y points
linearly distributed between the boundary points. Display your x and y values formatted like the table below:
Sample output
t in days P in s
xx xxxxxx
C Plot both solutions on the same axes and use a legend to distinguish data. Use a solid blue line for the shooting method and red stars for the finite difference solution. Turn the grid on Don't forget
units.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
