(*1.cvičení od 16:15; Straka & Terrich *)

5-4

1

a

b=vul;

Cos[Pi]

Cos=2;(*funkce yacinaji velkymi pis,eny a argument je v hranate zavorce*)

Pi

N[π]

π(*klavesova zkratka esc+pi+esc*)

N[Pi,20]

Cos[2]

N[Cos[2]]

Cos[2.]

Cos[2]//N

N@Cos[2]

b*5

ClearAll[b]

b=1

ClearAll[Cos]

N

N[2/3]

Integrate[(x^8)*Cos[x],x]

10kkk
kkk10

kkk*10

(*∫(x^8)Cos[x]\[DifferentialD]x*)

(*ctrl+6 -> (\[SelectionPlaceholder]^\[Placeholder])
ctrl+2 -> (Sqrt[\[SelectionPlaceholder]])
ctrl+/ -> (\[SelectionPlaceholder]/\[Placeholder])*)

fce=10*y*Sin[3*y];

Plot[fce,{y,0,10},PlotStyle->{Red,Thick},AxesLabel->{"y","fce[y]"}]

(* 2. cviceni *)

Funkce=Sin[x]+Cos[x];
Proklad=Series[Funkce,{x,0,10}]//Normal;

Plot[{Funkce,Proklad},{x,0,2π}]

ClearAll["Global`*"]
f[t_]:=(Sqrt[t])*Sin[((t^3)/3)]
Plot[{f[t],f[(Sqrt[t])]},{t,0,5},GridLines->Automatic,AxesLabel->{"t","f(t), f((Sqrt[t]))"},PlotStyle->{{Thick,Magenta},{Thick,Blue}}]

funkce[t_]:=(Sqrt[t])*Sin[((t^3)/3)]

funkce[3]

ClearAll["Global`*"]
f2[nx_,ny_,t_]:={Sin[nx*t],Cos[ny*t]}

f2[1,-2,5];

ParametricPlot[f2[2,3,t],{t,0,10}]

Manipulate[ParametricPlot[f2[nx,ny,t],{t,0,20},ImageSize->150],{nx,1,10},{ny,1,10}]

g[y_]:=Sin[2*y]*(E^((-3)/y))

data=Table[{g[y],Cos[g[y]]},{y,1,40,1}];

Length[data]

Manipulate[,{size,0.005,0.5}]

data[[All,2]]

data[[1]]//FullForm

data[[1]]
data[[1]]//TreeForm

pl1=ListPlot[data,AxesLabel->{"g[y]","Cos[g[y]]"},Joined->True];
pl2=ListPlot[data,AxesLabel->{"g[y]","Cos[g[y]]"},PlotStyle->{Red,PointSize[0.02]}];

Show[{pl1,pl2}]

f[a_]:=a*x+10

f[-5]

Fourier

(*3. cvičení*)

ClearAll["Global`*"]

koren1=111;
ResKvRovnici[a_,b_,c_]:=Module[{diskr,koren1,koren2},diskr=(b^2)-4*a*c;
koren1=((-b -(Sqrt[diskr]))/(2*a));
koren2=((-b +(Sqrt[diskr]))/(2*a));
If[diskr<0,"Koreny jsou imaginarni",N[{koren1,koren2}]]
]

ResKvRovnici[2,2,10]

ClearAll["Global`*"]
fce[a_,r_]:=((Sin[a])^r)
Plot[{fce[Tanh[a],5],fce[Tanh[a],10]},{a,-π,π},PlotStyle->{{Thick,Red},{Dashed,Thick,Green}},AxesLabel->{"osa x","osa y"}]

fce[a_,r_]:=((Sin[a])^r)
fce[a_Integer]:=10
fce[a_,b_,c_]:=a+b-c
fce[a_Real]:=0
{fce[1,2],fce[10.54],fce[1,5,3],fce[2]}

bb=π

{a,aa,aaa,b,bb,bbb}/.{bb->10,aa->0,a->110}

?/.

rovnice=Solve[a*(x^2)+b*x+c==0,x];
X1=x/.rovnice[[1]]
X2=x/.rovnice[[2]]

Plot[X1/.{c->2,a->2},{b,-50,50}]

ClearAll["Global`*"]

rce={D[y[t],t]==((Cos[t])/(1+((y[t])^2))),y[0]==0};

res=NDSolve[rce,{y[t],y'[t]},{t,0,4Pi}];
Yps=y[t]/.res;
YpsDer=y'[t]/.res;

Plot[{Yps,YpsDer},{t,0,4Pi},PlotStyle->{Red,Blue},AxesLabel->{"osa x","osa y"}]