(*vypocty se spousti shift + enter nebp enter na num klavesnici*)

1+1

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

ClearAll[a]
(*vycisteni predchozich definic a informaci o a*)

kyncl je vul
(*mezera znamena nasobeni, radeji nepouzivat!!!*)

opice12=13;
12opice
12*opice
(*jmeno promenne nesmi zacinat cislici*)

Sin[Pi];
Sin@Pi;
Pi//Sin;
(*ruzne syntaxe mohou delat totez*)

(*klavesove zkratky*)
(*ctrl + shift 6*)
(*ctrl + / *)
(*ctrl + 2*)
(*esc o esp*)

Sin[5]
(*presny vstup presny vystup*)

Sin[5.]
(*5 Integer 5. Real*)

(*k vycisleni vysledku pomuze funkce N*)
N[Pi]

(*Math. umoznuje pretezovani funkci*)
N[Pi]
N[Pi,100]

(*Help:
F1
Help v hlavnim menu
?naCoSePtam
*)
(*Help Integrate*)
Integrate[(E^(a*(x^2)+b*x+c)),x]

Plot[ξ*Sin[ξ*(1+ξ)],{ξ,0,12}]

(*v AxesLabel radeji uvozovky*)
Plot[ξ*Sin[ξ*(1+ξ)],{ξ,0,12},AxesLabel->{"ξ","f[ξ]"}]

ξ=5+6*ovce;
Plot[ξ*Sin[ξ*(1+ξ)],{ξ,0,12},AxesLabel->{ξ,f[ξ]}]
(*bez uvozovek se dosadi*)

Plot[ξ*Sin[ξ*(1+ξ)],{ξ,0,12},AxesLabel->{"ξ","f[ξ]"},PlotStyle->{Red,Thick,Dashed}]
(*PlotStyle*)

Plot[ξ*Sin[ξ*(1+ξ)],{ξ,0,12},AxesLabel->{"ξ","f[ξ]"},PlotStyle->{Red,Thick,Dashed}]

(*Help a NajdiKoren, ergo FindRoot*)
(*prinesu si z Helpu*)
FindRoot[Cos[x]==x,{x,0}];
FindRoot[(E^x)==2*Cos[x],{x,0}]

(*pouziti Sum, esc inf esc*)
Sum[(1+x)*((((x/2)))^i),{i,1,∞}]

ClearAll["Global`*"];

f//TreeForm;

ClearAll["Global`*"];
f[x_]:=(Sqrt[x])*Sin[(x^(3/2))+1];
Plot[f[(Sqrt[t])],{t,1,10},AxesLabel->{"t",f[(Sqrt[t])]},PlotStyle->{Red,Thick},GridLines->Automatic]

ClearAll["Global`*"]

ClearAll["Global`*"];
vyr=Integrate[x*Sin[x],{x,1,x}];
f[x_]=vyr;
(*g[xx_]:=vyr/.x->xx
*)

ClearAll["Global`*"];
f[{t_,nx_,ny_}]:={Sin[nx*t],Cos[ny*t]};
ParametricPlot[f[{t,2,3}],{t,0,2*Pi},AxesLabel->{"x","y"},PlotStyle->{Magenta,Thick}]

ClearAll["Global`*"];
f[t_,nx_,ny_]:={Sin[nx*t],Cos[ny*t]};
ParametricPlot[f[t,2,3],{t,0,2*Pi},AxesLabel->{"x","y"},PlotStyle->{Magenta,Thick}]

ClearAll["Global`*"];

f[t_,nx_,ny_]:={Sin[nx*t],Cos[ny*t]};

Manipulate[
ParametricPlot[f[t,nx,ny],{t,0,2*Pi},AxesLabel->{"x","y"},PlotStyle->{Hue[hue],Thickness[tk]}]
,{nx,1,5},{ny,1,5},{hue,0,1},{tk,0.001,0.15}]

ClearAll["Global`*"];
f[n_]:=Normal[Series[Sin[x],{x,0,n}]]
Table[f[n],{n,1,10}];

Normal[Series[Sin[x]+Cos[x],{x,0,10}]]

ClearAll["Global`*"];
f[n_]:=Normal[Series[Sin[x]+Cos[x],{x,0,n}]];
nMax=15;
listProkladu=Table[f[n],{n,nMax}];
g[n_]:=Plot[{Sin[x]+Cos[x],listProkladu[[n]]},{x,0,2Pi},AxesLabel->{"x","f Taylor[f]"},PlotStyle->{{Red,Thick,Dashed},{Blue,Thick}},PlotLabel->"n= "<>ToString[n],PlotRange->{Automatic,{-1.5,1.5}}]
g[5]

Manipulate[g[n],{n,1,nMax,1}]

fz=1000;
uz[t_]:=(10^(-7))*(Exp[19*(1.1Sin[fz*2*Pi*t]-0.2)]-1);
Plot[uz[t],{t,0,0.003},PlotRange->All];

ClearAll["Global`*"];
 (*resime nas prvnio obvod*)
fz=1000;
uz[t_]:=(10^(-7))*(Exp[19*(1.1Sin[fz*2*Pi*t]-0.2)]-1);
Plot[uz[t],{t,0,0.003},PlotRange->All];
R1=1000;
R2=1;
L=0.033;
c=4.7*(10^(-6));
rce={iu[t]==iR1[t],
iR1[t]==iC[t]+iR2[t],
iR2[t]==iL1[t],
uz[t]==u1[t],
u1[t]-u2[t]==R1*iR1[t],
u2[t]-u3[t]==R2*iR2[t],
iC[t]==c*u2'[t],
u3[t]==L*iL1'[t]
};
nezname=Union[Cases[rce,_Symbol[t],{0,∞}]];
poc=Union[Cases[rce,a_'[t]:>a[0]==0,{0,∞}]];
tmax=0.01;
sol=NDSolve[Union[rce,poc],nezname,{t,0,tmax}];
Plot[u2[t]/.sol,{t,0,tmax}]