(*situace podle obrazku Obr. 34-V-5*)

iNelin[u_]:=(1/100)(u+(1/2)(u^5)-(5/8)*(u^3));
Plot[iNelin[u],{u,-1.6,1.6},PlotStyle->Thick,AxesLabel->{"u [V]","i [A]"}]

ClearAll[ω];
TrigReduce[iNelin[Sin[ω*t]]]//Chop

f=50;
ω=2.*Pi*f;
T=(1/f);
L1=(10^(-3));
rozladeni=1;
nHarm=5;
L2=.1*L1;
R=.01;
c=cap/.Solve[L2*cap==(1/(((rozladeni*ω*nHarm))^2))][[1]];
u1=10*Sin[ω*t];
iz=iNelin[u2[t]];
rce={iL1[t]==iL2[t]+iz,u1-u2[t]==L1*iL1'[t],iL1[0]==0,u2[t]-u3[t]==L2*iL2'[t],iL2[0]==0,u3[t]-u4[t]==R*iL2[t],iL2[t]==c*u4'[t],u4[0]==0};
tmax=10T;
res=NDSolve[rce,{iL1[t],iL2[t],u2[t],u3[t],u4[t]},{t,0,tmax},StartingStepSize->(10^(-10)),MaxSteps->(10^6)][[1]];
proudy={iL1[t],iL2[t],iz}/.res;
Plot[Evaluate[proudy],{t,tmax-1.5T,tmax},AxesLabel->{"t","iZdroj,iFiltr,iZatez"},PlotStyle->Evaluate[{#,Thickness[0.006]}&/@{Red,Green,Blue}]]