1+1

a=2

(*otaznikem se muzeme zeptat na cokoli*)\
?a

(*strednik potlacuje zobrazeni vystupu*)
b=3;

?b

?@;

Sin[5]

Sin[5+Pi]

Sin[5.]

Head[5]
Head[5.]

Log[-1]

(*vycisleni pomoci funkce N*)
N[Pi]
N[Pi,100]

kyncl je vul a idiot

kyncl*je*vul*a*idiot

(*jmeno promenne nesmi zacinat cislici*)
12opice
opice12

(*nelekat se, Math. umoznuje vice syntaxi a nektere jsou odstrasujici*)
Sin[Pi]
Pi//Sin
Sin@Pi

(*escape sequence*)
∞
α

FullForm[ξ]

(*klavesove zkratky*)
(*ctrl /*)
(96/18)

(x/6)

(*ctrl  ^*)
(x^6)

(*ctrl 2*)
(Sqrt[98])

Solve[(x^13)==5.6];

Solve[x=5,x]

Solve[x==5,x]

ClearAll[x]
Solve[x==5,x]

Remove["Global`*"]

Integrate[(x^17)*Sin[(Sqrt[x])],x];

Integrate[((Sin[(Sqrt[x])])/x),x]

(*www.mathworld.com*)

Plot[x*Sin[(x^(-1))],{x,-2Pi,2Pi},PlotRange->All,PlotStyle->{Thickness[0.005],Red,Dashed},AxesLabel->{"x","x*Sin[(x^(-1))]"},GridLines->Automatic]

(*zde zacina druhe cviko*)

Table[i,{12}]

Table[i,{i,12.5}]

Table[i,{i,4,12.5}]

(*Table[co,{iterator,odkud, co nebude prekroceno,krok}]*)
Table[i,{i,2.3,9.2,0.5}]

nFci=10;
aMin=0.123;
aMax=0.789;
kroka=((aMax-aMin)/(nFci-1));
fce=Table[fi*((((fi^2)))^a),{a,aMin,aMax,kroka}];
nfci=Length[fce];
Print["melo byt ",nFci,"  a je jich  ",nfci]

(*vyplotime si je*)
x=5;
Plot[fce,{fi,-1,1},AxesLabel->{"x","f[x]"},PlotStyle->RGBColor[1,.1,1]]

Manipulate[
Graphics[{Hue[hue],Disk[{0,0},{3,4}]}]
,{hue,0,1}];

nFci=50;
aMin=0.123;
aMax=17.89;
kroka=((aMax-aMin)/(nFci-1));
fce=Table[fi*((((fi^2)))^a),{a,aMin,aMax,kroka}];
barvickyATloustka=Table[{Thickness[0.003],Hue[hue]},{hue,0,0.85,(0.85/(nFci-1))}];
pl1=Plot[fce,{fi,-1,1},AxesLabel->{"x","f[x]"},PlotStyle->barvickyATloustka,PlotRange->{Automatic,{-1,1}},PerformanceGoal->"Speed"];

body=Table[{Random[],Random[]},{100}];
pl2=ListPlot[body];

Show[pl1,pl2]

nb=50;
delta=((4Pi)/(nb-1.));
body=Table[{x,((Sin[x])/x)},{x,-2Pi,2Pi,delta}];
pl1=ListPlot[body,PlotStyle->{Yellow,PointSize[0.02]},AxesLabel->{"x","f[x]"}];
pl2=Plot[((Sin[x])/x),{x,-2Pi,2Pi},PlotStyle->{Black,Thickness[0.004]},AxesLabel->{"x","f[x]"}];
Show[pl2,pl1]

Manipulate[
nb=50;
delta=((4Pi)/(nb-1.));
maticeRotace=(({{Cos[t], -Sin[t]}, {Sin[t], Cos[t]}}));
body=Table[{x,((Sin[x])/x)}.maticeRotace,{x,-2Pi,2Pi,delta}];
pl1=ListPlot[body,PlotStyle->{Yellow,PointSize[0.02]},AxesLabel->{"x","f[x]"}];
pl2=ParametricPlot[{x,((Sin[x])/x)}.maticeRotace,{x,-2Pi,2Pi},PlotStyle->{Black,Thickness[0.004]},Axes->False,AspectRatio->1];
Show[pl2,pl1]
,{t,0,2Pi}]

Remove["Global`*"]

Solve[x^2+6x+2==0,x]

x/.Solve[x^2+6x+2==0,x]

res

res=Solve[x^2+2*y*x+9+y==0,x];
vyraz=1/x/.res
Plot[vyraz,{y,0,100},GridLines->Automatic,PlotStyle->{Red,Blue},AxesLabel->{"y","f[y]"}]

Plot[{x^2,x^3},{x,0,10}]

DSolve[{y'[t]+y[t]+Sin[t]==Tanh[t],y[0]==y0},y[t],t]

res[1]

Remove["Global`*"]
res[y0_]:=y[t]/.First@DSolve[{y'[t]+y[t]+Sin[t]==Tanh[t],y[0]==y0},y,t]

exps=Table[res[i],{i,1,101,10}]
Plot[exps,{t,1,10},PlotRange->All]

Table[x,{i,1,10}]

Remove["Global`*"]
g=9.81;
v0=10;
α=Pi/2.5;
vx=v0*Cos[α];
vy=v0*Sin[α];
rce={x''[t]==0,x'[0]==vx,x[0]==0,y''[t]==-g,y'[0]==vy,y[0]==0};
ressys={x[t],y[t]}/.First@DSolve[rce,{x[t],y[t]},t];
test[x_]:=x≠0;
tmax=Select[t/.Solve[ressys[[2]]==0,t],test][[1]];

plt=ParametricPlot[ressys,{t,0,tmax},AxesLabel->{x,y},PlotStyle->Blue,GridLines->Automatic
];

bodxy[tx_]:=ListPlot[{ressys}/.t->tx,PlotStyle->Red]

Manipulate[Show[plt,bodxy[t]],{t,0,tmax}]

ClearAll[f]

f[x_List]:=x^2

f[x_Integer]:=(Sqrt[x])

f[List[1,2]]

f[2]

{1,4}//FullForm