Professional Documents
Culture Documents
448 Differential Equations With Maple V
448 Differential Equations With Maple V
we obtain the same solution as that obtained previously using d s o L v e together with the
l a p l a c e option. Note that if we forget to include the l a p l a c e option, the result returned by
d s o I V e is incorrect.
> x:='x':y:='y'·
Gen_Sol:=dsolve(Eqs,{x(t),y(t)},Iaplace);
To graph the solution obtained with d s o l v e for various initial conditions, we first name x{t)
and y{t) the results given in G e n_S o I with a s s i g n and then use s e q to form the list of ordered
pairs, named c _ v a I s, consisting of (f,;) for / = - 1 , 0 , and 1 and j = - 1 , 0 , and 1.
> assign(Gen_Sol):
c_vals:=Cseq(seq(Ci,j],i=-1..1),j=-1-.1)3;
c.vals : = [ [ - 1 , - 1 ] , [0, - 1 ] , [1, - 1 ] , [ - 1 , 0 ] , [0,0], [1,0], [ - 1 , 1 ] , [0,1], [1,1]]
The command
> subs({x(0)=c_valsCkDC1D,y(0)=c_valsCkDC2D>,Cx(t),y(t),
t=-4..43)
substitutes x{0) by the first coordinate of the kth ordered pair in the list c _ v a I s and y(0) by the
second coordinate of the fcth ordered pair in the list c _ v a I s.
We now use a f o r loop to graph the nine solutions obtained by replacing x{0) by the first
coordinate of the fcth ordered pair in the list c _ v a I s and y(0) by the second coordinate of
the /cth ordered pair in the list c _ v a l s for = 1, 2 , . . . , 9 and for --4 < ί < 4. The option
n u m p o i n t s = 2 0 0 in the p l o t command instructs Maple to use 200 sample points when
generating each graph, thus helping to assure that the resulting graphs appear smooth.