부록 A

R-L-C 회로의  전하에 미분방정식을  LaplaceTransform과  InverseLapalaceTransform을 이용하여 푼다.

Clear["Global`*"];
V[t_] := V0 Cos[ω t];
eq1 =  
      L q''[t]  +  R q'[t]  +  q[t]/C  ==  
        V[t]

eq2 = LaplaceTransform[eq1, t, s] // Simplify

sol = Solve[eq2, LaplaceTransform[q[t], t, s]][[1]]

sol0 = (sol /. V[t] -> 0)

Timing[
initial = {q[0] -> q0, q'[0] -> 
            i0}; 
charge[
          t_] = 
                    (((InverseLaplaceTransform[ LaplaceTransform[q[t], t, s] /. sol /. 
                          initial
                                                                       , s, 
                        t]
                                                                           // 
                      Simplify
                                                                           ) // 
                  PowerExpand
                                                                                  // 
                ExpandAll
                                                                                 ) // 
            Simplify
                                                                                     );  
                                charge[t] // 
        Short[#, 
            2] &
              ]

charge[t] // PowerExpand // Simplify

freqrule = { 
          Sqrt[-4 L  +  C R^2] ->  
            2 I ω0 Sqrt[
                C] L, 
                      1/Sqrt[-4 L  +  C R^2] ->  
            1/(2 I ω0 Sqrt[
                    C] L), 
                            (-4 L  +  
                C R^2) ->  -4  ω0^2 C  L^2, 
                            1/(-4 L  +  C R^2) ->  
            1/(-4  ω0^2 C  L^2)
                       };
  omegarule = Solve[
            Sqrt[-4 L  +  C R^2] == 
              2 I ω0 Sqrt[
                  C] L,  ω0][[1]];

charge0 = ((charge[t] //. freqrule  //. 
                    omegarule                                     
                                          // 
                  Simplify
                                         ) //. 
              freqrule
                                                 // 
            Simplify
                                               );

current0 = (D[charge0, t] // 
              Collect[#, {q0, 
                    i0}] &
                                   // 
            Map[Simplify, #, {1}] &);

values = {R -> 1, V0 -> 1, ω -> 0.2 Pi, 
            C -> 1, L -> 1, q0 -> 0, i0 -> 0};
phi = 
          ArcTan[((ω L - (1/(ω C)))/R)] /. values // N;                
gwresonance=Plot[Evaluate[{V[t], charge0, current0} /. omegarule /. 
              values],{t, 0.001, 20}
,PlotStyle -> {
                              {Hue[0.71], Dashing[{0.01, 0.01}], 
                Thickness[
                  0.005]}, 
                              {Hue[0.41], Dashing[{0.021, 0.001}], 
                Thickness[
                  0.00511]}, 
                              {Hue[0.01], Dashing[{0.021, 0.00021}], 
                Thickness[0.0051]}}
                            , Frame -> True
                            ,PlotLabel -> "R=1, L=1, C=1, ω=0.2 π "
                                                       ,PlotRange -> {-1.55, 1.55}
                             , FrameLabel -> {"Times", "   "}
                             , GridLines -> Automatic       
,Epilog -> {frametext[[1]], dashes[[1]], 
              dashes[[2]], dashes[[3]]}
,ImageSize ->  350                     
]
Null

values2 = {R -> 1, V0 -> 1, 
          C -> 1, ω -> 0.2 , q0 -> 1, 
          i0 -> 1};
\(p1 = 
      Plot3D[Evaluate[\(current0 /. omegarule\) /. values2], {t, 0, 
          1000}, {L, 1, 
          112}
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , 
        ViewPoint -> {1, \(+3\), 
            1.1}
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , 
        FaceGrids -> {{0, 0, 1}, {0, \(-1\), 
              0}}
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , 
        AxesLabel -> {"Time", "Inductance", "Current"}
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ , 
        PlotPoints -> \ 
          30
\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ ]\)