Sie sind auf Seite 1von 4

3/3/2019 differential equations - Driven simple harmonic oscillator — amplitude of steady state motion - Mathematica Stack Exchange

Mathematica Stack Exchange is a question and answer site for


users of Wolfram Mathematica. Join them; it only takes a
minute:

Sign up

Here's how it works:


Anybody can ask a question
Anybody can answer
The best answers are voted up and rise to the top

Driven simple harmonic oscillator — amplitude of Ask Question

steady state motion

I am (partly as an exercise to
understand Mathematica) trying to
8 model the response of a damped
simple harmonic oscillator to a
sinusoidal driving force. I can solve
the differential equation with some
arbitrarily chosen boundary
conditions, and get a nice graph;

params = {ν1 -> 1.0, ω1 -> 10.0, F -> 4.0};


system =
{D[x1[t], {t, 2}] == -ν1 D[x1[t], t] - ω1^2 x1[t] + F Cos[ω t], x1[0] == 1, x1'[0] ==
0};
soln = DSolve[system /. params, x1[t], t][[1]][[1]];
Plot[x1[t] /. soln /. ω -> 8, {t, 1, 20}, Frame -> True, Axes -> False]

But I don't care about the transients -


I just care about the steady state
situation. I tried using Limit to extract
this;

By using our site,amp


you=acknowledge that you have
Table[Max[Limit[x1[t] /.read andt understand
soln, our1,Cookie
-> ∞]], {ω, Policy, Privacy Policy, and our
20, 1}]
Terms of Service.ListPlot[amp]

https://mathematica.stackexchange.com/questions/58631/driven-simple-harmonic-oscillator-amplitude-of-steady-state-motion 1/4
3/3/2019 differential equations - Driven simple harmonic oscillator — amplitude of steady state motion - Mathematica Stack Exchange

Looks a bit peculiar to me. Also, this


is incredibly slow, and doesn't work
symbolically.

I thought I could do something along


the lines of forcing it to take as a
solution of the DE aS in(ωt + ϕ);

params = {ν1 -> 40.0, ω1 -> 10.0, F -> 10.0};


x1 = a Sin[ω t + ϕ];
system = D[x1, {t, 2}] == -ν1 D[x1, t] - ω1^2 x1 + F Cos[ω t]
amp = Solve[system /. params, a]
phase = Solve[D[a /. amp, t] == 0, ϕ][[1]][[1]]

but this just turns into a mess and


doesn't give the right result either.

Is there a canonical way to tackle this


sort of problem? I don't really know
what I'm doing with Mathematica yet,
so any explanations would be
gratefully received.

differential-equations

edited Sep 2 '14 at 14:00


m_goldberg
86.9k 8 72 197

asked Sep 1 '14 at 18:02


NLambert
101 2 8

What I would consider the canonical


approach to a steady-state problem is
to go to the Fourier domain and
convert the differential equation to an
algebraic one for the amplitude. Is this
something you want, or are you
determined to use the differential-
equation approach? – Jens Sep 2 '14
at 4:21

2 Answers

By using our site, params


you acknowledge thatω1you
= {ν1 -> 1, -> have
10, Fread
-> and
4}; understand our Cookie Policy, Privacy Policy, and our
Terms of Service. system = {D[ x1[t], {t, 2}] == -ν1 D[
x1'[0] == 0};

https://mathematica.stackexchange.com/questions/58631/driven-simple-harmonic-oscillator-amplitude-of-steady-state-motion 2/4
3/3/2019 differential equations - Driven simple harmonic oscillator — amplitude of steady state motion - Mathematica Stack Exchange

8 soln = DSolve[system /. params, x1[t]

(* and the steady state is*)


lim = ((List @@ (Expand@soln[[2]])) /
steadyState = Simplify@Together[Plus
(* (-4 (-100 + ω^2) Cos[t ω] + 4 ω Si

2
4ω sin(tω)−4(ω −100) cos(tω)

4 2
ω −199ω +10000

And the amplitudes, with a nice


resonance peak:

Plot[NMaxValue[steadyState, t], {ω, 1

edited Sep 2 '14 at 6:15

answered Sep 1 '14 at 19:04


Dr. belisarius
108k 11 170 380

Note: In the general case a more


careful condition is needed in the /;
clause while calculating lim . The
current condition is enough for this
problem since there are no non-
vanishing constant terms in the
Limit[] – Dr. belisarius Sep 1 '14
at 22:30

That's great. The thing I learned here


was the possibility and efficiency of
breaking down equations into
individual terms. – NLambert Sep 2
'14 at 16:59

1 @NLambert yes, but you should


understand that it's an artificial way to
circumvent the Limit[] limitations
(pun intended) – Dr. belisarius Sep 2
'14 at 17:03

It is much easier and more general.

Your equation
2
By using our site,system = {D[x1[t],that
you acknowledge {t,you
2}] == read
have -ν1 D[x1
and understand our Cookie Policy, Privacy Policy, and our
Terms of Service.

https://mathematica.stackexchange.com/questions/58631/driven-simple-harmonic-oscillator-amplitude-of-steady-state-motion 3/4
3/3/2019 differential equations - Driven simple harmonic oscillator — amplitude of steady state motion - Mathematica Stack Exchange

without specifying neither the initial


conditions nor the parameters (except
of course v1 > 0, ω1^2 > 0 ) is solved
by

xx[t_]=x1[t]/. DSolve[System, x1[t], t

The behaviour of the solution at large


t is simply given by letting die out all
eponentially decaying terms.

Hence:

y[t_] = xx[t] /. Exp[t_] -> 0

2 2
4F (−ω Cos[tω]+ω1 Cos[tω]

2 2 2 2 2 2
(ν1 +2ω −2ω1 +ν1√ ν1 −4ω1 )(−ν1 −

Hope this helps, Wolfgang

edited Sep 7 '14 at 15:25

answered Sep 7 '14 at 14:35


Dr. Wolfgang Hintze
10.6k 8 40

By using our site, you acknowledge that you have read and understand our Cookie Policy, Privacy Policy, and our
Terms of Service.

https://mathematica.stackexchange.com/questions/58631/driven-simple-harmonic-oscillator-amplitude-of-steady-state-motion 4/4

Das könnte Ihnen auch gefallen