2+2

Sqrt[64]

Mod[10,3]

1/3 + 1/2

N[1/3]

N[Pi]

N[E]

x = 5

Clear[x]

y:=4

Solve[x^2 - 2 x + 1 == 0, x]

x +x

Expand[(1+x)^2]

funkcja[x_] := x^2 +1

funkcja[2]

funkcja[x_,y_] := x*x + y

funkcja[1,2]

f := #^2 + 1 &

f[2]

g := #1^2 + #2 ^3 &

g[1,2]

lista = {1,2,4,5};

?Table

Table[i^2, {i,1,10,1}]

w := Table[i/j, {i,4}, {j,4}]

w //MatrixForm

w

Plot[Sin[x], {x,0, 3 Pi}]

Plot[{Sin[x],Exp[x]-2}, {x,0, 2 Pi}, PlotRange -> {0,2}]

Komentarz

?Manipulate

Manipulate[Plot[Sin[x(1+a x)], {x,0, 3 Pi}], {a,0,2}]

ListPlot[Table[Prime[i],{i,50}]]

obrot[x_, θ_] := Mod[x+θ, 2 Pi]

obrot[0,Pi/3]

obrot[x_, θ_] := Mod[N[x+θ], 2 Pi]

obrot[0,Pi/3]

Plot[obrot[x,Pi/6], {x, 0, 6 Pi}, AxesLabel -> {"x", "f(x)"}, PlotLabel -> "Wykres funkcji obrotu", AxesStyle -> Arrowheads[0.05], PlotStyle-> Red, LabelStyle -> Directive[15, Black]]

Manipulate[Plot[obrot[x, θ], {x, 0, 6 Pi}],{θ, 0,2 Pi}]

?Nest

Nest[h,x,4]

NestList[h,x,4]

orbita[x0_, θ_, n_] :=NestList[obrot[#,θ]&, x0, n-1]

fun[y_] := (x=y+5; x^2)

fun[2]

Manipulate[ zp= orbita[x0, θ, n]; ListPlot[zp],{θ, 0, 2 Pi}, {{x0,2}, 0, 2 Pi}, {{n,40},{40,80,320}}]

?Graphics

Manipulate[zp=orbita[x0,θ, Max[k,n]]; Graphics[{Red, Circle[], Black, 
Table[Disk[{Sin[zp[[i]]], Cos[zp[[i]]]}, 0.02] , {i,1,k}]}] ,
{θ, 0, 2 Pi}, {x0, 0, 2Pi}, {{n,40}, {40,80,160}},  {{k,1}, 1,n,1}]

Histogram[orbita[Exp[1], Pi/12, 15000], {1/10}, "PDF"]

Manipulate[zp=orbita[x0,θ, Max[k,n]];
GraphicsGrid[{
{
Graphics[{Red, Circle[], Black, 
Table[Disk[{Sin[zp[[i]]], Cos[zp[[i]]]}, 0.02] , {i,1,k}]}],
 ListPlot[zp]

},

{
Plot[obrot[x, θ], {x,0, 4 Pi}],
Histogram[zp, {1/10}, "PDF"]
}
}
],
{θ, 0, 2 Pi}, {x0, 0, 2Pi}, {{n,40}, {40,160, 320}}, {k,1,n,1} ]