In the previous chapter, we show that direction fields or slope fields are very important features of differential equations because they provide a qualitative behavior of solutions. However, more precise information results from including in the plot some typical solution curves or trajectories.

A plot that shows representative sample of trajectories for a given first order differential equation is called phase portrait.
This section shows how to include sample trajectories into tangent field to obtain a phase portrait for a given differential equation.

We start with a simple equample for autonomous (logistic) equation

\[ \frac{{\text d}y}{{\text d}t} = y\left( 4 - y \right) \qquad \mbox{or} \qquad \dot{y} = y\left( 4 - y \right) . \]
The basic command in Maple to plot a direction field and some solutions is DEplots.
restart
with(DEtools): 
eq := diff(y(t), t) = y(t)*(4 - y(t))
DEplot(eq, y(t), t = -1 .. 1, y = -2 .. 2, inc, [[y(0) = -1], [y(0) = 1], [y(0) = 0.5], [y(0) = -0.5]])
Phase portrait for dy/dt = y(4-y).
You can also change the color in your picture:
restart
DEplot(eq, y(t), t = -1 .. 1, y = -2 .. 2, inc, [[y(0) = -1], [y(0) = 1], [y(0) = 0.5], [y(0) = -0.5]], color = black, linecolor = blue)
Phase portrait for dy/dt = y(4-y).
You can also control the size of arroes:
restart
DEplot(eq, y(t), t = -1 .. 1, y = -2 .. 2, inc, [[y(0) = -1], [y(0) = 1], [y(0) = 0.5], [y(0) = -0.5]], color = black, linecolor = blue, dirgrid = [15, 15])
Phase portrait for dy/dt = y(4-y).
with(DEtools): 
DEplot( diff(y(x),x)=x^2 - y(x), y(x), x=-5..5,  y=-5..5, {[0,4],[0,2],[0,1],[0,0],[0,-1],[0,-2],[0,-4], [-4,-2],[-3,4],[-4,4],[1,4],[2,4],[3,4],[-2,-4],[1,-4],[2,-4],[3,-4]},
dirgrid=[15,15],color = black, linecolor = blue,thickness=2);
Phase portrait for dy/dx = x^2 - y.

Maple has a dedicated command to plot a phase portrait:

with(DEtools): 
phaseportrait(diff(y(t), t) = y(t)*sin(y(t)), y, t = -5 .. 5, [y(0) = 1, y(0) = -1, y(0) = 0, y(0) = 2, y(0) = -2], y = -Pi .. Pi, color = aquamarine, linecolor = blue)
Phase portrait for dy/dt = y*sin(y).
Here we see a pleasant variety of solution curves — all appearing to funnel in on the single quadratic "asymptotic solution" φ(x) = (x-1)² +1 — together with a slope field consisting of a 15-by-15 grid of arrows. We could plot the slope field alone by deleting the initial points. This function φ(x) is called the separatrix for the given differential equation. It is determined from the explicit solution
dsolve(diff(y(x), x) = x^2 - y(x), y(x))
\[ y(x) = x^2 - 2*x + 2 + exp(-x)*{\_{ }}C1 \]
(a*b)/c+13*d \[ {\frac {ab}{c}}+13\,d \]
Two n-by-n matrices A and B are called similar if there exists an invertible n-by-n matrix S such that