dos={R->6.,c->(10^(-4)),L->0.01};
r1=u==R*i[t]+L*i'[t]+uc[t];
r2=i[t]==c*uc'[t];
rr={r1,r2};
Tmin=Min[R*c,(L/R),(Sqrt[L*c])]/.dos;
Tmax=Max[R*c,(L/R),(Sqrt[L*c])]/.dos;
Tmean=Mean[{R*c,(L/R),(Sqrt[L*c])}]/.dos;
tmax=10*Tmax;
Print["Tmin= ",ms=0.001;(Tmin/ms)," ms","   Tmax= ",(Tmax/ms)," ms","    Tstredni= ",(Tmean/ms)," ms","    tmax= ",(tmax/ms),"  ms"]
dosu={u->0.5+Tanh[100*(Sin[2*Pi*(t/Tmean)]-0.5)]};
d=Union[dos,dosu];

derivace=Cases[rr,_'[t],{0,∞}];
nezname=Cases[rr,_Symbol[t],{0,∞}]//Union;
If[Length[derivace]==Length[nezname],Print["je to ok"],Print["musis eliminovat neco"],Print["neco je v neporadku se zadanim"]]

Solve[rr,derivace][[1]];
praveStrany=derivace/.%
novRR=Thread[Equal[derivace,praveStrany]];

pocs=derivace/.a_'[t]:>a[0]==0;
rceNDSolve=Union[novRR,pocs]//.d;
{proudNDS,napetiNDS}=nezname/.NDSolve[rceNDSolve,nezname,{t,0,tmax}][[1]];
pl[co_,hue_]:=Plot[Evaluate[co],{t,0,tmax},PlotStyle->{Thick,Hue[hue]},AxesLabel->{"t[s]",""},PlotRange->{Automatic,{-1.05,1.05}}]
plNDS=pl[napetiNDS,0];
plVstup=pl[u/.d,0.63];
Show[plNDS,plVstup]

numPraveStrany=(praveStrany/.d)/.a_[t]:>a;

vectDerivaci[{tt_,{ii_,ucuc_}}]:=N[numPraveStrany/.{t->tt,i->ii,uc->ucuc}];

n=100;
Δt=(tmax/n)//N;
EulerStep[stav:{t_,s:{i_,uc_}}]:={t+Δt,s+Δt*vectDerivaci[stav]};

RgSt[stav:{t_,s:{i_,uc_}}]:=Module[{k1,k2,k3,k4},k1=vectDerivaci[stav];k2=vectDerivaci[{t+((Δt)/2),s+((Δt)/2)*k1}];k3=vectDerivaci[{t+((Δt)/2),s+((Δt)/2)*k2}];k4=vectDerivaci[{t+Δt,s+Δt*k2}];N[stav+{Δt,((Δt)/6)*(k1+2k2+2k3+k4)}]];
pocStav={0,{0,0}};
resEuler=NestList[EulerStep,pocStav,n];
napetiEuler=resEuler/.{a_,{b_,c_}}:>{a,c};
plE=ListPlot[napetiEuler,PlotStyle->{Blue},AxesLabel->{"t[s]",""},PlotRange->{Automatic,{-1.05,1.05}}];
resRG=NestList[RgSt,pocStav,n];
napetiRG=resRG/.{a_,{b_,c_}}:>{a,c};
plRG=ListPlot[napetiRG,PlotStyle->{GrayLevel[0]},AxesLabel->{"t[s]",""},PlotRange->{Automatic,{-1.05,1.05}}];
Show[plRG,plE,plNDS]