CS310 Team Lab #13
Symbolic Solutions to Ordinary Differential Equations
Unit 4: Numeric Computation and ODEs

Getting Started

  1. Open a new worksheet in Maple:
    If you are on the Start page, select the New Worksheet icon; otherwise do
    File → New → Worksheet Mode
  2. Increase the font size (to make it easier for you to see):
    View → Zoom Factor → 125%
  3. Start the worksheet with a restart command:
    Type restart and hit Enter (to reset all variable names before the problem)

PROBLEMS

Problem 1: Salt Water Tank

The first problem to be solved is one from chemical engineering: A tank has an in-flow pipe and an out-flow pipe. The flow rates are such that the level of solution in the tank remains constant. The concentration of solution in the tank starts out at a particular value that is not the steady-state value. A constant concentration of solution is added to the tank. The concentration of solution in the tank changes until it reaches a steady-state concentration.

The following information about this problem is given: tank with salt water coming in and salt water going out at same rate or constant volume

Follow the steps below:

  1. Construct the ODE that describes the change in the amount of salt with respect to time.

    Find the ODE that describes the change in the amount of salt S(t) (lbs) in the tank with respect to time in terms of r and Cin. Note that S(t) is the function that describes the amount of salt in the tank (i.e., pounds of salt in the tank) and not the concentration.

    Hints:

    Show the ODE to one of the lab leaders.

  2. Use Maple to find the steady-state concentration of salt in the tank. Note that this can be done without solving the ODE.

  3. Use Maple to solve the ODE you entered in part 1.a. What is S(t)?

  4. Find and plot a specific solution to this problem.

    What is the function for S(t), if the volume is 150 gallons, the rate of flow is five gallons per minute, the incoming concentration is one-half pound per gallon, the initial concentration in the tank is one-tenth of a pound per gallon. Plot your solution for five hours.

  5. Use Maple to determine how long it takes to for the amount of salt to get half-way to steady-state.

  6. Use Maple to determine how long it takes to for the amount of salt to get 99% of the way to steady-state.

  7. Repeat the above work to find the half-way and within 1% of steady-state times if the initial concentration is nine-tenths of a pound per gallon.

    Be sure to plot the function to help you interpret the problem and get the correct results.

    Show your plot and results from parts 1.d - 1.g to a lab leader.

Problem 2: Jumping Out of an Airplane

Consider a parachutist jumping from an airplane. The forces on the parachutist are the pull of gravity and the drag from the air. To a good approximation the drag is proportional to the velocity of the parachutist. Newton's law thus gives us this system of ordinary differential equations for the speed of the parachutist and the distance the parachutist has fallen:

m*dv(t)/dt = m*g - Cd*v(t)

dy(t)/dt = v(t)

where m is the mass of the parachutist, g is the gravitational acceleration, cD is the drag coefficient, v(t) is the velocity, and y(t) is the distance. For this case, we assume that positive velocity is pointed downward.

  1. Enter the ODEs into Maple. Note: if you want Maple to display cD, type in c__D (two underscores between c and D).

  2. Solve the system of ODEs. First create one set containing the ODEs and the initial conditions, v(0)=v0 and y(0)=y0. Then, use just one dsolve command to solve that set for a set of the two unknown functions, v(t) and y(t).

  3. Suppose the parachutist weights 70 kg, the drag coefficient is 10 kg/s, and the gravitational acceleration is 9.8 m/s2. At time t=0 the velocity is 0 and the distance is 0. Using this information, answer the following questions:

    1. How far will the parachutist fall in 15 seconds?
    2. How fast is the parachutist falling at 15 seconds?
  4. Using the same constants as in part 2.c, plot both y(t) and v(t) for t from 0 to 30 on the same plot figure.

    Show the plot figure and results from part 2.c to a lab leader.

Problem 3: Population Growth

In the module for this week, there was a simple model for population growth. In that model, p(t) is the population at time t and the time rate of change in the population size is proportional to the population size, i.e., dp(t)/dt = α p(t) where α is the growth rate. The solution for this ODE is p(t) = p0eαt where p(0) = p0 is the initial condition. This model assumes that population growth can continue indefinitely, that there are no restrictions on population growth like food shortages, pollution, or limited space.

A more reasonable model for the time rate of change in the population size assumes that there is a maximum population, pmax, that the environment can sustain, also known as the carrying capacity. Under this model, rather than having a constant growth rate, the growth rate is:

a = amax*(1 - p(t)/pmax)

where αmax is the maximum growth rate (i.e., the growth rate if there were no limits on growth). If p(t) << pmax, then the growth rate is essentially αmax. In other words, if the current population is well below the carrying capacity, then growth will occur at nearly the maximum amount possible. As p(t) gets closer and closer to pmax, the growth rate approaches 0.

With this new formulation for the growth rate, the ordinary differential equation describing the population growth becomes:

dp(t)/dt = amax*(1 - p(t)/pmax)*p(t)

where αmax is the maximum growth rate and pmax is the carrying capacity of the environment. Let's now use this model to look at the earth's human population.

  1. Enter the ODE into Maple.

  2. Use Maple to find the steady-state population. Does your answer make sense?

  3. Use Maple to solve the ODE from part 3.a with initial condition p(0) = p0

  4. The population of the world in 1950 was 2.557 billion people. Estimates for the carrying capacity of the earth range from 9 to 16 billion people; for now, let's use pmax=12 billion. Using this information along with αmax=0.027, plot the earth's population for the 100 years from 1950 to 2050.

  5. Using your solution from part 3.d, estimate the population of the earth in 2022. How does your result compare to estimates of the current population? Go to http://www.census.gov/popclock/ and see.

    Show your estimate for the current population to a lab leader.

  6. In part 3.d, we made some assumptions about the values of pmax and αmax. Suppose αmax=0.031. What value would pmax need to be so that the estimated population of the world in 2022 is 7.9 billion people?

ADDITIONAL PROBLEMS or FURTHER READING

The system described in Problem 2 can also be described as a single second-order ODE: since velocity is the derivative of position, the derivative of velocity is the second derivative of position.

  1. Rewrite the system of ODEs as a single second-order ODE and enter it into Maple. Recall that second-order derivatives are entered as diff(y(t), t$2)

  2. Solve the second-order ODE. First create a set containing the second-order ODE and the two initial conditions (one for y and one for dy/dt). To specify an initial condition for dy/dt in Maple, you'll need to use the syntax D(y)(0) = v0. Then, use dsolve to solve that set for the unknown function y(t). Did you get the same answer for y(t) as you did in Problem 2, part b?

  3. Notice that the solution for the second-order ODE is just the solution for y(t), whereas in Problem 2 we also found a solution for v(t). How can you find the velocity, v(t)? Does it match what you got in Problem 2, part b?