LECTURE 1
10.1 Introduction to differential equations
10.2 Direction fields
The following is a Maple command, and you should ignore it for the moment. It loads
the package that deals with D(ifferential)E(quations).
> with(DEtools):
Example 1.
Next we enter a differential equation. The function diff(x(t),t) should simply be thought of as dx/dt.
> DE := diff(x(t),t)=1:
And here comes its direction field:
> DEplot( DE ,x(t), t=-3..3, x=-3..3, color=BLUE);
We can also draw the graphs of the solutions for some initial value problems.
>
DEplot( diff(x(t),t)=1 , x(t), t=-3..3, x=-3..3,
[[x(0)=0], [x(0)=1], [x(0)=2]], arrows=SMALL,
dirgrid=[30, 30], stepsize=.1,
linecolor=[red,black,green], color=BLUE);
Example 2.
> DE := diff(x(t),t)=x(t):
has direction field as follows:
> DEplot( DE ,x(t), t=-3..3, x=-3..3, color=BLUE);
Again we can plot some solutions.
>
DEplot( diff(x(t),t)=x(t), x(t), t=-3..3, x=-3..3,
[[x(0)=0], [x(0)=1], [x(0)=-2]], arrows=SMALL,
dirgrid=[30, 30], stepsize=.1,
linecolor=[RED,black,green], color=BLUE);
Example 3.
The equation x''+x = 0.
> DE := diff(x(t),t$2)=-x(t):
WARNING! One cannot always draw the direction fields... :O(
But once some initial conditions have been specified, the corresponding solution can be graphed.
> DEplot(DE,x(t),t=-1.5*Pi..1.5*Pi,x=-1.5..1.5, [[x(0)=0,D(x)(0)=1],[x(0)=1,D(x)(0)=0]], linecolour=[red,green], stepsize=.05);
(Big Q: HOW did Maple do the graphs above?)
Exercise 10, p.620.
> DE := diff(y(t),t)=(y(t))^4-6*(y(t))^3+5*(y(t))^2:
> DEplot( DE ,y(t), t=-3..3, y=-.5..5.5, color=BLUE);
>
DEplot( DE , y(t), t=-3..3, y=-.5..5.5, [[y(0)=0],[y(0)=.5],[y(0)=2],[y(0)=1],[y(0)=5]], arrows=SMALL,
dirgrid=[30, 30], stepsize=.01,
linecolor=[black,black,red,red,black], color=BLUE);
In the graph above the black curves represent the critical points of the DE, in other words
the constant solutions. The other two curves are the solutions for the initial values y(0)=.05,
and y(0)=2, respectively.
Maple
TM is a registered trademark of Waterloo Maple Inc.
Math rendered by
WebEQ