4.mws

4-1Construct this pretty flower:

> plot((1+cos(3*t)+sin(3*t)^2),t=0..2*Pi,coords=polar,axes=none,scaling=constrained);

[Maple Plot]

4-2Construct the line segment joining (cos(t),0) with (0,sin(t)) as t ranges over [0,2Pi].

> m:=[[1,-2],[3,4],[1,2]];

m := [[1, -2], [3, 4], [1, 2]]

> plot(m);

[Maple Plot]

> restart;

> x:=cos(t);

x := cos(t)

> y:=sin(t);

y := sin(t)

> m:=[[x,0],[0,y]];

m := [[cos(t), 0], [0, sin(t)]]

> t:=n*2*Pi/100;

t := 1/50*n*Pi

> plot([m$n=1..100],color=green,scaling=constrained,axes=none);

[Maple Plot]

4-3 Construct the velocity vector field along a constant motion around a circle.

> restart;

> x:=cos(t);

x := cos(t)

> y:=sin(t);

y := sin(t)

> m:=[[x,y],[x-y,y+x]];

m := [[cos(t), sin(t)], [cos(t)-sin(t), sin(t)+cos(...

> t:=n*2*Pi/100;

t := 1/50*n*Pi

> plot([m$n=1..100],color=red,scaling=constrained,axes=none);

[Maple Plot]

> restart;

> x:=cos(t)+cos(2*t);

x := cos(t)+cos(2*t)

> y:=sin(t)+sin(2*t);

y := sin(t)+sin(2*t)

> m:=[[x,y],[x+diff(x,t),y+diff(y,t)]];

m := [[cos(t)+cos(2*t), sin(t)+sin(2*t)], [cos(t)+c...
m := [[cos(t)+cos(2*t), sin(t)+sin(2*t)], [cos(t)+c...

> t:=n*2*Pi/100;

t := 1/50*n*Pi

> plot([m$n=1..100],scaling=constrained,axes=none);

[Maple Plot]

Construct this figure:

> restart;

> x:=cos(t);

x := cos(t)

> y:=sin(t);

y := sin(t)

> m:=[[x,y],[x-t*y,y+t*x]];

m := [[cos(t), sin(t)], [cos(t)-t*sin(t), sin(t)+t*...

> t:=n*2*Pi/100;

t := 1/50*n*Pi

> plot([m$n=1..100],color=brown,scaling=constrained);

[Maple Plot]

4-5 Construct the line segments joining [cos(t),sin(t)] with [cos(2t),sin(2t)] as t ranges over [0,2Pi].

> restart;

> x1:=cos(t);

x1 := cos(t)

> y1:=sin(t);

y1 := sin(t)

> x2:=cos(2*t);

x2 := cos(2*t)

> y2:=sin(2*t);

y2 := sin(2*t)

> m:=[[x1,y1],[x2,y2]];

m := [[cos(t), sin(t)], [cos(2*t), sin(2*t)]]

> t:=n*2*Pi/100;

t := 1/50*n*Pi

> plot([m$n=1..100],color=pink,scaling=constrained);

[Maple Plot]

4-6 Construct this figure

> restart;

> x1:=cos(t);

x1 := cos(t)

> y1:=sin(t);

y1 := sin(t)

> x2:=cos(3*t);

x2 := cos(3*t)

> y2:=sin(3*t);

y2 := sin(3*t)

> m:=[[x1,y1],[x2,y2]];

m := [[cos(t), sin(t)], [cos(3*t), sin(3*t)]]

> t:=n*2*Pi/100;

t := 1/50*n*Pi

> plot([m$n=1..100],color=green,scaling=constrained);

[Maple Plot]

4-7 Construct this graph associated with the logistic equation

x' = ax(1-x) with a=3.7

> restart;

> x:=0.677:

> a:=3.67:

> y:=a*x*(1-x):

> m:=[];

m := []

> for k to 100 do m:=[op(m),[x,x],[x,y]]: x:=y: y:=a*x*(1-x): od:

> plot(m,scaling=constrained,color=brown);

[Maple Plot]

> m:

4-8 Draw 20 concetric circles

> restart;

> c:=[r*cos(t),r*sin(t),t=0..2*Pi];

c := [r*cos(t), r*sin(t), t = 0 .. 2*Pi]

> r:=n*1;

r := n

> plot([c$n=1..20],color=orange,scaling=constrained,axes=none);

[Maple Plot]

4-9 Construct the circles with center at (cos(t),sin(t)) passing through the point (1,0) with t ranging over [0,2Pi]

> restart;

> x:=cos(t);

x := cos(t)

> y:=sin(t);

y := sin(t)

> r:=((x-1)^2+y^2)^(1/2);

r := sqrt((cos(t)-1)^2+sin(t)^2)

> m:=[x+r*sin(k),y+r*cos(k),k=-Pi..Pi];

m := [cos(t)+sqrt((cos(t)-1)^2+sin(t)^2)*sin(k), si...

> t:=n*Pi/50;

t := 1/50*n*Pi

> plot([m$n=1..100],color=pink,scaling=constrained);

[Maple Plot]

4-10 Construct the circles with center at (cos(t),sin(t)) and tangent to the y-axis with t ranging over [0,2Pi]

> restart;

> x:=cos(t);

x := cos(t)

> y:=sin(t);

y := sin(t)

> x1:=1/2*x+1/2*cos(t);

x1 := cos(t)

> y1:=1/2*y-1/2*sin(t);

y1 := 0

> r:=((x-x1)^2+(y-y1)^2)^(1/2);

r := sqrt(sin(t)^2)

> m:=[y+r*sin(s),x+r*cos(s), s=0..2*Pi];

m := [sin(t)+sqrt(sin(t)^2)*sin(s), cos(t)+sqrt(sin...

> t:=n*Pi/50;

t := 1/50*n*Pi

> plot([m$n=1..100],color=brown,axes=none,scaling=constrained);

[Maple Plot]

4-11 Construct the circles with center at (cos(t),sin(t)) and passing through (2cos(t)/3+cos(2t)/3,2sin(t)/3-sin(2t)/3)

with t ranging over [0,2Pi]

> restart;

> x:=cos(t);

x := cos(t)

> y:=sin(t);

y := sin(t)

> x1:=2*x/3+cos(2*t)/3;

x1 := 2/3*cos(t)+1/3*cos(2*t)

> y1:=2*y/3-sin(2*t)/3;

y1 := 2/3*sin(t)-1/3*sin(2*t)

> r:=((x-x1)^2+(y-y1)^2)^(1/2);

r := sqrt((1/3*cos(t)-1/3*cos(2*t))^2+(1/3*sin(t)+1...

> m:=[x+r*sin(k),y+r*cos(k),k=-Pi..Pi];

m := [cos(1/50*n*Pi)+sqrt((1/3*cos(1/50*n*Pi)-1/3*c...
m := [cos(1/50*n*Pi)+sqrt((1/3*cos(1/50*n*Pi)-1/3*c...

> t:=n*Pi/50;

t := 1/50*n*Pi

> plot([m$n=1..100],color=yellow,scaling=constrained);

[Maple Plot]

4-12 Construct the figure

> restart;

> x:=cos(t);

x := cos(t)

> y:=sin(t);

y := sin(t)

> x1:=3/4*x+1/4*cos(3*t);

x1 := 3/4*cos(t)+1/4*cos(3*t)

> y1:=3/4*y-1/4*sin(3*t);

y1 := 3/4*sin(t)-1/4*sin(3*t)

> r:=((x-x1)^2+(y-y1)^2)^(1/2);

r := sqrt((1/4*cos(t)-1/4*cos(3*t))^2+(1/4*sin(t)+1...

> m:=[x+r*sin(k), y+r*cos(k), k=-Pi..Pi];

m := [cos(t)+sqrt((1/4*cos(t)-1/4*cos(3*t))^2+(1/4*...
m := [cos(t)+sqrt((1/4*cos(t)-1/4*cos(3*t))^2+(1/4*...

> t:=n*Pi/50;

t := 1/50*n*Pi

> w:=evalf(m):

> plot([w$n=1..100],color=black,axes=none,scaling=constrained);

[Maple Plot]

4-13

> restart;

> x:=cos(t);

x := cos(t)

> y:=sin(t);

y := sin(t)

> m:=[x+t*sin(k), y+t*cos(k), k=-Pi..Pi];

m := [cos(t)+t*sin(k), sin(t)+t*cos(k), k = -Pi .. ...

> t:=n*Pi/25;

t := 1/25*n*Pi

> w:=evalf(m):

> plot([w$n=1..100],color=blue,scaling=constrained,axes=none);

[Maple Plot]

4-14 Construct the reflections of a light ray inside a square

> restart;

> m:=1.7123;

m := 1.7123

> x:=0:

> y:=0:

> v:=[[x,y]];

v := [[0, 0]]

> for k to 100 do xx:=floor(x)+1:yy:=floor(y)+1: if (yy-y)>m*(xx-x) then x:=xx:y:+m*x else y:=yy:x:=y/m: fi: v:=[op(v),[1-abs(x-2*floor(x/2)-1),1-abs(m*x-2*floor(m*x/2)-1)]] od:

> plot(v,scaling=constrained,color=blue);

[Maple Plot]

>