<< Graphics`Graphics`;
Off[General::"spell1"];

U = 100;
ω0 = 314;
L =  .1;
proud = (U/(I*ω0*L + R));
ParametricPlot[{-Im[proud], Re[proud]}, {R, 0, 1000}, 
        PlotPoints -> 500, PlotRange -> All, 
        AxesLabel -> {"-Im[i]", "Re[I]"}, 
        PlotStyle -> {Hue[0.63], Thickness[0.008]}];

respar[q_, Cap_, 
          k_] := Solve[{((k*ω0*Ll)/(1.  R)) == 
                q, (((k*ω0))^2) == (1/(Ll*Cap))}, {R, 
              Ll}][[1]];

ClearAll[imp];
imp[{q_, Cap_, k_}] := 
      Module[{dos}, dos = respar[q, Cap, k]; 
        I*ω*Ll + (1. /(ω*I*Cap)) + R /. dos]

\(Plot[
      Abs[imp[{50, 10\^\(-3\), 3}]], {ω, 0.3*ω0, 
        30  ω0}, 
      AxesLabel -> {\*""ω[(s^(-1))]"", "Z[Ω]"}, 
      PlotStyle -> {Hue[0.63], 
          Thickness[0.008]}]\)
\(\(LogLogPlot[
        Abs[imp[{50, 10\^\(-3\), 3}]], {ω, 0.3*ω0, 
          30  ω0}, 
        AxesLabel -> {\*""ω[(s^(-1))]"", "Z[Ω]"}, 
        PlotStyle -> {Hue[0.63], Thickness[0.008]}];\)\)

nharm = 15;
par[
          list_] := ((((list^(-1)) /. List -> Plus))^(-1));
\(\(argszetka = \({50, 10\^\(-3\)\/#, 2  # + 1} &\) /@ 
          Range[nharm];\)\)
zetka = imp /@ argszetka;
celkem[ω_] = zetka // par;
\(\(LogLogPlot[
        Abs[celkem[ω]], {ω, 0.3*ω0, 5  nharm*ω0}, 
        AxesLabel -> {\*""ω[(s^(-1))]"", "Z[Ω]"}, PlotStyle -> {Hue[0.63], Thickness[0.008]}, 
        PlotPoints -> 300];\)\)

harm = {(2  # - 1)*ω0, (1/(2  # - 1))} & /@ 
          Range[nharm];
vcasevstup[{ω_, 
            ampl_}] := 
        Im[ampl*Exp[I*ω*t]];
in = 
        vcasevstup /@ harm /. 
          List -> 
            Plus;
vcasevystup[{ω_, 
            ampl_}] := 
        Im[ampl*celkem[ω]*
            Exp[I*ω*t]];
out = 
        vcasevystup /@ harm /. List -> Plus;
Plot[{in, out},{t, 0, 0.02},AxesLabel->{"t[s]","iin[A],uout[V]"},PlotStyle -> {{Hue[0.63], Thickness[0.008]}, {Hue[0], 
                Thickness[0.008]}}];