Skip to main content
added 117 characters in body
Source Link
Alex Trounev
  • 48.8k
  • 3
  • 51
  • 115

Here is just the case when the exact solution is worse than numerical. Therefore, we solve numerically

 Manipulate[
 Plot[Evaluate[
   y[t] /. First[
     NDSolve[{L*y''[t] == -R*y'[t] - C0*y[t] + V*Sin[t], y[0] == 0, 
       y'[0] == V}, y, {t, 0, 2*Pi}]]], {t, 0, 2*Pi}], {{L, 1*^-3}, 
  10^-6, 10*^-3, Appearance -> "Labeled"}, {{R, 3*^3}, 1*^3, 10*^3, 
  Appearance -> "Labeled"}, {{C0, 3*^5}, 0, 10*^5, 
  10*^5Appearance -> "Labeled"}, {{V, 5}, 0, 10, Appearance -> "Labeled"}]

fig1fig1

Here is just the case when the exact solution is worse than numerical. Therefore, we solve numerically

Manipulate[
 Plot[Evaluate[
   y[t] /. First[
     NDSolve[{L*y''[t] == -R*y'[t] - C0*y[t] + V*Sin[t], y[0] == 0, 
       y'[0] == V}, y, {t, 0, 2*Pi}]]], {t, 0, 2*Pi}], {{L, 1*^-3}, 
  10^-6, 10*^-3}, {{R, 3*^3}, 1*^3, 10*^3}, {{C0, 3*^5}, 0, 
  10*^5}, {{V, 5}, 0, 10}]

fig1

Here is just the case when the exact solution is worse than numerical. Therefore, we solve numerically

 Manipulate[
 Plot[Evaluate[
   y[t] /. First[
     NDSolve[{L*y''[t] == -R*y'[t] - C0*y[t] + V*Sin[t], y[0] == 0, 
       y'[0] == V}, y, {t, 0, 2*Pi}]]], {t, 0, 2*Pi}], {{L, 1*^-3}, 
  10^-6, 10*^-3, Appearance -> "Labeled"}, {{R, 3*^3}, 1*^3, 10*^3, 
  Appearance -> "Labeled"}, {{C0, 3*^5}, 0, 10*^5, 
  Appearance -> "Labeled"}, {{V, 5}, 0, 10, Appearance -> "Labeled"}]

fig1

Source Link
Alex Trounev
  • 48.8k
  • 3
  • 51
  • 115

Here is just the case when the exact solution is worse than numerical. Therefore, we solve numerically

Manipulate[
 Plot[Evaluate[
   y[t] /. First[
     NDSolve[{L*y''[t] == -R*y'[t] - C0*y[t] + V*Sin[t], y[0] == 0, 
       y'[0] == V}, y, {t, 0, 2*Pi}]]], {t, 0, 2*Pi}], {{L, 1*^-3}, 
  10^-6, 10*^-3}, {{R, 3*^3}, 1*^3, 10*^3}, {{C0, 3*^5}, 0, 
  10*^5}, {{V, 5}, 0, 10}]

fig1