Example 1: Exponential Decay

> de1:=diff(y(x),x) = 2 - 0.4*y(x);

[Maple Math]

> L:=dfieldplot(de1,y(x),x=0..6,y=0..8,arrows=medium):

> display({L});

[Maple Plot]

> dsolve({de1,y(0)=0},y(x));

[Maple Math]

> y0 := x -> 5.-5.*exp(-.4000000000*x);

[Maple Math]

> dsolve({de1,y(0)=1},y(x));

[Maple Math]

> y1 := x -> 5.-4.*exp(-.4000000000*x);

[Maple Math]

> M0:=plot(y0(x),x=0..6,colour=blue,thickness=3):

> M1:=plot(y1(x),x=0..6,colour=yellow,thickness=3):

> display({L,M0,M1});

[Maple Plot]