General Solution for Harmonic Oscillators
Author
Ernst Stelzer
Title
General Solution for Harmonic Oscillators
Description
A fairly complete analytic solution of the harmonic oscillator with many examples
Category
Educational Materials
Keywords
Analysis, differential equation, harmonic oscillator, analytic solution
URL
http://www.notebookarchive.org/2019-12-3pgskr1/
DOI
https://notebookarchive.org/2019-12-3pgskr1
Date Added
2019-12-08
Date Last Modified
2019-12-08
File Size
2.57 megabytes
Supplements
Rights
CC BY 4.0



General Analytic Solution for Harmonic Oscillator
General Analytic Solution for Harmonic Oscillator
Ernst H.K. Stelzer, Goethe-Universität Frankfurt am Main, August 2019
Initializations
Initializations
In[]:=
Needs["PlotLegends`"]
In[]:=
SetOptions[Plot,{BaseStyleDirective["Times",16],BackgroundLightBlue,PlotStyle{{Thick,Black},{Thick,Blue},{Thick,Green},{Thick,Red},{Thick,Orange}}}];
In[]:=
myLegend[title_,s1_,s2_,s3_,s4_,comment_:""]:=FramedLabeledGridStyle"▬▬▬ ",Black,Bold,18,Style[s1,FontFamily"Times",14],Style"▬▬▬ ",Blue,Bold,18,Style[s2,FontFamily"Times",14],Style"▬▬▬ ",Green,Bold,18,Style[s3,FontFamily"Times",14],Style"▬▬▬ ",Red,Bold,18,Style[s4,FontFamily"Times",14],{Style[comment,FontFamily"Times",14],SpanFromLeft},Spacings{1,1},Alignment{Left,Center},FrameAll,Style[title,FontFamily"Times",16,Black],Top,BackgroundLightBlue
In[]:=
dfltFontSans="Source Sans Pro";
In[]:=
placeFrameLegend[expr_:"expressions",pos_:{Left,Top}]:=Placed[LineLegend[expr,LegendFunction(Framed[Style[#,12],RoundingRadius5,BackgroundWhite]&),LegendMargins5],pos]
In[]:=
frameHarmonicOscillator[expr_,text_String]:=Framed[Labeled[expr,Style[text,Black,Bold,16,FontFamilydfltFontSans],Top,Alignment{Center,Center},FrameTrue],BackgroundNone]
In[]:=
optGraphics=Sequence[ImageSize{512,Automatic},BackgroundLightBlue,AxesOrigin{0,0},BaseStyle{16,FontFamilydfltFontSans,FontColorBlack},FrameStyleDirective[16,FontFamilydfltFontSans,FontColorBlack],AxesStyleDirective[16,FontFamilydfltFontSans,FontColorBlack],TicksStyleDirective[16,FontFamilydfltFontSans,FontColorBlack]];
In[]:=
optHarmonicOscillatorPlot=Sequence[optGraphics,PlotStyle{{Black},{Black,Dashed},{Gray},{Gray,Dashed}},Ticks{Table[{angle,angle//TraditionalForm},{angle,-8π,8π,π/2}],Table[{amplitude,amplitude//TraditionalForm},{amplitude,-8,8,1/2}]}];
References
References
Complete Solution
Complete Solution
Remove[x.,x0,x1,t,α,β,γ,δ,a,ω,ϕ,d0,d1,d2];
Universal oscillator equation
In[]:=
eqnHarmonicOscillator={δx.''[t]+γx.'[t]+βx.[t]+αaSin[ωt+ϕ],x.[0]x0,x.'[0]x1};assPhysics={α∈,β∈,γ∈,δ∈,a∈,ω>0,ϕ>0,x0∈,x1∈};
In[]:=
TraditionalForm[Style[eqnHarmonicOscillator[[1]],18]]
Out[]//TraditionalForm=
α+δ(t)+γ(t)+βx.(t)asin(tω+ϕ)
′′
x.
′
x.
Making sure, various different transformations are identical.
In[]:=
FullSimplify==t---4βδ,assPhysics
-γ--4βδt
2
γ
2δ
1
2
γ
δ
2
γ
δ
Out[]=
True
In[]:=
FullSimplifyt-+-4βδ,assPhysics
-γ+-4βδt
2
γ
2δ
1
2
γ
δ
2
γ
δ
Out[]=
True
In[]:=
simplificationsHarmOsc=,t---4βδ,,t-+-4βδ,-4βδd0;reinsertHarmOsc=Map[Reverse,simplificationsHarmOsc]
-γ--4βδt
2
γ
2δ
d1t
1
2
γ
δ
2
γ
δ
d1t
-γ+-4βδt
2
γ
2δ
d2t
1
2
γ
δ
2
γ
δ
d2t
2
γ
Out[]=
,t---4βδ,,t-+-4βδ,d0-4βδ
d1t
t-γ--4βδ
2
γ
2δ
d1t
1
2
γ
δ
2
γ
δ
d2t
t-γ+-4βδ
2
γ
2δ
d2t
1
2
γ
δ
2
γ
δ
2
γ
In[]:=
sol=FullSimplify[DSolve[eqnHarmonicOscillator,x.,t],AssumptionsassPhysics]
Out[]=
In[]:=
solutionHarmonicOscillator=FullSimplify[sol//.simplificationsHarmOsc,AssumptionsassPhysics]
Out[]=
x.Function{t},-(32(-αγ+αγ-x0γ+x0γ-2x1+2x1-2αd0+αd0+αd0+x0d0+x0d0-α+α-x0β+x0β+2αβγ-2αβγ+2x0γ-2x0γ-2x1β+2x1β+4x1-4x1-2αd0+αd0+αd0+x0βd0+x0βd0+4αβd0-2αβd0-2αβd0-2x0d0-2x0d0-αγ+αγ-x0βγ+x0βγ-2x1β+2x1β-2αd0+αd0+αd0+x0βd0+x0βd0-aβωCos[ϕ]+aβωCos[ϕ]+2aωCos[ϕ]-2aωCos[ϕ]+aβγd0ωCos[ϕ]+aβγd0ωCos[ϕ]-2aβCos[ϕ]+2aβCos[ϕ]-2aβγd0ωCos[ϕ+tω]+aγSin[ϕ]-aγSin[ϕ]-ad0Sin[ϕ]-ad0Sin[ϕ]+aβγSin[ϕ]-aβγSin[ϕ]+aβd0Sin[ϕ]+aβd0Sin[ϕ]+2ad0Sin[ϕ+tω]-2aβd0Sin[ϕ+tω]))-4βδ(-γ+d0)(γ+d0)(-γ+d0-2δω)(γ+d0-2δω)(-γ+d0+2δω)(γ+d0+2δω)
d1t
2
β
3
δ
d2t
2
β
3
δ
d1t
3
β
3
δ
d2t
3
β
3
δ
d1t
3
β
4
δ
d2t
3
β
4
δ
2
β
3
δ
d1t
2
β
3
δ
d2t
2
β
3
δ
d1t
3
β
3
δ
d2t
3
β
3
δ
d1t
3
γ
3
δ
2
ω
d2t
3
γ
3
δ
2
ω
d1t
3
γ
3
δ
2
ω
d2t
3
γ
3
δ
2
ω
d1t
4
δ
2
ω
d2t
4
δ
2
ω
d1t
2
β
4
δ
2
ω
d2t
2
β
4
δ
2
ω
d1t
2
γ
4
δ
2
ω
d2t
2
γ
4
δ
2
ω
d1t
2
β
5
δ
2
ω
d2t
2
β
5
δ
2
ω
2
γ
3
δ
2
ω
d1t
2
γ
3
δ
2
ω
d2t
2
γ
3
δ
2
ω
d1t
2
γ
3
δ
2
ω
d2t
2
γ
3
δ
2
ω
4
δ
2
ω
d1t
4
δ
2
ω
d2t
4
δ
2
ω
d1t
2
β
4
δ
2
ω
d2t
2
β
4
δ
2
ω
d1t
5
δ
4
ω
d2t
5
δ
4
ω
d1t
5
δ
4
ω
d2t
5
δ
4
ω
d1t
6
δ
4
ω
d2t
6
δ
4
ω
5
δ
4
ω
d1t
5
δ
4
ω
d2t
5
δ
4
ω
d1t
5
δ
4
ω
d2t
5
δ
4
ω
d1t
2
γ
3
δ
d2t
2
γ
3
δ
d1t
2
β
4
δ
d2t
2
β
4
δ
d1t
3
δ
d2t
3
δ
d1t
5
δ
3
ω
d2t
5
δ
3
ω
3
δ
d1t
2
β
3
δ
d2t
2
β
3
δ
d1t
2
β
3
δ
d2t
2
β
3
δ
d1t
4
δ
2
ω
d2t
4
δ
2
ω
d1t
4
δ
2
ω
d2t
4
δ
2
ω
2
β
3
δ
4
δ
2
ω
2
γ
In[]:=
numeratorHarmOsc=FullSimplify[Numerator[x.[t]/.solutionHarmonicOscillator],AssumptionsassPhysics]
Out[]=
{32(-(d0(-2++)α+d0(+)x0β-(-)(αγ+x0βγ+2x1βδ))(+)+aβSin[ϕ](d0(+)(β-δ)-(-)γ(β+δ)-2d0(β-δ)Cos[tω]-2d0γωSin[tω])+aβCos[ϕ](-d0(+)γω+(-)ω(+2δ(-β+δ))+2d0γωCos[tω]-2d0(β-δ)Sin[tω]))}
3
δ
d1t
d2t
d1t
d2t
d1t
d2t
2
γ
2
ω
2
(β-δ)
2
ω
d1t
d2t
2
ω
d1t
d2t
2
ω
2
ω
d1t
d2t
d1t
d2t
2
γ
2
ω
2
ω
In[]:=
denominatorHarmOsc=FullSimplify[Denominator[x.[t]/.solutionHarmonicOscillator],AssumptionsassPhysics]
Out[]=
(d0-γ)(d0+γ)-4βδ(d0-γ-2δω)(d0+γ-2δω)(d0-γ+2δω)(d0+γ+2δω)
2
γ
In[]:=
numeratorCollect=Collect[Collect[numeratorHarmOsc,{,}],{32}]
d1t
d2t
3
δ
Out[]=
{32(2d0α+2d0α-4d0αβδ+2d0α+2ad0βγωCos[ϕ]Cos[tω]-2ad0Cos[tω]Sin[ϕ]+2ad0βδCos[tω]Sin[ϕ]+(-d0α-d0x0+αγ+x0γ+2x1δ-d0α-d0x0β+α+x0β+2d0αβδ+2d0x0δ-2αβγδ-2x0γδ+2x1βδ-4x1-d0α-d0x0β+αγ+x0βγ+2x1β-ad0βγωCos[ϕ]+aβωCos[ϕ]-2aδωCos[ϕ]+2aβCos[ϕ]+ad0Sin[ϕ]-aγSin[ϕ]-ad0βδSin[ϕ]-aβγδSin[ϕ])+(-d0α-d0x0-αγ-x0γ-2x1δ-d0α-d0x0β-α-x0β+2d0αβδ+2d0x0δ+2αβγδ+2x0γδ-2x1βδ+4x1-d0α-d0x0β-αγ-x0βγ-2x1β-ad0βγωCos[ϕ]-aβωCos[ϕ]+2aδωCos[ϕ]-2aβCos[ϕ]+ad0Sin[ϕ]+aγSin[ϕ]-ad0βδSin[ϕ]+aβγδSin[ϕ])-2ad0Cos[ϕ]Sin[tω]+2ad0βδCos[ϕ]Sin[tω]-2ad0βγωSin[ϕ]Sin[tω])}
3
δ
2
β
2
γ
2
ω
2
ω
2
δ
4
ω
2
β
2
ω
d1t
2
β
3
β
2
β
3
β
3
β
2
γ
2
ω
2
γ
2
ω
3
γ
2
ω
3
γ
2
ω
2
ω
2
β
2
ω
2
ω
2
β
2
ω
2
γ
2
ω
2
β
2
δ
2
ω
2
δ
4
ω
2
δ
4
ω
2
δ
4
ω
2
δ
4
ω
3
δ
4
ω
2
γ
2
β
2
δ
3
ω
2
β
2
β
2
ω
2
ω
d2t
2
β
3
β
2
β
3
β
3
β
2
γ
2
ω
2
γ
2
ω
3
γ
2
ω
3
γ
2
ω
2
ω
2
β
2
ω
2
ω
2
β
2
ω
2
γ
2
ω
2
β
2
δ
2
ω
2
δ
4
ω
2
δ
4
ω
2
δ
4
ω
2
δ
4
ω
3
δ
4
ω
2
γ
2
β
2
δ
3
ω
2
β
2
β
2
ω
2
ω
2
β
2
ω
In[]:=
TraditionalForm@numeratorCollect
Out[]//TraditionalForm=
{32((-aγsin(ϕ)+αγ-2aδωcos(ϕ)+aβωcos(ϕ)-2αβγδ-aβγδsin(ϕ)+2aβcos(ϕ)+α+αγ+ad0sin(ϕ)-aβγd0ωcos(ϕ)-aβδd0sin(ϕ)-αd0+2αβδd0-αd0-αd0-d0x0+2δd0x0-βd0x0-βd0x0+γx0-2γδx0+βx0+βγx0+2δx1-4x1+2βδx1+2βx1)+(aγsin(ϕ)-αγ+2aδωcos(ϕ)-aβωcos(ϕ)+2αβγδ+aβγδsin(ϕ)-2aβcos(ϕ)-α-αγ+ad0sin(ϕ)-aβγd0ωcos(ϕ)-aβδd0sin(ϕ)-αd0+2αβδd0-αd0-αd0-d0x0+2δd0x0-βd0x0-βd0x0-γx0+2γδx0-βx0-βγx0-2δx1+4x1-2βδx1-2βx1)-2ad0sin(ϕ)cos(tω)-2ad0cos(ϕ)sin(tω)-2aβγd0ωsin(ϕ)sin(tω)+2aβγd0ωcos(ϕ)cos(tω)+2aβδd0sin(ϕ)cos(tω)+2aβδd0cos(ϕ)sin(tω)+2αd0-4αβδd0+2αd0+2αd0)}
3
δ
d1t
2
β
2
β
2
β
2
γ
2
ω
2
ω
2
δ
3
ω
3
γ
2
ω
2
δ
4
ω
2
β
2
ω
2
β
2
ω
2
γ
2
ω
2
δ
4
ω
3
β
2
β
2
ω
2
γ
2
ω
2
δ
4
ω
3
β
2
β
2
ω
3
γ
2
ω
2
δ
4
ω
3
β
2
β
2
δ
2
ω
2
γ
2
ω
3
δ
4
ω
d2t
2
β
2
β
2
β
2
γ
2
ω
2
ω
2
δ
3
ω
3
γ
2
ω
2
δ
4
ω
2
β
2
ω
2
β
2
ω
2
γ
2
ω
2
δ
4
ω
3
β
2
β
2
ω
2
γ
2
ω
2
δ
4
ω
3
β
2
β
2
ω
3
γ
2
ω
2
δ
4
ω
3
β
2
β
2
δ
2
ω
2
γ
2
ω
3
δ
4
ω
2
β
2
β
2
ω
2
ω
2
β
2
ω
2
γ
2
ω
2
δ
4
ω
In[]:=
(x=Function[t,(Evaluate[numeratorCollect/denominatorHarmOsc//.reinsertHarmOsc])])//TraditionalForm
Out[]//TraditionalForm=
t322α-4βδ+2aβδ-4βδcos(tω)sin(ϕ)+2aβδ-4βδcos(ϕ)sin(tω)+2α-4βδ-4αβδ-4βδ+2aβγ-4βδcos(ϕ)cos(tω)ω-2aβγ-4βδsin(ϕ)sin(tω)ω-2a-4βδcos(tω)sin(ϕ)+2x1β+αγ+x0βγ-α-4βδ-x0β-4βδ+2aβcos(ϕ)+α+x0β-4x1+2x1βδ-2x0γδ-2αβγδ-aβγδsin(ϕ)-aβδ-4βδsin(ϕ)-α-4βδ-x0β-4βδ+2x0δ-4βδ+2αβδ-4βδ+aβcos(ϕ)ω-2aδcos(ϕ)ω-aβγ-4βδcos(ϕ)ω+x0γ+αγ+2x1δ-aγsin(ϕ)+a-4βδsin(ϕ)-x0-4βδ-α-4βδ+-2x1β-αγ-x0βγ-α-4βδ-x0β-4βδ-2aβcos(ϕ)-α-x0β+4x1-2x1βδ+2x0γδ+2αβγδ+aβγδsin(ϕ)-aβδ-4βδsin(ϕ)-α-4βδ-x0β-4βδ+2x0δ-4βδ+2αβδ-4βδ-aβcos(ϕ)ω+2aδcos(ϕ)ω-aβγ-4βδcos(ϕ)ω-x0γ-αγ-2x1δ+aγsin(ϕ)+a-4βδsin(ϕ)-x0-4βδ-α-4βδ-2a-4βδcos(ϕ)sin(tω)+2α-4βδ-4βδ-4βδ-γγ+-4βδ-γ-2δω+-4βδγ-2δω+-4βδ-γ+2δω+-4βδγ+2δω+-4βδ
3
δ
2
δ
2
γ
4
ω
2
γ
2
ω
2
γ
2
ω
2
γ
2
γ
2
ω
2
γ
2
ω
2
γ
2
γ
2
β
2
γ
t-γ--4βδ
2
γ
2δ
3
δ
4
ω
2
δ
4
ω
2
δ
4
ω
2
δ
2
γ
4
ω
2
δ
2
γ
4
ω
2
δ
3
ω
3
γ
2
ω
3
γ
2
ω
2
β
2
δ
2
ω
2
γ
2
ω
2
β
2
ω
2
ω
2
ω
2
γ
2
ω
2
γ
2
γ
2
ω
2
γ
2
γ
2
ω
2
β
2
γ
2
ω
2
γ
2
ω
2
γ
2
β
2
γ
3
β
2
β
3
β
2
β
2
β
2
γ
3
β
2
γ
2
β
2
γ
t-4βδ-γ
2
γ
2δ
3
δ
4
ω
2
δ
4
ω
2
δ
4
ω
2
δ
2
γ
4
ω
2
δ
2
γ
4
ω
2
δ
3
ω
3
γ
2
ω
3
γ
2
ω
2
β
2
δ
2
ω
2
γ
2
ω
2
β
2
ω
2
ω
2
ω
2
γ
2
ω
2
γ
2
γ
2
ω
2
γ
2
γ
2
ω
2
β
2
γ
2
ω
2
γ
2
ω
2
γ
2
β
2
γ
3
β
2
β
3
β
2
β
2
β
2
γ
3
β
2
γ
2
β
2
γ
2
β
2
γ
2
β
2
γ
2
γ
2
γ
2
γ
2
γ
2
γ
2
γ
2
γ
In[]:=
undampedHarmonicOscillator=FullSimplify[x[t]/.reinsertHarmOsc/.γ0,assPhysics]
Out[]=
-αβ+αδ+-aωCos[ϕ])Sin+Cos((α+x0β)(β-δ)-aβSin[ϕ])+aβSin[ϕ+tω]
1
β(β-δ)
2
ω
2
ω
β
δ
(x1β-x1δ2
ω
t
β
δ
t
β
δ
2
ω
In[]:=
FullSimplify[x[t]/.reinsertHarmOsc/.γ0/.x00/.x10,assPhysics]
Out[]=
-αβ+αδ-a+Cos(α(β-δ)-aβSin[ϕ])+aβSin[ϕ+tω]
1
β(β-δ)
2
ω
2
ω
β
δ
ωCos[ϕ]Sint
β
δ
t
β
δ
2
ω
In[]:=
FullSimplify[x[t]/.reinsertHarmOsc/.γ0/.x00/.x10/.ϕ0,assPhysics]
Out[]=
α(β-δ)-1+Cos-a+aβSin[tω]
2
ω
t
β
δ
β
δ
ωSint
β
δ
β(β-δ)
2
ω
In[]:=
pos=First[Position[undampedHarmonicOscillator,Sin[_],∞]];FullSimplify[1/(undampedHarmonicOscillator[[Sequence@@Append[pos,1]]]/(2πt)),assPhysics]
Out[]=
2π
δ
β
In[]:=
pos=First[Position[undampedHarmonicOscillator,Cos[_],∞]];FullSimplify[1/(undampedHarmonicOscillator[[Sequence@@Append[pos,1]]]/(2πt)),assPhysics]
Out[]=
2πt
ϕ
Universal oscillator equation with no external force
Universal oscillator equation with no external force
In[]:=
replacementsHarmOscNoExtForce={δ1,γ2ζ,β1,α0,a0,ω0,ϕ0};assHarmOscNoExtForce=Join[{ζ∈},assPhysics];
In[]:=
x=Function[{t,ζ},(Evaluate[FullSimplify[numeratorHarmOsc//.reinsertHarmOsc//.replacementsHarmOscNoExtForce,assHarmOscNoExtForce]/FullSimplify[denominatorHarmOsc//.reinsertHarmOsc//.replacementsHarmOscNoExtForce,assHarmOscNoExtForce]])]
Out[]=
Function{t,ζ},x0
-tζ
-1+
Cosht2
ζ
-1+
+(x1+x0ζ)Sinht2
ζ
-1+
2
ζ
-1+
2
ζ
In[]:=
xP1=Limit[x[t,ζ],ζ1]
Out[]=
{(x0+tx0+tx1)}
-t
In[]:=
xM1=Limit[x[t,ζ],ζ-1]
Out[]=
{(x0-tx0+tx1)}
t
In[]:=
frameHarmonicOscillator[#,"Universal oscillator with no external force"]&@PlotEvaluate{0,xP1,x[t,0],xM1}/.x01
2
,x112
,{t,-π,2π},PlotRange2,PlotLegendsplaceFrameLegend[{"zero F","ζ → 1","ζ → 0","ζ → -1"},{Right,Top}],Release@optHarmonicOscillatorPlotOut[]=
Universal oscillator with no external force |
In[]:=
frameHarmonicOscillator[#,"Universal oscillator with no external force"]&@PlotEvaluate{0,x[t,0.05],x[t,0.0],x[t,-0.05]}/.x01
2
,x112
,{t,0,8π},Ticks{Table[{angle,angle//TraditionalForm},{angle,-8π,8π,π}],Table[{amplitude,amplitude//TraditionalForm},{amplitude,-8,8,1}]},PlotRangeAll,PlotLegendsplaceFrameLegend[{"zero F","ζ → 0.05","ζ → 0.00","ζ → -0.05"},{0.16,Bottom}],Release@optHarmonicOscillatorPlotOut[]=
Universal oscillator with no external force |
Universal oscillator equation with external force
Universal oscillator equation with external force
In[]:=
uoe={δ1,γ2ζ,β1,α0,a1,ω1};
In[]:=
x=Function[{t,ζ},(Evaluate[FullSimplify[numer//.reinsert//.uoe,ass]/FullSimplify[denom//.reinsert//.uoe,ass]])]
Out[]=
Function{t,ζ},--2x0ζx0ζ(2ζ(x1+x0ζ)+ζCos[ϕ]-Sin[ϕ])
1
4ζ
-1+
2
ζ
-tζ+
-1+
2
ζ
-1+
-22
ζ
2t
-1+
2
ζ
-1+
-2
ζ
-1+
Cos[ϕ]-2
ζ
2t
-1+
2
ζ
-1+
Cos[ϕ]+22
ζ
tζ+
-1+
2
ζ
-1+
Cos[t+ϕ]--1+2
ζ
2t
-1+
2
ζ
In[]:=
xP1=FullSimplify[Limit[x[t,ζ],ζ1],ass]
Out[]=
(2(x0+tx0+tx1)+(1+t)Cos[ϕ]-Cos[t+ϕ]-tSin[ϕ])
1
2
-t
t
In[]:=
xM1=FullSimplify[Limit[x[t,ζ],ζ-1],ass]
Out[]=
(Cos[t+ϕ]+(2(x0-tx0+tx1)+(-1+t)Cos[ϕ]+tSin[ϕ]))
1
2
t
In[]:=
x00=FullSimplify[Limit[x[t,ζ],ζ0],ass]
Out[]=
x0Cos[t]+(-tCos[t+ϕ]+(2x1+Cos[ϕ])Sin[t])
1
2
In[]:=
TrigExpand[x00]//TrigFactor
Out[]=
(4x0Cos[t]-2tCos[t+ϕ]+4x1Sin[t]+Sin[t-ϕ]+Sin[t+ϕ])
1
4
In[]:=
FramedLabeledPlotEvaluate{Sin[t+ϕ],xP1,x00,xM1}/.x01
2
,x112
,ϕπ2,{t,-π,6π},PlotRange2,PlotLegend{Style["sin(t+π/2)",14],Style["ζ == 1",14],Style["ζ == 0",14],Style["ζ == -1",14]},LegendPosition{0.3,0.3},LegendSize{0.6,0.33},LegendShadow{.02,-.02},LegendBackgroundLightGray,Style["Universal oscillator equation with external force",FontFamily"Times",16,Black],Top,FrameTrue,BackgroundLightGrayOut[]=
Universal oscillator equation with external force |
In[]:=
PlotEvaluate{Sin[t+ϕ],xP1,x00,xM1}/.x01
2
,x112
,ϕπ2,{t,-π,6π},PlotRange2,PlotLegend{Style["Sin[t+π/2]",14],Style["ζ == 1",14]},LegendPosition{0.3,0.3},LegendSize{0.6,0.3},LegendShadow{.02,-.02}Out[]=
In[]:=
PlotEvaluate{Sin[t+ϕ],FullSimplify[Limit[x[t,ζ],ζ1/2],ass],x00,FullSimplify[Limit[x[t,ζ],ζ-1/2],ass]}/.x01
2
,x112
,ϕπ2,{t,-π,4π},PlotRange6Out[]=
In[]:=
PlotEvaluate{Sin[t+ϕ],FullSimplify[Limit[x[t,ζ],ζ1/2],ass],x00,FullSimplify[Limit[x[t,ζ],ζ-1/2],ass]}/.x01
2
,x112
,ϕπ2,{t,-π,12π},PlotRange6Out[]=
In[]:=
PlotEvaluate{FullSimplify[Limit[x[t,ζ],ζ1/2],ass],FullSimplify[Limit[x[t,ζ],ζ0],ass],FullSimplify[Limit[x[t,ζ],ζ-1/2],ass]}/.x01
2
,x112
,ϕπ2,{t,-π,6π},PlotRange10,BaseStyleDirective["Times",16],BackgroundLightBlue,PlotStyle{{Thick,Blue},{Thick,Green},{Thick,Red},{Thick,Orange}}Out[]=
In[]:=
PlotEvaluate{FullSimplify[Limit[x[t,ζ],ζ1/2],ass],FullSimplify[Limit[x[t,ζ],ζ0],ass],FullSimplify[Limit[x[t,ζ],ζ-1/2],ass]}/.x01
2
,x112
,ϕπ2,{t,-π,8π},PlotRangeAll,BaseStyleDirective["Times",16],BackgroundLightBlue,PlotStyle{{Thick,Blue},{Thick,Green},{Thick,Red},{Thick,Orange}}Out[]=
Simple Pendulum no external force
Simple Pendulum no external force
Simple mathematical pendulum, no friction, no external force is applied. The differential equation is only valid for small angles. l refers to the length of the pendulum and g to the gravitational accelartion.
In[]:=
smplPndlm={δ1,γ0,βg/l,α0,a0,ω0};assPndlm=Join[ass,{g>0,l>0}];
In[]:=
pndlm=Function[{t,g,l},(Evaluate[FullSimplify[FullSimplify[numer//.reinsert//.smplPndlm,assPndlm]/FullSimplify[denom//.reinsert//.smplPndlm,assPndlm],assPndlm]])]
Out[]=
Function{t,g,l},x0Cost+
g
l
lx1Sint
g
l
gl
If the pendulum is lifted to a height of 1 and then released it follows a sine wave.
In[]:=
pndlm[t,g,l]/.{x01,x10,ϕπ/2}
Out[]=
Cost
g
l
The time period depends only the length of the pendulum l and the gravitation constant g.
In[]:=
pos=First[Position[pndlm[t,g,l],Sin[_],∞]];FullSimplify[1/(pndlm[t,g,l][[Sequence@@Append[pos,1]]]/(2πt)),assPndlm]
Out[]=
2π
l
g
In[]:=
%//TraditionalForm
Out[]//TraditionalForm=
2π
l
g
In the plot below, the sinusoidal function is not visible, since it is covered by the blue line. Increasing the length of the pendulum by a factor four halves the frequency while decreasing the length of the pendulum to one quarter doubles the frequency.
In[]:=
Row[{Framed[Plot[Evaluate[({Sin[t+ϕ],pndlm[t,1,1],pndlm[t,1,4],pndlm[t,1,1/4]}/.{x01,x10,ϕπ/2})],{t,0,6π},PlotRangeAutomatic,ImageSize384]]," ",myLegend["Simple Pendulum","sin(t+π/2)","l = 1","l = 4","l = 1/4","no friction, no external forces"]},FrameTrue]
Out[]=
Simple Pendulum | ||||||||||
|
Simple Pendulum Undamped Sinusoidal Force
Simple Pendulum Undamped Sinusoidal Force
Simple mathematical Pendulum, no friction, but an sinusoidal external force is applied. The differential equation is only valid for small angles. l refers to the length of the pendulum and g to the gravitational acceleration.
In[]:=
smplPndlmSF={δ1,γ0,βg/l,α0};assPndlmSF=Join[ass,{g>0,l>0,a>0}];
The function depends also on the amplitude of the sinusoidal force a and on the the frequency ω.
In[]:=
pndlmSF=Function[{t,g,l,a,ω},(Evaluate[FullSimplify[FullSimplify[numer//.reinsert//.smplPndlmSF,assPndlmSF]/FullSimplify[denom//.reinsert//.smplPndlmSF,assPndlmSF],assPndlmSF]])]
Out[]=
Function{t,g,l,a,ω},-alωCos[ϕ])Sint+gCost(x0(g-l)-alSin[ϕ])+aglSin[ϕ+tω]
1
g(g-l)
2
ω
gl
(gx1-lx12
ω
g
l
g
l
2
ω
The initial conditions assume that the mass of the pendulum is lifted to a height 1 and then released.
In[]:=
FullSimplify[pndlmSF[t,g,l,a,ω]/.{x01,x10,ϕπ/2},assPndlmSF]
Out[]=
(g-l(a+))Cost+alCos[tω]
2
ω
g
l
g-l
2
ω
The external force is a sinus. If the pendulum has the same frequency as the external force, the amplitude grows continuously, linearly with time.
In[]:=
FullSimplify[Limit[pndlmSF[t,1,1,1,ω],ω1]/.{x01,x10,ϕπ/2},assPndlmSF]
Out[]=
Cos[t]+tSin[t]
1
2
If the frequency is smaller or larger but in phase, the pendulum’s movement deviates from a perfect sinus and becomes distorted.
In[]:=
Row[{Framed[Plot[Evaluate[({Sin[t+ϕ],Limit[pndlmSF[t,1,1,1,ω],ω1],pndlmSF[t,1,1,1,1/2],pndlmSF[t,1,1,1,2]}/.{x01,x10,ϕπ/2})],{t,-π,12π},PlotRange3,ImageSize384]]," ",myLegend["Simple Pendulum","sin(t+π/2)","ω = 1","ω = 1/2","ω = 2","no friction, sinusoidal force\ninitially in phase"]},FrameTrue]
Out[]=
Simple Pendulum | ||||||||||
|
In[]:=
Row[{Framed[Plot[Evaluate[({Sin[t+ϕ],Limit[pndlmSF[t,1,1,1,ω],ω1],pndlmSF[t,1,1,1,1/2],pndlmSF[t,1,1,1,2]}/.{x01,x10,ϕπ/2})],{t,-π,12π},PlotRangeAll,ImageSize384]]," ",myLegend["Simple Pendulum","sin(t+π/2)","ω = 1","ω = 1/2","ω = 2","no friction, sinusoidal force\ninitially in phase"]},FrameTrue]
Out[]=
Simple Pendulum | ||||||||||
|
Simple Pendulum Damped Sinusoidal Force
Simple Pendulum Damped Sinusoidal Force
Simple mathematical Pendulum, with friction and a sinusoidal external force is applied. The differential equation is only valid for small angles. l refers to the length of the pendulum and g to the gravitational acceleration.
In[]:=
smplPndlmDSF={δ1,βg/l,α0};assPndlmDSF=Join[ass,{g>0,l>0,γ>0}];
In[]:=
pndlmDSF=Function[{t,g,l,a,ω,γ},(Evaluate[FullSimplify[FullSimplify[numer//.reinsert//.smplPndlmDSF,assPndlmDSF]/FullSimplify[denom//.reinsert//.smplPndlmDSF,assPndlmDSF],assPndlmDSF]])]
Out[]=
Function{t,g,l,a,ω,γ},--t-2gl+(+))+al(-gSin[ϕ]+lω(γCos[ϕ]+ωSin[ϕ])))+a)Sin[ϕ+tω])-((2x1+x0γ)(-2gl+(+))+alω(-2g+l(+2))Cos[ϕ]-alγ(g+l)Sin[ϕ])Sinht-2gl+(+))
-
tγ
2
-+
Cosh4g
l
2
γ
1
2
-+
(x0(4g
l
2
γ
2
g
2
ω
2
l
2
ω
2
γ
2
ω
tγ
2
l(-4g+l)
(lγωCos[ϕ+tω]+(-g+l2
γ
2
ω
2
g
2
ω
2
l
2
ω
2
γ
2
ω
2
γ
2
ω
2
ω
1
2
-+
4g
l
2
γ
-+
(4g
l
2
γ
2
g
2
ω
2
l
2
ω
2
γ
2
ω
The initial conditions assume that the mass of the pendulum is lifted to a height 1 and then released.
In[]:=
FullSimplify[pndlmDSF[t,g,l,a,ω,γ]/.{x01,x10,ϕπ/2},assPndlmDSF]
Out[]=
--+(a++)-gl(a+2))Cosht)Cos[tω]+lγωSin[tω])-γ(+(-a++)-gl(a+2))Sinht-2gl+(+))
-
tγ
2
-+
(4g
l
2
γ
2
g
2
l
2
ω
2
γ
2
ω
2
ω
1
2
-+
-a4g
l
2
γ
tγ
2
l(-4g+l)
((g-l2
γ
2
ω
2
g
2
l
2
ω
2
γ
2
ω
2
ω
1
2
-+
4g
l
2
γ
-+
(4g
l
2
γ
2
g
2
ω
2
l
2
ω
2
γ
2
ω
The term is resposnible for damoing certain expressions. Replacing it by zero allows us to determine the long term behaviour of the system. The main effect is that a pure sinusoidal function develops that is undistorted.
-t/2
In[]:=
expr=(FullSimplify[pndlmDSF[t,1,1,1,ω,1]/.{x01,x10,ϕπ/2},assPndlmDSF]//Expand)/.0//TrigReduce//First
-t/2
Out[]=
Cos[tω]-Cos[tω]+ωSin[tω]
2
ω
1-+
2
ω
4
ω
In[]:=
Together[FullSimplify[FourierTransform[expr,t,],{>0,ω>0}]]
ω
0
ω
0
Out[]=
-DiracDelta[-ω+]
π
2
ω
0
-1+ω+
2
ω
In[]:=
(FullSimplify[pndlmDSF[t,1,1,1,1,1]/.{x01,x10,ϕπ/2},assPndlmDSF]//Expand)/.0//TrigReduce
-t/2
Out[]=
{Sin[t]}
Higher frequencies also return sinusoidal functions but with a smaller amplitude.
In[]:=
expr1=(FullSimplify[pndlmDSF[t,1,1,1,2,1]/.{x01,x10,ϕπ/2},assPndlmDSF]//Expand)/.0//TrigReduce
-t/2
Out[]=
(-3Cos[2t]+2Sin[2t])
1
13
In[]:=
sol1=FindMinimum[-expr1,{t,30.0}]
Out[]=
{-0.27735,{t23.2679}}
In[]:=
3/13//N
Out[]=
0.230769
Lower frequencies also result in sinusoidal functions but have a slightly higher amplitude than initially and than the external sinusoidal force. In the case below the amplitude is almost 11% larger.
In[]:=
expr2=(FullSimplify[pndlmDSF[t,1,1,1,1/2,1]/.{x01,x10,ϕπ/2},assPndlmDSF]//Expand)/.0//TrigReduce
-t/2
Out[]=
3Cos+2Sin
4
13
t
2
t
2
In[]:=
sol2=FindMinimum[-expr2,{t,14.0}]
Out[]=
{-1.1094,{t13.7424}}
In[]:=
FourierCosSeries[First[expr2],t,1]//N
Out[]=
0.979415+0.130589Cos[t]
In[]:=
FourierCosSeries[First[expr2],t,3]//N
Out[]=
0.979415+0.130589Cos[t]-0.130589Cos[2.t]+0.0111933Cos[3.t]
In[]:=
Row[{Framed[Plot[Evaluate[({Sin[t+ϕ],Limit[pndlmDSF[t,1,1,1,ω,1],ω1],pndlmDSF[t,1,1,1,1/2,1],pndlmDSF[t,1,1,1,2,1]}/.{x01,x10,ϕπ/2})],{t,0,8π},PlotRange1.2,ImageSize384,Epilog{Green,Line[{{0,sol2[[1]]},{8π,sol2[[1]]}}],Line[{{0,-sol2[[1]]},{8π,-sol2[[1]]}}],Red,Line[{{0,sol1[[1]]},{8π,sol1[[1]]}}],Line[{{0,-sol1[[1]]},{8π,-sol1[[1]]}}]}]]," ",myLegend["Simple Pendulum","sin(t+π/2)","ω = 1","ω = 1/2","ω = 2","friction, sinusoidal force\ninitially in phase"]},FrameTrue]
Out[]=
Simple Pendulum | ||||||||||
|
In[]:=
Row[{Framed[Plot[Evaluate[({Sin[t+ϕ],Limit[pndlmDSF[t,1,1,1,ω,1],ω1],pndlmDSF[t,1,1,1,1/2,1],pndlmDSF[t,1,1,1,2,1]}/.{x01,x10,ϕ0})],{t,0,8π},PlotRange1.2,ImageSize384,Epilog{Green,Line[{{0,sol2[[1]]},{8π,sol2[[1]]}}],Line[{{0,-sol2[[1]]},{8π,-sol2[[1]]}}],Red,Line[{{0,sol1[[1]]},{8π,sol1[[1]]}}],Line[{{0,-sol1[[1]]},{8π,-sol1[[1]]}}]}]]," ",myLegend["Simple Pendulum","sin(t+π/2)","ω = 1","ω = 1/2","ω = 2","friction, sinusoidal force\ninitially out of phase"]},FrameTrue]
Out[]=
Simple Pendulum | ||||||||||
|
The friction influences the amplitude but not the phase.
In[]:=
((FullSimplify[pndlmDSF[t,1,1,1,1,γ]/.{x01,x10,ϕπ/2},assPndlmDSF])//Expand)
Out[]=
Cosht-+γSinht
-
tγ
2
1
2
-4+
+2
γ
Sin[t]
γ
2Sinht
-
tγ
2
1
2
-4+
2
γ
γ
-4+
2
γ
-
tγ
2
1
2
-4+
2
γ
-4+
2
γ
In[]:=
%/.0
-tγ/2
Out[]=
Sin[t]
γ
In[]:=
Row[{Framed[Plot[Evaluate[({Sin[t+ϕ],Limit[pndlmDSF[t,1,1,1,ω,1],ω1],Limit[pndlmDSF[t,1,1,1,ω,3],ω1],Limit[pndlmDSF[t,1,1,1,ω,1/2],ω1]}/.{x01,x10,ϕπ/2})],{t,0,8π},PlotRange3,ImageSize384]]," ",myLegend["Simple Pendulum","sin(t+π/2)","γ = 1","γ = 3","γ = 1/2","different frictions\nsinusoidal force\ninitially in phase"]},FrameTrue]
Out[]=
Simple Pendulum | ||||||||||
|
In[]:=
Row[{Framed[Plot[Evaluate[({Sin[t+ϕ],Limit[pndlmDSF[t,1,1,1,ω,1],ω1],Limit[pndlmDSF[t,1,1,1,ω,3],ω1],Limit[pndlmDSF[t,1,1,1,ω,1/2],ω1]}/.{x01,x10,ϕ0})],{t,0,8π},PlotRange3,ImageSize384]]," ",myLegend["Simple Pendulum","sin(t+π/2)","γ = 1","γ = 3","γ = 1/2","different frictions\nsinusoidal force\ninitially out of phase"]},FrameTrue]
Out[]=
Simple Pendulum | ||||||||||
|
Tasks
Tasks
What happens when the amplitude of the external force is not identical to the inition condition?
What happens when the amplitude of the external force is modulated or simply changed?
What happens when the frequency of the external force is modulated?
Series RLC with external constant source
Series RLC with external constant source
In[]:=
SetOptions[Plot,{BaseStyleDirective["Times",16],BackgroundLightBlue,PlotStyle{{Thick,Black},{Thick,Blue},{Thick,Green},{Thick,Red},{Thick,Orange}}}];
In[]:=
rlce={δrL,γrR,β(1/rC),α0,a1,ω0};rlceAss=Join[ass,{rL>0,rR>0,rC>0}];
In[]:=
q=Function[{t,rL,rR,rC},(Evaluate[FullSimplify[numer//.reinsert//.rlce,rlceAss]/FullSimplify[denom//.reinsert//.rlce,rlceAss]])]
Out[]=
Function{t,rL,rR,rC},(rRx0+2rLx1)-rC-1+rR+1+-2
1
2
-4rL+rC
2
rR
-
rR+
-+
t4rL
rC
2
rR
2rL
rC
-rRx0+-+
x0+4rL
rC
2
rR
-+
t4rL
rC
2
rR
rL
-+
x0-2rLx1+4rL
rC
2
rR
-+
t4rL
rC
2
rR
rL
-+
t4rL
rC
2
rR
rL
-+
t4rL
rC
2
rR
rL
rRt+
-+
t4rL
rC
2
rR
2rL
-+
Sin[ϕ]4rL
rC
2
rR
In[]:=
rlceUndamped=FullSimplify[Limit[q[t,rL,rR,rC],rR0],rlceAss]
Out[]=
+rCSin[ϕ]+Cos(x0-rCSin[ϕ])
rCrL
x1Sint
rCrL
t
rCrL
In[]:=
pos=First[Position[rlceUndamped,Sin[_],∞]];FullSimplify[1/(rlceUndamped[[Sequence@@Append[pos,1]]]/(2πt)),rlceAss]
Out[]=
2π
rCrL
In[]:=
FramedLabeledPlotEvaluate{Sin[t+ϕ],q[t,1,0,1],q[t,1/2,0,1],q[t,1,0,1/2]}/.x01
2
,x112
,ϕπ2,{t,-π,6π},PlotRange2,PlotLegend{Style["sin(t+π/2)",14],Style["L=1, C=1",14],Style["L=1/2, C=1",14],Style["L=1, C=1/2",14]},LegendPosition{0.2,-0.58},LegendSize{0.66,0.33},LegendShadow{.02,-.02},LegendBackgroundLightGray,Style["Series RLC with external constant source, R = 0",FontFamily"Times",16,Black],Top,FrameTrue,BackgroundLightGrayOut[]=
Series RLC with external constant source, R = 0 |
In[]:=
FramedLabeledPlotEvaluate{Sin[t+ϕ],q[t,1,0,1],q[t,1/2,0,1],q[t,1,0,1/2]}/.x01
2
,x112
,ϕπ2,{t,-π,6π},PlotRange2,PlotLegend{Style["sin(t+π/2)",14],Style["L=1, C=1",14],Style["L=1/2, C=1",14],Style["L=1, C=1/2",14]},LegendPosition{0.2,-0.58},LegendSize{0.66,0.33},LegendShadow{.02,-.02},LegendBackgroundLightGray,Style["Series RLC with external constant source, R = 0",FontFamily"Times",16,Black],Top,FrameTrue,BackgroundLightGrayOut[]=
Series RLC with external constant source, R = 0 |
In[]:=
FramedLabeledPlotEvaluate{0,q[t,1,0,1],q[t,1,1/4,1],Limit[q[t,1,rR,1],rR2]}/.x01
2
,x112
,ϕπ2,{t,-π,6π},PlotRange2,PlotLegend{Style["sin(t+π/2)",14],Style["L=1,R=0,C=1",14],Style["L=1,R=1/4,C=1",14],Style["L=1,R=2,C=1",14]},LegendPosition{0.0,-0.55},LegendSize{0.95,0.33},LegendShadow{.02,-.02},LegendBackgroundLightGray,Style["Series RLC with external constant source",FontFamily"Times",16,Black],Top,FrameTrue,BackgroundLightGrayOut[]=
Series RLC with external constant source |
Series RLC with external oscillating source
Series RLC with external oscillating source
In[]:=
SetOptions[Plot,{BaseStyleDirective["Times",16],BackgroundLightBlue,PlotStyle{{Thick,Black},{Thick,Blue},{Thick,Green},{Thick,Red},{Thick,Orange}}}];
In[]:=
rlco={δrL,γrR,β(1/rC),α0};rlcoAss=Join[ass,{rL>0,rR>0,rC>0}];
In[]:=
q=Function[{t,rL,rR,rC,a,ω},(Evaluate[FullSimplify[numer//.reinsert//.rlco,rlcoAss]/FullSimplify[denom//.reinsert//.rlco,rlcoAss]])]
Out[]=
Function{t,rL,rR,rC,a,ω},--(x0+rC(-2rL+rC)x0+x0+arC(rCrRωCos[ϕ]+(-1+rCrL)Sin[ϕ]))+a)Sin[ϕ+tω])-((rRx0+2rLx1)(1+rC(rC+rL(-2+rCrL)))+arCω(rC+2rL(-1+rCrL))Cos[ϕ]-arCrR(1+rCrL)Sin[ϕ])Sinh(rC+rL(-2+rCrL)))
-
rRt
2rL
-+
Cosh4rL
rC
2
rR
-+
t4rL
rC
2
rR
2rL
2
rR
2
ω
2
rC
2
rL
4
ω
2
ω
rRt
2rL
rC(-4rL+rC)
(rCrRωCos[ϕ+tω]+(-1+rCrL2
rR
2
ω
2
ω
2
rR
2
ω
2
rR
2
ω
2
ω
-+
t4rL
rC
2
rR
2rL
-+
(1+rC4rL
rC
2
rR
2
ω
2
rR
2
ω
In[]:=
rlcoUndamped=FullSimplify[Limit[q[t,rL,rR,rC,ω,a],rR0],rlcoAss]
Out[]=
rCrLx1+arCωCos[ϕ])Sin+Cos((-1+rCrL)x0+rCωSin[ϕ])-rCωSin[at+ϕ]
1
-1+rCrL
2
a
rCrL
(-x1+2
a
t
rCrL
t
rCrL
2
a
In[]:=
pos=First[Position[rlcoUndamped,Sin[_],∞]];FullSimplify[1/(rlcoUndamped[[Sequence@@Append[pos,1]]]/(2πt)),rlcoAss]
Out[]=
2π
rCrL
In[]:=
TrigExpand[FullSimplify[q[t,1,1,1,1,1]/.{x01,x10,ϕπ/2}]]
Out[]=
Cos+Sin[t]-Sin
-t/2
3
t2
-t/2
3
t2
3
In[]:=
%/.0
-t/2
Out[]=
{Sin[t]}
In[]:=
FramedLabeledPlotEvaluate{Sin[t+ϕ],q[t,1,0,1,1,2],q[t,1/2,0,1,1,1],q[t,1,0,1/2,1,1]}/.x01
2
,x112
,ϕπ2,{t,-π,12π},PlotRange3,PlotLegend{Style["sin(t+π/2)",14],Style["L=1, C=1",14],Style["L=1/2, C=1",14],Style["L=1, C=1/2",14]},LegendPosition{0.2,-0.58},LegendSize{0.66,0.33},LegendShadow{.02,-.02},LegendBackgroundLightGray,Style["Series RLC with external oscillator source, R = 0, ω=a=1",FontFamily"Times",16,Black],Top,FrameTrue,BackgroundLightGrayOut[]=
Series RLC with external oscillator source, R = 0, ω=a=1 |
In[]:=
Framed[Labeled[Plot[Evaluate[({Sin[t+ϕ],q[t,1,1,1,1,1],q[t,1,1,1,1,2],q[t,1,1,1,1,1/2]}/.{x01,x10,ϕπ/2})],{t,-π,6π},PlotRange2,PlotLegend{Style["sin(t+π/2)",14],Style["L=1, C=1",14],Style["L=1/2, C=1",14],Style["L=1, C=1/2",14]},LegendPosition{0.2,-0.58},LegendSize{0.66,0.33},LegendShadow{.02,-.02},LegendBackgroundLightGray],Style["Series RLC with external oscillating source",FontFamily"Times",16,Black],Top,FrameTrue],BackgroundLightGray]
Out[]=
Series RLC with external oscillating source |
In[]:=
Framed[Labeled[Plot[Evaluate[({Sin[t+ϕ],q[t,1,1,1,1,1],q[t,1/2,1,1,1,1],q[t,1/8,1,1,1,1]}/.{x01,x10,ϕπ/2})],{t,-π,6π},PlotRange2,PlotLegend{Style["sin(t+π/2)",14],Style["L=1, C=1",14],Style["L=1/2, C=1",14],Style["L=1, C=1/2",14]},LegendPosition{0.2,-0.58},LegendSize{0.66,0.33},LegendShadow{.02,-.02},LegendBackgroundLightGray],Style["Series RLC with external oscillating source",FontFamily"Times",16,Black],Top,FrameTrue],BackgroundLightGray]
Out[]=
Series RLC with external oscillating source |
In[]:=
LogLogPlot[Evaluate[({q[10,1/2,1,1,1,ω],Limit[q[10,rL,1,1,1,ω],rL1/4],q[10,1/16,1,1,1,ω]}/.{x01,x10,ϕπ/2})],{ω,0.01,10.0},PlotRange2,PlotLegend{Style["sin(t+π/2)",14],Style["L=1, C=1",14],Style["L=1/2, C=1",14],Style["L=1, C=1/2",14]},LegendPosition{-0.8,-0.45},LegendSize{0.66,0.33},LegendShadow{.02,-.02},LegendBackgroundLightGray]
Out[]=
In[]:=
LogLogPlot[Evaluate[({q[10,1/2,1,1,1,ω],Limit[q[10,rL,2,1,1,ω],rL1/4],q[10,1/16,4,1,1,ω]}/.{x01,x10,ϕπ/2})],{ω,0.01,0.15},PlotRange2,PlotLegend{Style["sin(t+π/2)",14],Style["L=1, C=1",14],Style["L=1/2, C=1",14],Style["L=1, C=1/2",14]},LegendPosition{-0.8,-0.45},LegendSize{0.66,0.33},LegendShadow{.02,-.02},LegendBackgroundLightGray]
Out[]=
In[]:=
Framed[Labeled[Plot[Evaluate[({Sin[t+ϕ],q[t,1,1,1,1,1],q[t,1/2,1,1,1,1],q[t,1/8,1,1,1,1]}/.{x01,x10,ϕπ/2})],{t,-π,6π},PlotRange2,PlotLegend{Style["sin(t+π/2)",14],Style["L=1, C=1",14],Style["L=1/2, C=1",14],Style["L=1, C=1/2",14]},LegendPosition{0.2,-0.58},LegendSize{0.66,0.33},LegendShadow{.02,-.02},LegendBackgroundLightGray],Style["Series RLC with external oscillating source",FontFamily"Times",16,Black],Top,FrameTrue],BackgroundLightGray]
Out[]=
Series RLC with external oscillating source |


Cite this as: Ernst Stelzer, "General Solution for Harmonic Oscillators" from the Notebook Archive (2019), https://notebookarchive.org/2019-12-3pgskr1

Download

