1+1

a=8

4 + 8

a+4

a=8;
b=7;
c=9;
a+b+c

pom=Integrate[((Sin[x])/x),{x,t-1,t}];
Plot[pom,{t,0,5}]

1kyncl

(Sqrt[5])

(25^(1/4))

(Sqrt[5.])

N[Pi]
Pi//N
N@Pi

InverseLaplaceTransform

?:=

ClearAll[f];
f[x_]:=Integrate[(x^17)*Sin[(x^2)],x]
f[1]

a=2
b:=3

b

a==b

4*5
4 5

4 5

x y

xy

DSolve[(1+(x^2))y''[x]+x*y'[x]+(4-(x^2))*y[x]==0,y[x],x]

N[Pi]
N[Pi,40]

??Plot

Plot[{Exp[-(x^2)],ArcTan[x]},{x,-3,3},PlotStyle->{{Thick,Yellow},{Thick,LightPink}},AxesLabel->{"x","(e^(-(x^2)))"}]

Exp[-(x^2)]+ArcTan[x]//SpokenString

(*****zde zacina druhe cviceni*****)

listik={1,5,{alfa,romeo},{{1},{ty,on}}}

Length[listik]

listik[[3]]
listik[[3]][[2]]
listik[[3,2]]

listik[[-1,-1,-1]]

listik[[0]]

Random[]&/@Range[10]

Table[opice,{12}]

Table[(x^i),{i,12}]

Table[(x^i),{i,8,12}]

Table[(x^i),{i,9,12,(1/2)}]

Table[(Pi^i)*(E^j),{i,5},{j,5}]
%//MatrixForm

Random[]

n=(10^7);
Mean[Random[]&/@Range[n]]

$HistoryLength=3;

n=50000;
pole=Table[Random[],{n}];
(1/n)(∑_(i=1)^n)pole[[i]]

{Muller,Kyncl}/.Muller->Musil
{Muller,Kyncl}/.{Muller->Musil,Kyncl->Musil}
(x^2)/.{x->1,x->2}

Solve[(x^2)-3x+2==0]

(x^2)/.{{x->1},{x->2}}

((x^2)/.((x^2)+t*x+(1/t)==0//Solve[#,x]&))/.List->Plus;
Plot[Re[%],{t,1,4},PlotStyle->{Brown,Thick},AxesLabel->{"t","(x1^2)+(x2^2)"}]

rovnice=(x^2)+t*x+(1/t)==0;
dosadIksy=Solve[rovnice,x];
kvadraty=(x^2)/.dosadIksy;
tisk=Re[kvadraty[[1]]+kvadraty[[2]]];
Plot[tisk,{t,1,4},PlotStyle->{Brown,Thick},AxesLabel->{"t","(x1^2)+(x2^2)"}]

SeedRandom[1]

n=5;
xka=Table[(x^i),{i,0,n}]
acka=Table[Random[],{i,0,n}]
(∑_(i=1)^(n+1))xka[[i]]*acka[[i]]
xka.acka
(∑_(i=0)^n)(x^i)*Random[]

n=15;
nahodnyPolynom=(∑_(i=0)^n)(x^i)*Random[];
rce=(x^2)*nahodnyPolynom+x+5==0;
prevrs=(x^(-1))/.Solve[rce];
(∑_(i=1)^(Length[prevrs]))prevrs[[i]]//Chop

?:=

f2[x_]:=(x^2)

ClearAll[f1,f2];
x=3;
f1[x_]:=(x^2);
f2[x_]=(x^2);
f1[5]
f2[5]

ClearAll[f3,x]
f3[x_]:=Integrate[(x^5)*Sin[x],x]
f3[8]

ClearAll[a];
a[0]=0;
a[1]=1;
a[n_]:=a[n-1]+a[n-2];
Table[a[i],{i,15}];

Trace[a[5]]

ClearAll[a];
a[0]=0;
a[1]=1;
a[n_]:=a[n-1]+a[n-2];
Timing[Table[a[i],{i,13}]][[1]]

ClearAll[a];
a[0]=0;
a[1]=1;
a[n_]:=a[n]=a[n-1]+a[n-2];
Timing[Table[a[i],{i,10000}]][[1]]

a[8]

?a

(**********treti cviceni**********)

ClearAll[f];
f[x_]:=x/;-1<x≤1;
f[x_]:=f[x+2]/;x≤-1;
f[x_]:=f[x-2]/;x>1;
Plot[f[x],{x,-6,6}];
Trace[f[3]];

Map[g,{ja,ty,on}]
g/@{ja,ty,on}

Apply[g,{ja,ty,on}]
g@@{ja,ty,on}

Plus@@Range[100]

nadruhou[x_]:=(x^2);
mocniny=nadruhou/@Range[10]
Plus@@%

Sin/@Range[5]
Sin[Range[5]]

test[50]

nadruhou[x_]:=(x^2);
mocniny=nadruhou/@Range[10]
test[x_]:=x>25;
Select[mocniny,test]
Select[mocniny,#>25&]

Select[((#)^2)&/@Range[10],#>25&]

#=5;

g:=(Sqrt[((#1)^2)+9((#2)^2)])&;
Plot3D[g[x,y],{x,-5,5},{y,-1,1}]

ω=314.;
uz=10*Sin[ω*t+0.8];
R1=50;
R2=100;
L=0.2;
c=100*(10^(-6));
rceUzel1={iL[t]==iR1[t]};
rceUzel2={iR1[t]==iR2[t]+ic[t]};
rceSoucastek={uz-u1[t]==L*iL'[t],u1[t]-u2[t]==iR1[t]*R1,u2[t]==R2*iR2[t],ic[t]==c*u2'[t]};
rcePocPodminek=Cases[rceSoucastek,_'[t],{0,∞}]/.a_'[t]:>a[0]==0;
dohromady=Union[rceSoucastek,rcePocPodminek,rceUzel1,rceUzel2];
nezname=Cases[dohromady,_Symbol[t],{0,∞}]//Union;
tmax=0.1;
res=NDSolve[dohromady,nezname,{t,0,tmax},StartingStepSize->(10^(-9))][[1]];
Plot[u2[t]/.res,{t,0,tmax},AxesLabel->{"t[s]","u2[t]"},PlotStyle->Thick]

Manipulate[ω=314.;
uz=10*Sin[ω*t+0.8];
R1=50;
R2=100;
L=0.2;
c=100*(10^(-6));
rceUzel1={iL[t]==iR1[t]};
rceUzel2={iR1[t]==iR2[t]+ic[t]};
rceSoucastek={uz-u1[t]==L*iL'[t],u1[t]-u2[t]==iR1[t]*R1,u2[t]==R2*iR2[t],ic[t]==c*u2'[t]};
rcePocPodminek={iL[0]==iL0,u2[0]==uc0};
dohromady=Union[rceSoucastek,rcePocPodminek,rceUzel1,rceUzel2];
nezname=Cases[dohromady,_Symbol[t],{0,∞}]//Union;
tmax=0.1;
res=NDSolve[dohromady,nezname,{t,0,tmax},StartingStepSize->(10^(-9))][[1]];
Plot[u2[t]/.res,{t,0,tmax},AxesLabel->{"t[s]","u2[t]"},PlotStyle->Thick,PlotRange->{Automatic,{-8,8}}],{uc0,-20,20},{iL0,-0.2,0.2}]

vyr=(Sqrt[(x^2)+9(y^2)]);
Plot3D[vyr,{x,-5,5},{y,-1,1}];
RegionPlot[0<vyr<1,{x,-2,2},{y,-2,2},PlotPoints->100];

D[vyr,x]

ω=314.;
uz=10*Sin[ω*t+0.8];
R1=50;
R2=100;
L=0.2;
c=100*(10^(-6));
rceUzel1={iL[t]==iR1[t]};
rceUzel2={iR1[t]==iR2[t]+ic[t]};
rceSoucastek={uz-u1[t]==L*iL'[t],u1[t]-u2[t]==iR1[t]*R1,u2[t]==R2*iR2[t],ic[t]==c*u2'[t]};
rcePocPodminek={iL[0]==iL0,uc[0]==uc0};
dohromady=Union[rceSoucastek,rceUzel1,rceUzel2];
rceHUS=dohromady/.{a_'[t]:>a*I*ω,a_[t]:>a,a_*Sin[b_+_*t]:>a*Exp[I*b]};
u2HUS=Im[(u2/.Solve[rceHUS][[1]])*Exp[I*ω*t]]

Manipulate[ω=314.;
uz=10*Sin[ω*t+0.8];
R1=50;
R2=100;
L=0.2;
c=100*(10^(-6));
rceUzel1={iL[t]==iR1[t]};
rceUzel2={iR1[t]==iR2[t]+ic[t]};
rceSoucastek={uz-u1[t]==L*iL'[t],u1[t]-u2[t]==iR1[t]*R1,u2[t]==R2*iR2[t],ic[t]==c*u2'[t]};
rcePocPodminek={iL[0]==iL0,u2[0]==uc0};
dohromady=Union[rceSoucastek,rcePocPodminek,rceUzel1,rceUzel2];
nezname=Cases[dohromady,_Symbol[t],{0,∞}]//Union;
tmax=0.1;
res=NDSolve[dohromady,nezname,{t,0,tmax},StartingStepSize->(10^(-9))][[1]];
Plot[{u2[t]/.res,u2HUS},{t,0,tmax},AxesLabel->{"t[s]","u2[t]"},PlotStyle->Thick,PlotRange->{Automatic,{-8,8}}],{uc0,-20,20},{iL0,-0.2,0.2}]

uz=1;
c=10*(10^(-6));
R=1000;
tau=c*R;
tmax=5.*tau;
n=100;
Δt=(tmax/n);
du[u_]:=((uz-u)/(R*c));
krok[{t_,u_}]:={t+Δt,u+du[u]*Δt};
reseni=NestList[krok,{0,0},n];
ListPlot[reseni]

NestList[h,x,4]