1+1

a=2;
b=a-1;
c=a-b;

(Sqrt[5])

(Sqrt[5.]);
N[(Sqrt[5])];
aa=n[(Sqrt[5])]

n=Sin;
aa

N[Sqrt[5],140]

InverseLaplaceTransform[((p+1)/((p^3)+2p+1.)),p,t];

opice 12

kyncl*je*vul

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

Simplify[(Sqrt[g])*(Sqrt[h])*(Sqrt[ρ]),{g>0,h>0,ρ>0}]

Integrate[(x^17.25)*Sin[1+(x^3)],x]

Plot3D[Sin[x*y-1],{x,-Pi,Pi},{y,-Pi,Pi}]

%20;

$HistoryLength=2;

x=1;
ClearAll[x]
Solve[x==1]

Sin[x]
Sin@x
x//Sin

Sin[(Sqrt[5])]//N

150!//N

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

(*Tady zacina druhe cviceni*)

?*Plot*

x=jama hluboka;
Plot[Sin[x],{x,0,6Pi},AxesLabel->{x,y}]

Options[Plot];

x=jama hluboka;
Plot[Sin[x],{x,0,6Pi},AxesLabel->{"x","y"}]

Red
Thick
Large

Dashed

Plot[{((Sin[x])^(-1)),Cos[x]},{x,0,6Pi},AxesLabel->{"x","y"},
AxesOrigin->{0,-1},
PlotStyle->{Red,{Thick,Blue, Dashed}},
PlotLabel->"nas prvni",
PlotRange->All	
]

Plot[{((Sin[x])^(-1)),Cos[x]},{x,0,6Pi},AxesLabel->{"x","y"},
AxesOrigin->{0,-1},
PlotStyle->{Red,{Thick,Blue, Dashed}},
PlotLabel->"nas prvni",
PlotRange->{Automatic,{-2,2}}
]

ClearAll[h];
h[n_,x_]:=Tanh[n*x];
Plot[{h[5,Sin[t]],h[50,Sin[3t]]},{t,-2Pi,2Pi},AxesLabel->{"x","y"},
PlotStyle->{{Thick,Blue},{Thick,Black}}]

?/.

{ovoce,obilnina,tuk}/.ovoce->banan

ClearAll[x];
{x,x+y,(x^2)}/.{x->E,y->x}

x/.{{x->1},{x->2}}

Solve[(x-1)*(x-2)==0]

ClearAll[a,b,x,y,h];
resxy=Solve[{(a^2)*x+b*y==(a^2)+(b^2),(b^2)*x-a*y==(a^2)-(b^2)},{x,y}][[1]];
h[a_,b_]=x+y/.resxy;
h[E,Pi]

h[1,1]

ClearAll[h];
h[a_,b_]:=(x+y/.Solve[{(a^2)*x+b*y==(a^2)+(b^2),(b^2)*x-a*y==(a^2)-(b^2)},{x,y}])[[1]]
h[1,1]

Plus@@(x/.Solve[x^17-5.6==0,x])

Total[x/.Solve[x^17-5.6==0,x]]

(x/.Solve[x^17-5.6==0,x])/.List->Plus

ClearAll[h,a,b];
h[a_,b_]:=(x+y/.Solve[{1.*(a^2)*x+b*y==(a^2)+(b^2),(b^2)*x-a*y==(a^2)-1.*(b^2)},{x,y}])[[1]];

nvycisleni=100000;
pom=Timing[Table[h[a,b],{a,(Sqrt[nvycisleni])},{b,(Sqrt[nvycisleni])}]];
Print["trvalo to: ",pom[[1]]," s"]

x/.{x->"vymja"}

f[a_]:=x/.FindRoot[Cos[a*x]==x,{x,1}]
f[0.5]

Plot[f[a],{a,0.5,2},AxesLabel->{"x","y"},PlotStyle->{Blue,Thick}]

s=NDSolve[{y'[t]==((Sin[t])/(1+((y[t])^2))),y[0]==1},y,{t,0,10}];
Plot[Evaluate[y[t]/.s],{t,0,10},AxesLabel->{"x","y"},PlotStyle->{Red,Thick}]

NDSolve[{y'[t]==((Sin[t])/(1+((y[t])^2))),y[0]==1},y,{t,0,10}]

Manipulate[

s=NDSolve[{y'[t]==((Sin[a*t])/(1+((y[t])^2))),y[0]==1},y,{t,0,10}];
Plot[Evaluate[y[t]/.s],{t,0,10},AxesLabel->{"x","y"},PlotStyle->{Red,Thick},PlotRange->{Automatic,{0.5,3}}]

,{a,0,10}]

Manipulate[

s=NDSolve[{y'[t]==((Sin[a*t])/(1+((y[t])^2))),y[0]==1},y,{t,0,10}];
Plot[Evaluate[y[t]/.s],{t,0,10},AxesLabel->{"x","y"},PlotStyle->{Red,Thick},PlotRange->{Automatic,{0.5,3}},
PlotLabel->"a= "<>ToString[a]
]

,{a,0,10}]

ParametricPlot[{Sin[t],Cos[3t+1]},{t,0,2Pi},AxesLabel->{"x","y"},PlotStyle->{Black,Thick}]

Manipulate[

ParametricPlot[{Sin[t+fi],Cos[k*t+1]},{t,0,2Pi},AxesLabel->{"x","y"},PlotStyle->{Black,Thick},
PlotRange->{{-1,1},{-1,1}}
]

,{{k,2.5},0,5}
,{{fi,0},-1.5,1.5}
]

s=NDSolve[{x'[t]==-x[t]+y[t],y'[t]==-y[t]+x[t],x[0]==100,y[0]==-100},{x,y},{t,20}]
ParametricPlot[Evaluate[{x[t],y[t]}/.s],{t,0,20}]

Manipulate[

rn=100;
fivys=fi;
s=NDSolve[{x'[t]==-x[t]+fi*y[t],y'[t]==-y[t]+x[t],x[0]==100,y[0]==-100},{x,y},{t,20}];
ParametricPlot[Evaluate[{x[t],y[t]}/.s],{t,0,20},PlotRange->{{-rn,rn},{-rn,rn}}]

,{{fi,0},-4.5,4.5}]

(*ctvrte cviko*)

f=1000;
T=(1/f);
ω=2*Pi*f;
uz=Tanh[20Sin[ω*t]];
Plot[uz,{t,0,5.5T},AxesLabel->{"x","y"},PlotStyle->{Red,Thick},
GridLines->Automatic
];

R1=1000;
c=(10^(-6));
L=0.01;
R2=100;
uzle={0==iu[t]+iR1[t],
iR1[t]==ic[t]+iL[t],
iL[t]==iR2[t]
};
soucastky={u1[t]-u2[t]==R1*iR1[t],
ic[t]==c*u2'[t],
u2[t]-u3[t]==L*iL'[t],
u3[t]==R2*iR2[t],
uz==-u1[t]
};
rceDohr=Union[uzle,soucastky];
nezname=Union[Cases[rceDohr,_Symbol[t],{0,∞}]];
poc=Union[Cases[rceDohr,a_'[t]:>a[0]==0,{0,∞}]];
proNDSolve=Union[rceDohr,poc];
tmax=5T;
res=NDSolve[proNDSolve,nezname,{t,0,tmax},StartingStepSize->(10^(-12))];
Plot[{uz,u3[t]/.res},{t,0,tmax},AxesLabel->{"x","y"},PlotStyle->{{Red,Thick},{Blue,Thick}},
GridLines->Automatic
]

iz=(uz/100)+0.01;
uzle={iR2[t]==iR1[t]+iC[t],
iR1[t]==iz,
iz==iuz[t],
iuz[t]==iR2[t]+iL[t]
};
soucastky={
u1[t]-u2[t]==R1*iR1[t],
u4[t]-u1[t]==R2*iR2[t],
uz==u4[t]-u3[t],
u4[t]==L*iL'[t],
iC[t]==c*u1'[t]
};
rceDohr=Union[uzle,soucastky];
nezname=Union[Cases[rceDohr,_Symbol[t],{0,∞}]];
poc=Union[Cases[rceDohr,a_'[t]:>a[0]==0,{0,∞}]];
proNDSolve=Union[rceDohr,poc];
tmax=5T;
res=NDSolve[proNDSolve,nezname,{t,0,tmax},StartingStepSize->(10^(-12))];
Plot[{uz,u3[t]/.res},{t,0,tmax},AxesLabel->{"x","uz u3 [V] "},PlotStyle->{{Yellow,Thickness[0.005]},{Green,Thickness[0.005]}},
GridLines->Automatic,
Background->Black
]

(*pate cviceni*)

rce={u1-u2==iR1*R1,
u2==R2*iR2,
u1==-uz,
iR1==iz+iR2+iout
};
res=Solve[rce,{u1,u2,iR1,iR2}];
Simplify[u2/.res[[1]]];
%/.{uz->-5,iz->-0.05,R1->100,R2->100}
Expand[%]

rce={u1-u2==iR1*R1,
u2==R2*iR2,
u1==-uz,
iR1==iz+iR2+iout
};
res=Solve[rce/.{uz->-5,iz->-0.05,R1->100,R2->100},{u1,u2,iR1,iR2}]

ClearAll[par,ser];
par[list_]:=(((Plus@@((list^(-1)))))^(-1));
ser[list_]:=Plus@@list;

R*ser[{par[{3,ser[{1,2}]}],par[{4,5}]}]

μF=(10^(-6));
kΩ=1000;
dos={c1->1μF,c2->1μF,R1->1,R2->100kΩ,L1->0.01,L2->0.03};
za=ser[{R1,I*ω*L1}];
z1=par[{(1/(I*ω*c1)),za}];
zb=par[{(1/(I*ω*c2)),R2}];
z2=ser[{I*ω*L2,zb}];
u1=1;
u2=u1*(z2/(z1+z2));
u2cis=Simplify[u2/.dos];
LogLogPlot[Abs[u2cis],{ω,1000,30000},PlotRange->All,AxesLabel->{"ω [(s^(-1))]","Abs[u2] [V]"},GridLines->Automatic,PlotStyle->{Red,Thickness[0.006]}]

Z1n=ser[{I*ω*L2,par[{R1,I*ω*L1,(1/(c1*I*ω))}]}]/.dos;
Z2n=ser[{R2,(1/(I*ω*c2))}]/.dos;

LogLogPlot[Abs[(4+2*I)(Z2n/(Z2n+Z1n))],{ω,1000,(10^10)},PlotRange->All,AxesLabel->{"ω [(s^(-1))]","Abs[u2] [V]"},GridLines->Automatic,PlotStyle->{Blue,Thickness[0.006]}]