# how to define an example of ODE that represents an undamped forced oscillator whose time evolution is described by beats

I am a newbie in Mathematica and I really don't know how to define an example of ODE that represents an undamped forced oscillator

• Please can you give me some advice? How to start to solve this problem Sep 25 '20 at 17:29
• Do you know the appropriate ODE? If so, add it to your question. Sep 25 '20 at 17:42
• The problems ask defining any ODE with undamped forced oscillator Sep 25 '20 at 17:49
• I know at the beginning it is hard to pose a good question, it will be easier with experience. Well, what do you mean by "beats". Beats appear when you have several coupled oscillators, but you speak of one oscillator. And what about the driving force? Sep 25 '20 at 19:07

Not really a mathematica problem but here is something to get you going in the Wolfram Language.

eqn = x''[t] + (2 π 100)^2 x[t] == f[t];
ic = {x'[0] == 0, x[0] == 0};
f[t_] := Sin[110 2 π t];
sol = NDSolve[Join[{eqn}, ic], {x}, {t, 0, 0.2}];
Plot[Evaluate[x[t] /. First[sol]], {t, 0, 0.2}]


Here I have made an oscillator with a natural frequency of 100 Hz and then applied a force with a frequency of 110 Hz.

The equation you are after is called eqn. The initial conditions are ic and the force has been defined as f[t].

You should be able to copy and paste that into Mathematica and get the plot I have shown.

Good luck