Go to CCP Homepage Go to Materials Page Go to Engineering Mathematics Materials Go to Table of Contents
Go Back One Page Go Forward One Page

Mathematica Tutor

Part 11: Symbolic solution of differential equations

In this part we explore Mathematica's ability to solve the logistic equation

dy/dt = y (1 - y)

and to check the solution. Then we will adapt the solution procedure to an initial value problem with this same differential equation. In the next part, we will relate these algebraic calculations to the geometry of direction fields.

  1. First clear y and give the differential equation a name by entering
    Clear[y];
    DE1 = ( y'[t] == y[t]*(1 - y[t]) )


    Then ask Mathematica to solve the equation for y by entering
    DSolve[DE1, y[t], t]
    Note that Mathematica uses C[1] to represent an arbitrary constant.

  2. Differentiate your solution expression with respect to t to get an explicit expression for dy/dt. The easiest way to do this is to copy the solution of your differential equation and paste it into the right hand side of the function below:
    y[t_]=...
    Now you can can differentiate y[t] and simplify the result by using:
    Simplify[ y'[t] ]

    Then use your solution expression y[t] to find an explicit formula in t for y(1 - y). Is this formula the same as the one for dy/dt? You may want to simplify the output before you try to answer this.

  3. Now we add the initial condition y[0] = 0.1 to determine a single solution of the differential equation. To tell Mathematica to solve the initial value problem, put the two parts of the problem -- the differential equation and the initial condition -- in a list. (Note the use of the double equals sign.) Enter:
    Clear[y];
    DSolve[ { DE1, y[0] == 1/10 }, y[t], t ]

  4. What do you have to do to check the answer from the preceding step? Have you done it already? If not, can you get the checking technique from what you did in Step 2?

  5. Before you move on to the next part, define a function h[t] to be the solution of the initial value problem in Step 3. We will use this function in the next part. Copy and paste your solution into:
    h[t_]= ...

Go to CCP Homepage Go to Materials Page Go to Engineering Mathematics Materials Go to Table of Contents
Go Back One Page Go Forward One Page


modules at math.duke.edu Copyright CCP and the author(s), 1998, 1999, 2000