Escolar Documentos
Profissional Documentos
Cultura Documentos
Aferramentadescriptivecontmumconjuntodefunesparatrabalhardeestatsticadescritivaecorrespondenteesboosgrficos
> kill(all)load(descriptive)$
(%o0) done
VermanualdoMaximahttp://maxima.sourceforge.net/docs/manual/pt/maxima_44.html#SEC173
> mean([a,b,c])
c + b + a
(%o2)
3
> matrix([a,b],[c,d],[e,f])mean(%)
a b
(%o3) c d
e f
e + c + a f + d + b
(%o4) [ , ]
3 3
>
> L:makelist(random(6)+1,k,1,200)
(%o5) [3, 1, 3, 6, 5, 2, 6, 6, 1, 2, 2, 6, 1, 1, 6, 1, 4, 5, 2, 5, 6, 2, 6, 2, 1, 3, 5, 4, 5, 6, 1, 4, 2, 3, 1, 2, 2, 6, 2, 1, 1, 1, 6, 1, 6, 1, 4, 5, 2, 3, 5, 6,
discrete_freq(list)Contaasfrequnciasabsolutasemamostrasdiscretas,emamostrasnumricaseemamostrasdivididasem
categorias.Seunicoargumentoumalista,
> discrete_freq(L)
> L:makelist(random(6)+1,k,1,3000)$
> discrete_freq(L)
> mean(L)var1(L)
2633
(%o9)
750
3319372
(%o10)
1124625
> mini(L)
(%o11) 1
> maxi(L)
(%o12) 6
> histogram(L)
> barsplot(L)
Figure2:C:\Users\fsmoreir\Documents\MyDropbox\Clculoemcomputadores\temp\aula0602\barsplot_014.jpg
2Sistemasdinmicos
Apackage"dynamocs,permiteestudarpropriedadesassintticasdefunes,quefazpartedareadesistemasdinmicos
http://maxima.sourceforge.net/docs/manual/pt/maxima_47.html#SEC185
> load(dynamics)
> load(draw)
> f(x):=12*x^2
2
(%o17) f (x) := 1 2 x
> wxdraw2d(dimensions=[500,500],
proportional_axes=xy,
explicit(x,x,1,1),
axis_top=false,axis_bottom=false,
axis_left=false,axis_right=false,
grid=true,
xaxis=true,
xaxis_type=solid,
xaxis_width=1,
xaxis_color=black,
xtics_axis=true,
yaxis=true,
yaxis_width=1,
yaxis_type=solid,
yaxis_color=black,
ytics_axis=true,
line_width=2,
explicit(f(x),x,1,1),
color=red,
explicit(f(f(x)),x,1,1)
)
(%t18)
(%o18)
> wxdraw2d(dimensions=[500,500],
proportional_axes=xy,
explicit(x,x,1,1),
axis_top=false,axis_bottom=false,
axis_left=false,axis_right=false,
grid=true,
xaxis=true,
xaxis_type=solid,
xaxis_width=1,
xaxis_color=black,
xtics_axis=true,
yaxis=true,
yaxis_width=1,
yaxis_type=solid,
yaxis_color=black,
ytics_axis=true,
line_width=2,
explicit(f(x),x,1,1),
color=red,
explicit(f(f(x)),x,1,1),
color=green,
explicit(f(f(f(x))),x,1,1)
)
(%t19)
(%o19)
> to_poly_solve([f(x)=x],[x])
1
(%o20) %union ([x = 1], [x = ])
2
> to_poly_solve([f(f(x))=x],[x])
1 5 1 5 + 1
(%o21) %union ([x = 1], [x = ], [x = ], [x = ])
2 4 4
evolutionpermitenosvisualizaraevoluodasequnciax_n=f^n(x_0)
> x0:1/2$
evolution(f(x),x0,15,[y,1,1])
(%o23)
Figure3:C:\Users\fsmoreir\Documents\MyDropbox\Clculoemcomputadores\temp\aula0602\evolution_o22.jpg
> x0:(sqrt(5)1)/4$
evolution(f(x),x0,15,[y,1,1])
(%o25)
Figure4:C:\Users\fsmoreir\Documents\MyDropbox\Clculoemcomputadores\temp\aula0602\evolution_o24.jpg
> x0:0.1$
evolution(f(x),x0,250,[y,1,1])
(%o27)
Figure5:C:\Users\fsmoreir\Documents\MyDropbox\Clculoemcomputadores\temp\aula0602\evolution_o26.jpg
Podemostambmutilizarstaircase
> x0:(sqrt(5)1)/4$
staircase(f(x),x0,15,[x,1,1],[y,1,1],[gnuplot_preamble,"setsizeratio1"])
(%o29)
Figure6:C:\Users\fsmoreir\Documents\MyDropbox\Clculoemcomputadores\temp\aula0602\staircase_028.jpg
> x0:0.1$
staircase(f(x),x0,250,[x,1,1],[y,1,1],[gnuplot_preamble,"setsizeratio1"])
(%o31)
Figure7:C:\Users\fsmoreir\Documents\MyDropbox\Clculoemcomputadores\temp\aula0602\staircase_030.jpg
> f(x):=11.2*x^2$
x0:0.3$
staircase(f(x),x0,250,[x,1,1],[y,1,1],[gnuplot_preamble,"setsizeratio1"])
(%o34)
Figure8:C:\Users\fsmoreir\Documents\MyDropbox\Clculoemcomputadores\temp\aula0602\staircase_032.jpg
Diagramaderbitas
> F(a,x):=1a*x^2
2
(%o35) F (a, x) := 1 a x
> x0:.1
(%o36) 0.1
> orbits(F(a,x),x0,50,500,[a,1,2],[y,1,1],[style,dots])
(%o37)
Figure9:C:\Users\fsmoreir\Documents\MyDropbox\Clculoemcomputadores\temp\aula0602\orbits_o37.jpg
3AtractordeLorentz
> lorequac:[10*y10*x,x*z+28*xy,x*y8*z/3]
> lorinitial:[8,8,27]$
> lorsolution:rk(lorequac,[x,y,z],lorinitial,[t,0,50,0.01])$
> lorpoints:map(lambda([x],rest(x)),lorsolution)$
> draw3d(point_type=none,points_joined=true,color=orange,
xlabel="x(t)",ylabel="y(t)",zlabel="z(t)",
xtics=10,ytics=10,ztics=10,
points(lorpoints)
)
Figure10:C:\Users\fsmoreir\Documents\MyDropbox\Clculoemcomputadores\temp\aula0602\lorentz_o42.jpg
Veroutrosexemplosdapackagedynamics...
4Resoluodeexerccios
Considereaformaquadrtica
2 2
Q(x, y) = 3x + 2xy + 4y .
Represente,numsistemadeeixosisomtrico,asrectasquepassampelaorigemetmadirecodosvectoresprpriosdamatriz
associadaaQ.
(%i1) q(x,y):=3*(x^2)+2*x*y+4*(y^2)
2 2
(%o1) q (x, y) := 3 x + 2 x y + 4 y
(%i2) matrizq:matrix([3,1],[1,4])
3 1
(%o2) ( )
1 4
(%i3) vp:eigenvectors(matrizq)
5 7 5 + 7 5 1 5 + 1
(%o3) [[[ , ], [1, 1]], [[[1, ]], [[1, ]]]]
2 2 2 2
(%i4) vp1:vp[2][1][1]
5 1
(%o4) [1, ]
2
(%i5) vp2:vp[2][2][1]
5 + 1
(%o5) [1, ]
2
(%i6) wxdraw2d(dimensions=[500,500],
proportional_axes=xy,
axis_top=false,axis_bottom=false,
axis_left=false,axis_right=false,
grid=true,
xaxis=true,
xaxis_type=solid,
xaxis_width=1,
xaxis_color=black,
xtics_axis=true,
yaxis=true,
yaxis_width=1,
yaxis_type=solid,
yaxis_color=black,
ytics_axis=true,
line_width=2,
parametric(t*(vp1[1]),t*(vp1[2]),t,2,2),
parametric(t*(vp2[1]),t*(vp2[2]),t,2,2),
color=red,
implicit(q(x,y)=1,x,3,3,y,3,3)
)
;; loading \#P"Z:/Users/fsmoreir/maxima/binary/5\_37\_3/sbcl/1\_3\_1/share/draw/grcommon.fasl"
;; loading \#P"Z:/Users/fsmoreir/maxima/binary/5\_37\_3/sbcl/1\_3\_1/share/draw/gnuplot.fasl"
;; loading \#P"Z:/Users/fsmoreir/maxima/binary/5\_37\_3/sbcl/1\_3\_1/share/draw/vtk.fasl"
;; loading \#P"Z:/Users/fsmoreir/maxima/binary/5\_37\_3/sbcl/1\_3\_1/share/draw/picture.fasl"
(%t6)
(%o6)
Considereafunof : \mathBBR
2
\mathBBR definidapor
2 2
f (x, y) = xy(x y )
(%i7) f(x,y):=x*y*(x^2y^2)
2 2
(%o7) f (x, y) := x y (x y )
Ogrficodefasuperfciedefinidapelaequaof(x,y)z=0
(%i8) define(gradiente(x,y,z),[diff(f(x,y),x,1),diff(f(x,y),y,1),1])
2 2 2 2 2 2
(%o8) gradiente (x, y, z) := [y (x y ) + 2 x y, x (x y ) 2 x y , 1]
(%i9) gradiente(x,y,z)
2 2 2 2 2 2
(%o9) [y (x y ) + 2 x y, x (x y ) 2 x y , 1]
(%i10) wxdraw3d(
dimensions=[500,500],
enhanced3d=true,
yrange=[2,2],
xrange=[2,2],
explicit(f(x,y),x,2,2,y,2,2),
parametric(t*gradiente(0,0,f(0,0))[1],t*gradiente(0,0,f(0,0))[2],t*gradiente(0,0,f(0,0))[3]+f(0,0),t,6,6),
contour_levels={1/3,1/3},
contour=both
)
(%t10)
(%o10)
CreatedwithwxMaxima.