Handleiding Maple 10 Hoofdstuk 2 Grafieken Versie Maple 10
<Text-field style="Heading 1" layout="Heading 1">2.1 Inleiding</Text-field> x^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);
<Text-field style="Heading 1" layout="Heading 1">2.4 De Plot Builder</Text-field> with(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.
<Text-field style="Heading 1" layout="Heading 1"><Font encoding="UTF-8">2.5 Functies van \303\251\303\251n variabele</Font></Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.1 Een enkele grafiek</Text-field> restart; f:=sin(x)*exp(-x/4); plot(f,x=0..10);
<Text-field style="Heading 3" layout="Heading 3"><Font encoding="UTF-8">Voorbeeld 2.2 Meer grafieken in \303\251\303\251n figuur</Font></Text-field> restart;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]);
<Text-field style="Heading 2" layout="Heading 2">2.5.1 De eenheidsstapfunctie (Heaviside)</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.3 Verschillende grafieken met de stapfunctie gemaakt</Text-field> restart; plot([Heaviside(t),1.5*Heaviside(t-1),sin(t)*Heaviside(t-2)],t=-1..5,thickness=2);
<Text-field style="Heading 4" layout="Heading 4">bewerkte grafiek met tekst</Text-field> with(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});
<Text-field style="Heading 2" layout="Heading 2">2.5.2 Functies in stukken</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.4 Piecewise functie (functie in stukken)</Text-field> restart:f:=PIECEWISE([0,x<0],[x^2,x<=1],[1,1<x]); plot(f,x=-1..3); convert(f,Heaviside);
<Text-field style="Heading 2" layout="Heading 2">2.5.3 Absolute waarde-functies</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.5 Grafiek van een functie met absolute waarden</Text-field> restart;f:=abs(x^2-3*x-5); plot(f,x=-4..6); convert(f,piecewise);
<Text-field style="Heading 4" layout="Heading 4">plot met titel</Text-field> plot(f,x=-4..6,color=black,thickness=2,title="absolutewaardefunctie: | f(x) |");
<Text-field style="Heading 1" layout="Heading 1">2.6 Vectorfuncties</Text-field>
<Text-field style="Heading 2" layout="Heading 2">2.6.1 Vlakke krommen</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.6 Parameterkromme in het platte vlak</Text-field> restart; 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]);
<Text-field style="Heading 4" layout="Heading 4">met textplot</Text-field> with(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");
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.8 Animatie van een vlakke kromme</Text-field> restart; x:=1-t^2; y:=2^t; with(plots): animatecurve([x,y,t=-3..3]);
<Text-field style="Heading 2" layout="Heading 2">2.6.2 Ruimtekrommen</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.9 Ruimtekromme</Text-field> restart; 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");
<Text-field style="Heading 1" layout="Heading 1"><Font encoding="UTF-8">2.7 Functies met poolco\303\266dinaten</Font></Text-field>
<Text-field style="Heading 3" layout="Heading 3"><Font encoding="UTF-8">Voorbeeld 2.10 Twee functies in poolco\303\266rdinaten</Font></Text-field> restart; 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);
<Text-field style="Heading 3" layout="Heading 3">script van de figuur met tekst</Text-field> restart; 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);
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.11 Aantal punten waarmee een grafiek wordt opgebouwd</Text-field> restart; 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);
<Text-field style="Heading 3" layout="Heading 3"><Font encoding="UTF-8">Voorbeeld 2.12 Spiraal met poolco\303\266rdinaten</Font></Text-field> restart;interface(warnlevel=0): with(plots): r:=exp(-phi/4): phi:=0.5+2*t; polarplot([r,phi,t=0..10],scaling=constrained);
<Text-field style="Heading 3" layout="Heading 3">script van de figuur met tekst</Text-field> restart;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});
<Text-field style="Heading 3" layout="Heading 3"><Font encoding="UTF-8">Voorbeeld 2.13 Cirkel met poolco\303\266rdinaten</Font></Text-field> restart; with(plots): polarplot([3,phi,phi=0..2*Pi],scaling=constrained);
<Text-field style="Heading 1" layout="Heading 1">2.8 Impliciete functies</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.15 De grafiek van de impliciete functie</Text-field> restart; 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);
<Text-field style="Heading 3" layout="Heading 3">voorbeeld 2.16 Meer punten genereren bij een impliciete functie</Text-field> restart; interface(warnlevel=0):with(plots): C:=1/4*x^2+y^2=2; implicitplot(C,x=-10..10,y=-10..10,scaling=constrained);
<Text-field style="Heading 3" layout="Heading 3">script van figuur met tekst</Text-field> implicitplot(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");
<Text-field style="Heading 1" layout="Heading 1">2.9 Functies van twee variabelen</Text-field> Voorbeeld 2.18 Ruimte-figuur van de functie f(x,y)=x\302\262y tesamen met het 0-niveau restart; 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]);
<Text-field style="Heading 1" layout="Heading 1">2.9.1 contourplot</Text-field>
<Text-field style="Heading 3" layout="Heading 3">voorbeeld 2.19 Het verband tussen contourplot en implicitplot</Text-field> restart; 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]);
<Text-field style="Heading 1" layout="Heading 1">2.9.2 Doorsnijdingen met een vlak</Text-field> Student:-MultivariateCalculus:-CrossSectionTutor();
<Text-field style="Heading 1" layout="Heading 1"><Font encoding="UTF-8">2.10 Verschillende soorten grafieken in \303\251\303\251n figuur</Font></Text-field>
<Text-field style="Heading 3" layout="Heading 3"><Font encoding="UTF-8">Voorbeeld 2.20 Impliciete functie en functie in poolco\303\266rdinaten</Font></Text-field> restart;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");
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.21 Vlakken en lijnen in de ruimte</Text-field> restart; 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]);
<Text-field style="Heading 1" layout="Heading 1">2.11 Asymptoten</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.22 Verticale asymptoot</Text-field> restart; 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");
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.23 Snel commando voor rationale functies</Text-field> restart; 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);
<Text-field style="Heading 3" layout="Heading 3"><Font encoding="UTF-8">Voorbeeld 2.24 Oneindige discontinu\303\257teit bij functie van twee variabelen</Font></Text-field> restart; 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] );
<Text-field style="Heading 1" layout="Heading 1">2.12 Animaties</Text-field>
<Text-field style="Heading 2" layout="Heading 2">2.12.1 Het doorlopen van de grafiek (animatecurve)</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.25 Het doorlopen van de grafiek alsof je de grafiek zelf tekent</Text-field> restart; with(plots): animatecurve((x^2+1)/(x-1),x=-10..10,view=[-10..10,-10..10],style=point);
<Text-field style="Heading 3" layout="Heading 3"><Font encoding="UTF-8">Voorbeeld 2.26 Twee of meer animaties in \303\251\303\251n</Font></Text-field> with(plots): animatecurve({x-x^3,sin(x)},x=0..Pi/2);
<Text-field style="Heading 3" layout="Heading 3"><Font encoding="UTF-8">Voorbeeld 2.27 Meer animaties met verschillende stijlen in \303\251\303\251n</Font></Text-field> restart; 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");
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.28 Het doorlopen van een parameterkromme (grafiek van een vectorfunctie)</Text-field> with(plots):animatecurve([t-t^3,sin(t),t=0..Pi/2],color=black, thickness=2,frames=50);
<Text-field style="Heading 3" layout="Heading 3"><Font encoding="UTF-8">Voorbeeld 2.29 Het doorlopen van een grafiek met poolco\303\266rdinaten</Font></Text-field> with(plots): r:=1-cos(phi); animatecurve([r,phi,phi=0..2*Pi],coords=polar);
<Text-field style="Heading 2" layout="Heading 2">2.12.2 Functies met parameters in een animatie</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.30 Eenvoudig voorbeeld: de amplitude van de sinus</Text-field> restart;with(plots): f:=A*sin(x); animate(plot,[f,x=0..2*Pi],A=1..3);
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.31 Animatie met achtergrond en plot-opties</Text-field> restart;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);
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.32 Animatie in de ruimte</Text-field> restart; 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);
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.33 Frame-parameter in het plot-interval</Text-field> restart; 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);
<Text-field style="Heading 2" layout="Heading 2">2.12.3 Gebruik van display</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.34 De ruimtekromme v wordt doorlopen</Text-field> restart; 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]);
<Text-field style="Heading 2" layout="Heading 2">2.12.4 Animaties met Maplets</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.35 Animatie van de raaklijn aan de grafiek</Text-field> restart; with(Student); with(Calculus1): TangentTutor();
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.36 Een animatie met een ruimtekromme</Text-field> with(Student[VectorCalculus]): SpaceCurveTutor(); ?TangentVector
<Text-field style="Heading 1" layout="Heading 1">2.13 Grafiek met punten, pijlen en tekst</Text-field>
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.37 Punten, pijlen en letters in de figuur</Text-field> restart; 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.
<Text-field style="Heading 3" layout="Heading 3">Voorbeeld 2.38 Grafiek met punten</Text-field> restart; 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});