Delta Banner

Mathematics & Science Learning Center
Computer Laboratory

 

Applications of Differential Equations

Population Dynamics

(continued from last page...)

We need to plug our value of k back into malthus. Since it's already in the form {{k -> 0.0198602}} we almost have what we need, i.e. a replacement rule. The only trouble we have is that it's buried a little too deep within braces, We can strip these away as we learned when we first came up with the [[1,1,2]] trick. Here we actually have an easier scenario. We wish to simply drill into the matrix one level down, so we pull out its first row using the [[1]] command. This leads us to the command:

malthus = malthus /. %[[1]]

Remember, the percent sign always refers to the previous output in Mathematica, in this case the solution we found for k. The [[1]] drills down a level into this solution, removing the unwanted outer braces.)

Let's go see what this produces...


Compass If you're lost, impatient, want an overview of this laboratory assignment, or maybe even all three, you can click on the compass button on the left to go to the table of contents for this laboratory assignment.
 
 

ODE Laboratories: A Sabbatical Project by Christopher A. Barker

©2017 San Joaquin Delta College, 5151 Pacific Ave., Stockton, CA 95207, USA
e-mail:
cbarker@deltacollege.edu