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.
- 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.
- 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.
- 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 ]
- 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?
- 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_]= ...