Maple - Direction Fields

Maple makes it relatively easy to create direction field plots for differential equations. One simply loads the DEtools package, and then uses the dfieldplot command.

First, we define a differential equation, and assign it to a Maple variable. We could just do all this in the dfieldplot command, but this gives us a chance to talk about it.

`de1 := diff(y(t),t)=r*y(t)-h;`
Note that de1 is an expression encompassing the entire differential equation. Observe too that the definition of the DE requires us to note explicitly the independent variable. Finally, pay attention to the difference between the assignment operator := and the plain equation operator =. The := means "Evaluate the right hand side and put it into the variable on the left hand side" while the second means that "symbolically, the expressions on the left and right of this are equal".

If we tried to use the dfieldplot command right now, we would have two problems. First, we have not loaded the DEtools package yet.

`with(DEtools):`
The colon at the end of the line causes the output to be suppressed - saves space on our output. The second problem is that r and h are still symbolic variables, which Maple cannot plot. We need to nail them down.
`r := 0.5; h := 15`

We can now plot the direction field.

`dfieldplot(de1,y,t=0..3,y=0..50);`
This gives the result

It is possible to do direction fields for 2-D autonomous equations as well. Consider the system
x' = y
y' = -x
We can do the direction field for this using the following command.

`dfieldplot([diff(x(t),t)=y(t),diff(y(t),t)=-x(t)],[x,y],t=0..3,x=-3..3,y=-3..3);`
Note the use of brackets to group the system, and to show that there are two dependent variables. The result is below.

This class will run from Monday, 7 June, until Friday, 30 July.

I have started posting homework. It will be due each week on Wednesday, during class. I will usually not post the entire week's homework at once. Check this every day to see what is up. Homework assigned on Tuesdays will not be due until the following week.

The TA for this class is Giang Trinh. He holds office hours from 3:00 to 4:20 every Monday and Friday. Go see him if you have questions about homework grading, or if you cannot make the instructor's hours, or if you just prefer his explanations.

The final exam will take place on Thursday, 29 July, from 6-9 PM in our usual classroom, Wegner G1. Class will be cancelled on Thursday and Friday, 29 and 30 July, to compensate for this special lengthened exam time. The instructor will be present in the classroom at the normal class time on Thursday for an optional help session.

There is a sample final exam posted. The tables you will have available are also posted.

Department of Mathematics, PO Box 643113, Neill Hall 103, Washington State University, Pullman WA 99164-3113, 509-335-3926, Contact Us