Handleiding Maple 10Hoofdstuk 2 GrafiekenVersie Maple 102.1 Inleidingx^2+y^2;Klik met de rechter muis op de formule in de uitvoer, kies dan op Plots en vervolgens op Plot Builder. Er komt dan een applet tevoorschijn waarin de instellingen mogelijk zijn die je wilt. De instellingen worden vertaald naar de volgende inputregel waarna eventueel editen tot de mogelijkheden behoort.plot3d(x^2+y^2, x = -5 .. 5, y = -5 .. 5, axes = boxed, title = "voorbeeld", axis[1] = [mode = linear, color = COLOR(RGB,0,1/5,1)], axis[2] = [mode = linear, color = COLOR(RGB,0,1/5,1)], orientation = [50, 60]);plot3d(x^2+y^2, x = -5 .. 5, y = -5 .. 5, axes = boxed, title = "voorbeeld", axis[1] = [mode = linear, color = COLOR(RGB,0,1/5,1)], axis[2] = [mode = linear, color = COLOR(RGB,0,1/5,1)]);plot3d(x^2+y^2, x = -5 .. 5, y = -5 .. 5, axes = boxed, title = "voorbeeld", axis[1] = [mode = linear, color = COLOR(RGB,0,1/5,1)], axis[2] = [mode = linear, color = COLOR(RGB,0,1/5,1)]);plot3d(x^2+y^2, x = -5 .. 5, y = -5 .. 5);2.4 De Plot Builderwith(plots): Interactive(x^2+y^2);Het commando interactive mag ook met een kleine letter.
Met deze manier om de Plot Builder te bereiken, krijg je alleen de figuur in de uitvoer na Plot en niet de invoerregel voor het script van de figuur maar wel als je op Command klikt.2.5 Functies van \303\251\303\251n variabeleVoorbeeld 2.1 Een enkele grafiekrestart; f:=sin(x)*exp(-x/4); plot(f,x=0..10);Voorbeeld 2.2 Meer grafieken in \303\251\303\251n figuurrestart;f:=sin(x)*exp(-x/4): g:=exp(-x/4); h:=-exp(-x/4);plot({f,g,h},x=0..10);plot([f,g,h],x=0..10,color=[yellow,green,red]);2.5.1 De eenheidsstapfunctie (Heaviside)Voorbeeld 2.3 Verschillende grafieken met de stapfunctie gemaaktrestart; plot([Heaviside(t),1.5*Heaviside(t-1),sin(t)*Heaviside(t-2)],t=-1..5,thickness=2); bewerkte grafiek met tekstwith(plots):p1:=plot([Heaviside(t),1.5*Heaviside(t-1),sin(t)*Heaviside(t-2)],t=-1..5,color=black,linestyle=2): p1a:=plot([Heaviside(t),1.5*Heaviside(t-1),sin(t)*Heaviside(t-2)],t=-1..5,color=black,thickness=2,discont=true):p2:=textplot([2,1.35,"1.5 Heaviside(t-1)"],align={ABOVE,RIGHT}):p3:=textplot([3.38,0.85,"Heaviside(t)"],align={ABOVE,RIGHT}):p4:=textplot([2.9,0.37,"sin(t) Heaviside(t-2)"],align={ABOVE,RIGHT}):display({p1,p1a,p2,p3,p4});2.5.2 Functies in stukkenVoorbeeld 2.4 Piecewise functie (functie in stukken)restart:f:=PIECEWISE([0,x<0],[x^2,x<=1],[1,1<x]);plot(f,x=-1..3);convert(f,Heaviside);2.5.3 Absolute waarde-functiesVoorbeeld 2.5 Grafiek van een functie met absolute waardenrestart;f:=abs(x^2-3*x-5); plot(f,x=-4..6);convert(f,piecewise);plot met titelplot(f,x=-4..6,color=black,thickness=2,title="absolutewaardefunctie: | f(x) |");2.6 Vectorfuncties2.6.1 Vlakke krommenVoorbeeld 2.6 Parameterkromme in het platte vlakrestart; x:=t^3-3*t; y:=t^2-1;plot([x,y,t=-3..3]);plot([[x,y,t=-3..3],[t,t,t=-3..8]],color=black,thickness=[1,2]);met textplotwith(plots):p1:=plot([[x,y,t=-3..3],[t,t,t=-3..8]],color=black,thickness=[1,2]):p2:=plot({[subs(t=3,x),subs(t=3,y)],[subs(t=-1,x),subs(t=-1,y)],[subs(t=0,x),subs(t=0,y)],[subs(t=sqrt(3),x),subs(t=sqrt(3),y)],[subs(t=-3,x),subs(t=-3,y)]},style=point,symbolsize=20,color=black):p3:=textplot({[subs(t=3,x)+1,subs(t=3,y),"t=3"],[subs(t=-3,x)+1,subs(t=-3,y),"t=-3"],[subs(t=-1,x)+1,subs(t=-1,y),"t=-1"],[subs(t=sqrt(3),x)+1,subs(t=sqrt(3),y),"t=sqrt(3) of t=-sqrt(3)"]},align={RIGHT,ABOVE},color=black):p4:=textplot([subs(t=0,x)+1,subs(t=0,y),"t=0"],align={RIGHT,BELOW}):display({p1,p2,p3,p4},title="parameterkromme met parameter t
die loopt van t=-3 tot t=3");Voorbeeld 2.8 Animatie van een vlakke krommerestart; x:=1-t^2; y:=2^t;with(plots): animatecurve([x,y,t=-3..3]);2.6.2 RuimtekrommenVoorbeeld 2.9 Ruimtekrommerestart; interface(warnlevel=0): with(plots):x,y,z:=t^3-3*t,t^2-1,t;spacecurve([x,y,z],t=-3..3,thickness=4,axes=boxed,labels=[X,Y,Z],color=black,orientation=[75,80]);tubeplot([x,y,z],t=-3..3,labels=[X,Y,Z],radius=0.4,axes=boxed,orientation=[75,80],labelfont=[TIMES,BOLDITALIC,12],title="Ruimtekromme");2.7 Functies met poolco\303\266dinatenVoorbeeld 2.10 Twee functies in poolco\303\266rdinatenrestart; interface(warnlevel=0):with(plots):R1 := cos(2*phi); R2:=2*exp(-phi/4);polarplot([R1,phi,phi=0..2*Pi],color=black,scaling=constrained);polarplot([[R1,phi,phi=-Pi/4..Pi/4],[R1,phi,phi=3*Pi/4..5*Pi/4],[r2,phi,phi=0..2*Pi]],color=[red,blue,green],thickness=[1,1,2],scaling=constrained);script van de figuur met tekstrestart; interface(warnlevel=0):with(plots):R1 := cos(2*phi); R2:=2*exp(-phi/4);p1:=polarplot([[R1,phi,phi=-Pi/4..Pi/4],[R1,phi,phi=3*Pi/4..5*Pi/4],[R2,phi,phi=0..2*Pi]],color=[red,blue,green],thickness=[1,1,2],scaling=constrained):p2:=textplot({[1.21,1.21,"R2"],[0.48,0.31,"R1 (deel 1)"],[-0.72,0.34,"R1 (deel 2)"]},align={RIGHT,ABOVE}):display({p1,p2},title="meer polarplot-grafieken in \303\251\303\251n figuur",color=black);Voorbeeld 2.11 Aantal punten waarmee een grafiek wordt opgebouwdrestart; interface(warnlevel=0):with(plots):r:=2*sqrt(2*cos(2*phi)); polarplot([r,phi,phi=0..2*Pi],numpoints=1000, scaling=constrained,style=point);polarplot([r,phi,phi=0..2*Pi], scaling=constrained,style=point);polarplot([r,phi,phi=0..2*Pi], scaling=constrained,style=point,adaptive=false);Voorbeeld 2.12 Spiraal met poolco\303\266rdinatenrestart;interface(warnlevel=0): with(plots):r:=exp(-phi/4): phi:=0.5+2*t;polarplot([r,phi,t=0..10],scaling=constrained);script van de figuur met tekstrestart;interface(warnlevel=0): with(plots):r:=exp(-phi/4); phi:=0.5+2*t;p1:=polarplot([r,phi,t=0..10],scaling=constrained,color=black,thickness=2,title="polaire figuur van r(phi)
waarbij de hoek een functie is van de tijd
en t loopt van 0 tot 10"):
p2:=textplot([0.7,0.4,"t = 0"]):display({p1,p2});Voorbeeld 2.13 Cirkel met poolco\303\266rdinatenrestart; with(plots): polarplot([3,phi,phi=0..2*Pi],scaling=constrained);2.8 Impliciete functiesVoorbeeld 2.15 De grafiek van de impliciete functierestart; with(plots):C:=y^2*(x+1)=x^2-y;smartplot[x, y]( C );implicitplot(C,x=-2..10,y=-4..4,title=" impliciete functie",color=black);voorbeeld 2.16 Meer punten genereren bij een impliciete functierestart; interface(warnlevel=0):with(plots): C:=1/4*x^2+y^2=2;implicitplot(C,x=-10..10,y=-10..10,scaling=constrained);script van figuur met tekstimplicitplot(C,x=-10..10,y=-10..10,scaling=constrained,color=black,thickness=2,
title="Ellips geplot in een te groot interval
zodat deze hoekig wordt");2.9 Functies van twee variabelenVoorbeeld 2.18 Ruimte-figuur van de functie f(x,y)=x\302\262y tesamen met het 0-niveaurestart; f:=x^2*y;plot3d({f,0},x=-10..10,y=-10..10,axes=boxed,title="Ruimtefiguur met nul-niveau",orientation=[30,75]);plot3d(Vector([x,y,f]),x=-10..10,y=-10..10,axes=boxed,title="Ruimtefiguur",orientation=[30,75]);2.9.1 contourplotvoorbeeld 2.19 Het verband tussen contourplot en implicitplotrestart; with(plots):f:=x^2-2*x^2*y+3*y^2;contourplot3d(f,x=-4..4,y=-4..4,axes=boxed,filled=true,coloring=[blue,white],contours=25,orientation=[21,60],labels=[X,Y,Z]);C:=seq(f=10*k,k=1..3);implicitplot({C},x=-4..4,y=-4..4);plot3d(f,x=-4..4,y=-4..4,axes=boxed,style=patchcontour,contours=25, orientation=[21,60],labels=[X,Y,Z]);2.9.2 Doorsnijdingen met een vlakStudent:-MultivariateCalculus:-CrossSectionTutor();2.10 Verschillende soorten grafieken in \303\251\303\251n figuurVoorbeeld 2.20 Impliciete functie en functie in poolco\303\266rdinatenrestart;with(plots):C:=x^3-3*x*y^2=1; r:=6-5*cos(phi);p1:=implicitplot(C,x=-5..5,y=-5..5,thickness=3,color=black,legend="impliciete functie"):p2:=polarplot([r,phi,phi=0..2*Pi],linestyle=4,color=black,legend="functie in poolco\303\266rdinaten"):display({p1,p2},title="Twee verschillende soorten grafieken");Voorbeeld 2.21 Vlakken en lijnen in de ruimterestart; with(plots): f:=5*x-2*y;
y1:=solve(f=0,y); p1:=plot3d(f,x=0..1,y=0..1):
p2:=plot3d(0,x=0..1,y=0..1,color=gray,style=patchnogrid):
p3:=spacecurve([x,y1,0],x=0..1,thickness=5,color=black,
view=[0..1,0..1,-5..5],orientation=[-107,45]):
p4:=textplot3d({[0.25,1,0.5,"snijlijn"]},color=black,font=[TIMES,ITALIC,14]):
display({p1,p2,p3,p4},axes=boxed,labels=[X,Y,Z]);2.11 AsymptotenVoorbeeld 2.22 Verticale asymptootrestart; interface(warnlevel=0): with(plots): f:=(1-2*x)/(x+1);plot(f,x=-3..4,view=[-3..4,-15..15]);plot(f,x=-3..4,y=-15..15,discont=true,title="discontinue functie");p1:=plot(f,x=-3..4,y=-15..15,linestyle=2):p2:=plot(f,x=-3..4,y=-15..15,discont=true,color=black,discont=true, thickness=2):display({p1,p2},title="discontinue functie
met verticale asymptoot");Voorbeeld 2.23 Snel commando voor rationale functiesrestart; interface(warnlevel=0):with(Student): with(Precalculus): with(Calculus1):f:=(3*x^2+2*x-1)/(x+2); RationalFunctionPlot(f,view=[-6..6, -30..30]);with(Calculus1): Asymptotes(f, x);Voorbeeld 2.24 Oneindige discontinu\303\257teit bij functie van twee variabelenrestart; f:=y/(x^2+y^3);plot3d(f,x=0..2,y=0..2,view=[0..2,0..2,0..15],axes=boxed,
orientation=[-125,65] );2.12 Animaties2.12.1 Het doorlopen van de grafiek (animatecurve)Voorbeeld 2.25 Het doorlopen van de grafiek alsof je de grafiek zelf tekentrestart; with(plots):animatecurve((x^2+1)/(x-1),x=-10..10,view=[-10..10,-10..10],style=point);Voorbeeld 2.26 Twee of meer animaties in \303\251\303\251nwith(plots): animatecurve({x-x^3,sin(x)},x=0..Pi/2);Voorbeeld 2.27 Meer animaties met verschillende stijlen in \303\251\303\251nrestart; with(plots):animatecurve({x-x^3,sin(x)},x=0..Pi/2,color=black);p1:=animatecurve( x-x^3, x=0..Pi/2,color=blue,thickness=3 ):p2:=animatecurve(sin(x),x=0..Pi/2,color=red,
thickness=1,labels=["X","Y"]):display({p1,p2},title="twee grafieken die worden doorlopen als x
toeneemt");Voorbeeld 2.28 Het doorlopen van een parameterkromme (grafiek van een vectorfunctie)with(plots):animatecurve([t-t^3,sin(t),t=0..Pi/2],color=black,
thickness=2,frames=50);Voorbeeld 2.29 Het doorlopen van een grafiek met poolco\303\266rdinatenwith(plots): r:=1-cos(phi); animatecurve([r,phi,phi=0..2*Pi],coords=polar);2.12.2 Functies met parameters in een animatieVoorbeeld 2.30 Eenvoudig voorbeeld: de amplitude van de sinusrestart;with(plots): f:=A*sin(x); animate(plot,[f,x=0..2*Pi],A=1..3);Voorbeeld 2.31 Animatie met achtergrond en plot-optiesrestart;with(plots): f:=A*sin(x); animate(plot,[f,x=0..2*Pi],A=1..3);OptiesGrafiek:=color=black,thickness=2,labels=[X,Amplitude],
labeldirections=[horizontal,vertical],
title="Amplitude A van de sinus wordt groter";achtergrond:=plot(sin(x),x=0..2*Pi,linestyle=2,color=red):animate(plot,[A*sin(x),x=0..2*Pi,OptiesGrafiek],A=1..3,background=achtergrond,frames=30);Voorbeeld 2.32 Animatie in de ruimterestart; interface(warnlevel=0):with(plots):
f:=1/((x-t)^2+(y-t)^2+1);PlotOpties:=axes=boxed,orientation=[110,50],style=patchnogrid,
title="Muis onder het kleed";animate(plot3d,[f,x=-5..5,y=-5..5,PlotOpties],t=-5..5);Voorbeeld 2.33 Frame-parameter in het plot-intervalrestart; with(plots): f:=(x^2+1)/(x-1);achtergrond:=plot([1,t,t=-10..10],linestyle=2,color=red):animate(plot,[f,x=-10..A,-10..10,discont=true,thickness=2,color=blue]
,A=-10..10,background=achtergrond);2.12.3 Gebruik van displayVoorbeeld 2.34 De ruimtekromme v wordt doorlopenrestart; interface(warnlevel=0): with(plots):
v:=[2*cos(t),3*sin(2*t),2*t]; N:=20;P:=seq(spacecurve(v,t=0..2*Pi/N*k,thickness=2,title=cat("Het punt is
",convert(evalf[4](subs(t=2*Pi/N*k,v)),string))),k=1..N):display([P],insequence=true,orientation=[-55,75],axes=boxed,labels=[X
,Y,Z]);2.12.4 Animaties met MapletsVoorbeeld 2.35 Animatie van de raaklijn aan de grafiekrestart; with(Student); with(Calculus1):TangentTutor();Voorbeeld 2.36 Een animatie met een ruimtekrommewith(Student[VectorCalculus]):SpaceCurveTutor();?TangentVector2.13 Grafiek met punten, pijlen en tekstVoorbeeld 2.37 Punten, pijlen en letters in de figuurrestart; interface(warnlevel=0): with(plots):a,b,c:=<-2, 1>,<5, 2>,<3, 3>;plaat1:=arrow({a,b,c},shape=arrow,thickness=2,color=green):plaat2:=textplot({[-2,1,A]},align={ABOVE,LEFT},font=[TIMES,BOLDITALIC,14]):plaat3:=textplot({[5,2,B],[3,3,C]},align={ABOVE,RIGHT},font=[TIMES,BOLDITALIC,14]):plaat4:=arrow(a,b,shape=double_arrow,color=blue):display({plaat1,plaat2,plaat3,plaat4},scaling=constrained,title="pijlen");Hier even onderscheid maken tussen A en de andere letters.Let ook op dubbele pijl, en font.Voorbeeld 2.38 Grafiek met puntenrestart; Digits:=4; interface(warnlevel=0):with(plots):punten:=[seq([i/5,evalf(sin(2*Pi*i/5))],i=0..5)];p1:=plot(sin(2*Pi*t),t=0..1,thickness=2): p2:=plot(punten,style=point,symbol=circle,color=black,symbolsize=12):
p3:=plot(punten,color=black,linestyle=2): display({p1,p2,p3});