R1=10;
R2=10;
L=(10^(-3));
c=(10^(-6));
amplituda=10;
faze=0.8;
f=(10^6);
ω=2*Pi*f;
T=(1/f);
u1[t_]:=amplituda*Sin[ω*t+faze];

rceUzel={iR1[t]+iL[t]==iR2[t]+ic[t]};
rceSoucastek={iR1[t]==((u1[t]-u2[t])/R1),u1[t]-u2[t]==L*iL'[t],iR2[t]==((u2[t])/R2),ic[t]==c*u2'[t]};
pocPodminky={iL[0]==0,u2[0]==0};
tmax=20T;
rceDohromady=Union[rceSoucastek,rceUzel,pocPodminky];
nezname=Cases[rceDohromady,_Symbol[t],{0,∞}]//Union;

res=NDSolve[rceDohromady,nezname,{t,0,tmax},StartingStepSize->(10^(-9))][[1]];
plTimeDomain=Plot[u2[t]/.res,{t,0,tmax},AxesLabel->{"t[s]","u2[V]"},PlotRange->{Automatic,{-0.17,0.26}}]

rceHUS=Union[rceSoucastek,rceUzel]/.{a_'[t]:>I*ω*a,a_[t]:>a,a_*Sin[b_+c_*t]:>a*Exp[I*b]};
resHUS=Solve[rceHUS][[1]];
Print["U1 fazor=  ",u2/.resHUS,"  V"]
u2HUS=Im[(u2/.resHUS)*Exp[I*ω*t]];
plHUS=Plot[u2HUS,{t,0,tmax},AxesLabel->{"t[s]","u2[V]"},PlotStyle->Hue[0],PlotRange->{Automatic,{-0.17,0.26}}];
Show[plHUS,plTimeDomain]

(*****ukazka HUS primo*******)

U1=u1[t]/.a_*Sin[b_+c_*t]:>a*Exp[I*b];
Print["U1 fazor=  ",U1,"  V"]
rceHUSprimo=((U1-U2)/R1)+((U1-U2)/(I*ω*L))==(U2/R2)+(U2/(1/(I*ω*c)));
Solve[rceHUSprimo][[1]]

(*****ukazka HUS jako delic*******)

Z1=(1/((1/R1)+(1/(I*ω*L))));
Z2=(1/((1/R2)+I*ω*c));
vystup=U1*(Z2/(Z1+Z2))

nmax=20;ClearAll[f];
f[x_]:=3*Tanh[x];
x0=0;
Δ=3;
ymin=NMinimize[{f[x],x0-Δ<x<x0+Δ},{x,x0-Δ,x0+Δ}][[1]];
ymax=NMaximize[{f[x],x0-Δ<x<x0+Δ},{x,x0-Δ,x0+Δ}][[1]];
rovoj[n_]:=Normal[Series[f[x],{x,x0,n}]]
rozvoje=rovoj/@Range[nmax];
k=1.8;
Manipulate[Plot[{f[x],rozvoje[[i]]},{x,x0-Δ,x0+Δ},PlotRange->{Automatic,{k*ymin,k*ymax}},PlotStyle->Thickness[0.004]],{i,1,nmax,1}]