جلسه ی هشتم آموزش میپل رسم توابع و اشکال دو بعدی |
|||
بازگشت به فهرست دروس آموزش میپل | سوالاتتان را درباره ی مطالب این جلسه در این جا مطرح فرمایید. |
> |
> |
> | plot(sin(x),x=-2*Pi..2*Pi); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( x*sin(3*x), x=0..2*Pi ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( x*sin(1/x), x=-1..1 ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( x*sin(1/x), x=-1..1,axes=normal); |
> | plot( x*sin(1/x), x=-1..1,axes=frame); |
> | plot( x*sin(1/x), x=-1..1,axes=box); |
> | plot( x*sin(1/x), x=-1..1,axes=none); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(x^5-x^3+2*x-1, x=-3..3); |
> | plot( x^5-x^3+2*x-1, x=-3..3,y=-20..20); |
> |
----------------------------------------------------------------------------------------------------------
> | f:=x->7*sin(x)+sin(7*x); |
> | plot(f(x),x=0..10); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(f(x),x=0..2,y=4..8); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(sin(x)/x,x=0..infinity); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(-4.9*t^2+44.1, t=0..3,labels=["time","volume"]); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( -4.9*t^2+44.1, t=0..3, labels=["time","volume"], labeldirections=[horizontal,vertical] ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( -4.9*t^2+44.1, t=0..3, labels=["time","volume"], labeldirections=[vertical,vertical] ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(-4.9*t^2+44.1,t=0..3,labels=["",""]); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( x^3-x^2-3*x+4, x=-3..3); |
> | plot( x^3-x^2-3*x+4, x=-3..3, xtickmarks=[-2,-1,0,1,2] ); |
> |
> | plot( x^3-x^2-3*x+4, x=-3..3, ytickmarks=[4] ); |
> | plot( x^3-x^2-3*x+4, x=-3..3, xtickmarks=[-2,-1,0,1,2],ytickmarks=[4] ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( cos(x), x=-Pi..2*Pi,y=-2..2, xtickmarks=[-Pi/2="a", Pi/2="b", Pi="c",3*Pi/2="d",2*Pi="e"], ytickmarks=[-1,1,0],labels=["",""] ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( cos(x), x=-Pi..2*Pi,y=-2..2, xtickmarks=[-Pi/2="a", Pi/2="b", Pi="g",3*Pi/2="l",2*Pi="e"], ytickmarks=[-1,1],axesfont=[SYMBOL,20], labels=["",""] ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( sin(x), x=0..2*Pi, xtickmarks=[Pi/2="p/2", Pi="p", 3*Pi/2="3p/2", 2*Pi="2p"], ytickmarks=[-1,1], axesfont=[SYMBOL,20], labels=["",""] ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(x*cos(x), x=-2*Pi..2*Pi, tickmarks=[[-Pi/2,Pi/2], [-6,-2,0,2,6]]); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(x*cos(x), x=-2..10, tickmarks=[default, [-6="A", -2="B", 2="C", 6="D"]]); |
> | plot(x*cos(x), x=-2..10, tickmarks=[[-Pi/2="A", Pi/2="B",3*Pi/2="C"],default]); |
> |
----------------------------------------------------------------------------------------------------------
> | ?plot,tickmarks |
> |
Ex.1
> |
> | plot([t^2,t^3,t=-1..1]); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([t^2,t^3],t=-1..1); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([cos(3*t),sin(5*t),t=0..2*Pi]); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( [cos(t)^3, sin(t)^3, t=-Pi..Pi] ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([cos(t),sin(t),t=0..2*Pi]); |
> | plot([cos(t),sin(t),t=0..2*Pi],scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(exp(x),x=0..3); |
> | plot(exp(x),x=0..3,scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> |
----------------------------------------------------------------------------------------------------------
> | plot([(t^2-1)/(t^2+1), 2*t/(t^2+1), t=-infinity..infinity]); |
> |
Ex. 2
> |
> |
> | with(plots); |
> |
> | with(plots): polarplot(1,theta=0..2*Pi); |
> | polarplot(1,theta=0..2*Pi,scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | polarplot(sin(3*theta),theta=0..2*Pi); |
> | polarplot(sin(3*theta),theta=0..2*Pi,scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | polarplot(sin(6*theta),theta=0..2*Pi); |
> | polarplot(sin(6*theta),theta=0..2*Pi,scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | polarplot(theta,theta=0..4*Pi); |
> | polarplot(theta,theta=0..40*Pi); |
> | polarplot(theta,theta=0..40*Pi,scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | polarplot(sin(8*theta/7),theta=0..14*Pi,scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | polarplot(sin(8*theta/7)+cos(50*theta/7),theta=0..14*Pi,scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | polarplot(exp(sin(theta))-2*cos(4*theta)+(sin(theta/12))^5,theta=0..24*Pi, scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | polarplot([s^2,sin(6*s),s=0..7]); |
> |
----------------------------------------------------------------------------------------------------------
> | polarplot([sqrt(1/s),-sqrt(1/s)], s=0..10*Pi,view=[-3..3,-2..2],scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([1,t,t=0..2*Pi],coords=polar); |
> |
Ex. 3
> |
> |
> | plot(floor(x),x=-2..2,y=-2..2); |
> | plot(floor(x),x=-2..2,y=-2..2,discont=true); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(tan(x),x=-2*Pi..2*Pi,y=-4..4); |
> | plot(tan(x),x=-2*Pi..2*Pi,y=-4..4,discont=true); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(tan(x),x=-2*Pi..2*Pi,y=-4..4,title="Plot of tan(x) and 135111"); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([x^2,x^4,x^6,x^8],x=-2..2,y=0..4,scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([[cos(t),sin(t),t=0..2*Pi],[t^2,t^3,t=-1..1],[-t^2,-t^3,t=-1..1]],scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([[2*cos(s), sin(s), s=0..2*Pi], [cos(t), sin(t), t=0..2*Pi]], scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | g:=x->cos(x): plot([g(x),-g(x),[cos(t),sin(t),t=0..2*Pi]],x=-Pi..Pi,y=-1..1,scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | r1:=t->1: r2:=t->cos(5*t): plot([r1(t),r2(t)],t=0..2*Pi,coords=polar); |
> |
----------------------------------------------------------------------------------------------------------
> |
> | with(Student[Calculus1]): InversePlot(exp(x), -2..2); |
> |
----------------------------------------------------------------------------------------------------------
> | with(Student[Calculus1]): InversePlot(x^2 + 1, x=-1..1,thickness=2); |
> |
----------------------------------------------------------------------------------------------------------
> | with(Student[Calculus1]): InversePlot(x^2 + 1, x=-1..1,showline=false); |
> |
----------------------------------------------------------------------------------------------------------
> | with(Student[Calculus1]): InversePlot(x^2 + 1, x=-1..1,thickness=2,showline=false); |
> |
----------------------------------------------------------------------------------------------------------
> | with(Student[Calculus1]): InversePlot(x^2 + 1, x=-1..1, functionoptions=[thickness=3,color=black], inverseoptions=[thickness=2,color=blue], lineoptions=[thickness=1,color=khaki,linestyle=1]); |
> |
----------------------------------------------------------------------------------------------------------
> | with(Student[Calculus1]): InversePlot(sin(x) + x, functionoptions=[thickness=2], inverseoptions=[color=blue], showline=false); |
> |
Ex. 4
> |
Ex. 5
> |
Ex. 6
> |
> |
> | l:=[[-4,16],[-3,9],[-2,4],[-1,1],[0,0],[1,1],[2,4],[3,9],[4,16]]; |
> | plot(l); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(l,style=point); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([[1,0],[0,1],[-1,0],[0,-1],[1,0]]); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([[1,0],[-1,0],[0,1],[0,-1],[1,0]]); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([[1,0],[-1,0],[0,1],[0,-1],[1,0]],axes=none); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([[0,0],[1/2,0],[1/2,1/2],[-1/2,1/2],[-1/2,-1/2],[1,-1/2],[1,1],[-1,1],[-1,-1],[1.5,-1],[1.5,1.5],[-2,1.5]]); |
> |
----------------------------------------------------------------------------------------------------------
> | f := x -> x^2 + x: plot( [[1,f(1)],[2,f(2)],[3,f(3)],[4,f(4)]], x=0..5, style=point ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( {[1,2]}, style=point ); |
> |
Note: parametric form
> | plot( [1,2], style=point ); |
> |
----------------------------------------------------------------------------------------------------------
> | plot( sin(x), style=point,symbol=circle ); |
> | plot( sin(x), style=point,symbol=cross ); |
> | plot( sin(x), style=point,symbol=box ); |
> |
----------------------------------------------------------------------------------------------------------
> | #linestyle=solid, dot, dash, dashdot, longdash, spacedash, spacedot |
> | plot( sin(x) + cos(x), x=-2*Pi..2*Pi, linestyle=dashdot ); |
> | plot(sin(x)+cos(x),x=-2*Pi..2*Pi,linestyle=dash); |
> | plot(sin(x)+cos(x),x=-2*Pi..2*Pi,linestyle=5); |
> |
----------------------------------------------------------------------------------------------------------
> | plot(floor(x),x=-2..2,y=-2..2,discont=true,color=blue,thickness=6); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([sin(x),cos(x)],x=0..2*Pi,y=-1..1,color=black,thickness=3); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([sin(x),cos(x),1,-1],x=-2*Pi..2*Pi,y=-2..2,color=[black,red,blue,blue],thickness=[3,2,1,1]); |
> |
----------------------------------------------------------------------------------------------------------
> | plot([x,[t,t^3,t=-1.2..1.2],[t^3,t,t=-1.2..1.2]],x=-1.9..1.9,color=[black,red,blue],thickness=[1,2,2]); |
> |
----------------------------------------------------------------------------------------------------------
> | ?plot,colornames |
> | [aquamarine,black,blue,navy,coral,cyan, brown,gold,green,gray,grey,khaki,magenta,maroon,orange,pink,plum,red, sienna,tan,turquoise,violet,wheat,white,yellow]; |
> |
> | plot([x+1,x+2,x+3,x+4,x+5,x+6,x+7,x+8,x+9,x+10,x+11,x+12,x+13,x+14,x+15,x+16,x+17,x+18,x+19,x+20,x+21,x+22,x+23,x+24,x+25], x=0..12, color=[aquamarine,black,blue,navy,coral,cyan,brown,gold,green,gray,grey,khaki,magenta,maroon,orange,pink,plum,red,sienna,tan,turquoise,violet,wheat,white,yellow],thickness=3); |
> |
----------------------------------------------------------------------------------------------------------
> | with(plots): p1:=plot(sin(x),x=0..2*Pi,y=-1..1,linestyle=4,color=black,thickness=2): p2:=plot(cos(x),x=0..2*Pi,y=-1..1,linestyle=3,color=blue,thickness=3): display(p1,p2); |
> |
----------------------------------------------------------------------------------------------------------
> | with(plots): Curve1:=plot(arctan(x),x=-5..5): Curve2:=plot(1/(1+x^2),x=-5..5,linestyle=dot ): display( Curve1, Curve2 ); |
> |
> | with(plots): F:=plot(sin(x), x=-Pi/2..Pi/2, y=-1..1,color=blue): G:=plot(arcsin(x), x=-1..1, y=-Pi/2..Pi/2,color=red): H:=plot(x,view=[-2..2,-2..2],linestyle=3,color=black): display({F,G,H},title=`Sin and Arcsin`); |
> |
> |
> |
> | with(plots): |
> | implicitplot(y=sin(x),x=0..2*Pi,y=-1..1); |
> | implicitplot(x^2+y^2=1,x=-1..1, y=-1..1); |
> | implicitplot(x^2+2*y^2=1,x=-1..1, y=-1..1,scaling=constrained); |
> |
----------------------------------------------------------------------------------------------------------
> | implicitplot([x^2-y^2=1, y=x,y=-x], x=-4..4, y=-4..4, color=[blue, red,red],linestyle=[1,3,3],thickness=[2,0,0]); |
> |
----------------------------------------------------------------------------------------------------------
> | implicitplot(x^3+y^3=1,x=-2..2, y=-3..3, color=blue); |
> | implicitplot(x^5+y^5=1,x=-2..2, y=-2..2, color=blue); |
> | implicitplot(x^4+y^4=1,x=-2..2, y=-2..2, color=blue); |
> | implicitplot(x^6+y^6=1,x=-1..1, y=-1..1, color=blue); |
> |
----------------------------------------------------------------------------------------------------------
> | with(plots): implicitplot(y^2=(x+4)*(x^2+1),x=-4..4, y=-8..8, color=blue,scaling=constrained); |
> | implicitplot(y^2=(x+5)*(x^2-1),x=-7..7, y=-8..8, color=blue,scaling=constrained); |
> |
Ex. 7
> |
Ex. 8
> |
Ex. 9
> |
Ex. 10
> |
> |
> | with(plots): inequal( [ x+2*y>=-1, 3*x-y<2], x=-3..3, y=-3..3, optionsfeasible=(color=red), optionsexcluded=(color=yellow) ); |
> |
----------------------------------------------------------------------------------------------------------
> | with(plots): inequal( [ x+2*y>=-1, 3*x-y<2], x=-3..3, y=-3..3); |
> | with(plots): inequal( [ x+2*y>=-1, 3*x-y<2], x=-3..3, y=-3..3, optionsfeasible=(color=red)); |
> | with(plots): inequal( [ x+2*y>=-1, 3*x-y<2], x=-3..3, y=-3..3, optionsexcluded=(color=yellow) ); |
> |
----------------------------------------------------------------------------------------------------------
> | with( plots ): inequal( [ x+2*y>-1, 3*x-y<2], x=-3..3, y=-3..3, optionsfeasible=(color=red), optionsexcluded=(color=yellow), optionsopen=(color=blue,thickness=2,linestyle=3) ); |
> |
----------------------------------------------------------------------------------------------------------
> | with( plots ): inequal( [x<1,x>-1,y<1,y>-1] ,x=-6/5..6/5,y=-6/5..6/5,tickmarks=[[],[0]], optionsfeasible=(color="AntiqueWhite"), optionsexcluded=(color=white), optionsopen=(color=blue,thickness=2,linestyle=3)); |
> | with( plots ): a:=implicitplot([x^2-y^2=1, y=x,y=-x], x=-4..4, y=-4..4, color=[blue, red,red],linestyle=[1,3,3],thickness=[2,0,0]): b:=inequal( [x<1,x>-1,y<1,y>-1] ,x=-1..1,y=-1..1,tickmarks=[[],[0]], optionsfeasible=(color="AntiqueWhite"), optionsexcluded=(color=white), optionsopen=(color=blue,thickness=2,linestyle=3)): display(a,b); |
> |
Ex. 11
> |
> | with( plots ): arrow( [1,2]); |
----------------------------------------------------------------------------------------------------------
> | arrow( [1,2], shape=arrow , thickness=2, view=[-3..3,-3..3] ); |
----------------------------------------------------------------------------------------------------------
> | arrow( [[1,2],[-1,1]], shape=arrow , thickness=2, view=[-3..3,-3..3] ); |
----------------------------------------------------------------------------------------------------------
> | arrow( [1,2], shape=arrow , thickness=3,linestyle=3,color=blue ,view=[-3..3,-3..3] ); |
----------------------------------------------------------------------------------------------------------
> | arrow( [1,2], shape=harpoon, thickness=2, view=[-3..3,-3..3] ); |
----------------------------------------------------------------------------------------------------------
> | arrow( [1,2], shape=double_arrow , thickness=2, view=[-3..3,-3..3] ); |
----------------------------------------------------------------------------------------------------------
> | with( plots ): a:=arrow( [1,2], [3,1],shape=arrow,linestyle=3,thickness=3, view=[-4..4,-4..4] ): b:=arrow( [3,1],shape=arrow,view=[-4..4,-4..4] ): display(a,b); |
> |
Ex. 12
> |
More Ex.
My Weblog
سوالاتتان را درباره ی مطالب این جلسه در این جا مطرح فرمایید. |