Part_01.mw

Theory of Oscillations
Part 1:
General Symbolic Solutions

Alexei V. Tikhonenko

Email: avtikhon@okclub.org

General Physics Department, Institute of Nuclear Power Engineering, Russia

This lesson demonstrates the use of Maple for the general symbolic solutions of the equation of oscillation and illustrates how to use ODE solver "dsolve" for these purposes.

  Introduction. CONSIDERED SITUATIONS

General ODE solver

To obtain the general solutions of the equation of oscillation we can use general ODE solver "dsolve".  General character of solutions signifies absence of the initial conditions. Therefore, solutions will depend on two arbitrary constants.

Considered situations

1) Free undamped oscillator.

This oscillator is characterized by a frequency w0.

2) Free damped oscillator.

This oscillator is characterized by a frequency w0, and damping factor g.

3) Forced undamped oscillator.

This oscillator is characterized by a frequency w0, amplitude f0 of external force, and frequency W of external force.

4) Forced damped oscillator.

This oscillator is characterized by afrequency w0, damping factor g, amplitude f0 of external force, and frequency W of external force.

NOTE that solutions for forced oscillators have feature in the resonance situations.

  Section 1.1. FREE UNDAMPED OSCILLATOR

Consider the free undamped oscillator. The equation of oscillation in this situation takes the form:

diff(x(t), `$`(t, 2))+omega0^2*x(t) = 0

where x(t) is the oscillation variable and omega[0] is the frequency.

The MAPLE expression for the differential equation of oscillation and its resulting general solution are:

> Eq_01:= diff(x(t),t,t)+omega0^2*x(t)=0;
x_01(t):=dsolve(Eq_01);;

Eq_01 := diff(x(t), `$`(t, 2))+omega0^2*x(t) = 0

x_01(t) := x(t) = _C1*sin(omega0*t)+_C2*cos(omega0*t)

The general solution x(t) of the oscillation equation depends on the frequency omega[0] and two arbitrary constants _C1 and _C2.

  Section 1.2. FREE UNDAMPED OSCILLATOR

Consider free damped oscillator. Equation of oscillation in this situation takes the form:  

diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = 0

where x(t) is the oscillation variable, w0 is the frequency and g is the damping factor.

The MAPLE expression for the differential equation of oscillation, subsidiary quantity (on w0 and g values) and resulting general solution are:

> Eq_02:= diff(x(t),t,t)+2*gamma*diff(x(t),t)+omega0^2*x(t)=0;
assume(gamma<omega0);

x_02(t):=dsolve(Eq_02);

Eq_02 := diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = 0

x_02(t) := x(t) = _C1*exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)+_C2*exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)

Note that the subsidiary quantity w0 > g corresponds to the oscillatory solution.

The general solution x(t) of the oscillation equation depends on the frequency w0, damping factor g and two arbitrary constants _C1 and _C2.

  Section 1.3. FORCED UNDAMPED OSCILLATOR

In this Section we will consider two situations: Resonance oscillations and Nonresonance oscillations.

 Sub-Section 1.3.1. FORCED UNDAMPED OSCILLATOR. Nonresonance situation

Consider the forced undamped oscillator with harmonic external force. The equation of oscillation in this situation takes the forms:

a)

diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_03a*cos(Omega*t)

b)

diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_03b*sin(Omega*t)

c)

diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_031c*cos(Omega*t)+f_032c*sin(Omega*t)

d)

diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_03d*cos(n*Omega*t)

e)

diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_031e*cos(Omega*t)+f_032e*cos(n*Omega*t)

where x(t) is the oscillation variable, w0 is the frequency, W is the frequency of external force and f_03 are amplitudes of external forces.

The MAPLE executable expression for the differential equation of oscillation and its resulting general solution are:

a)

> Eq_03a:= diff(x(t),t,t)+omega0^2*x(t)=f_03a*cos(Omega*t);
x_03a(t):=dsolve(Eq_03a);

Eq_03a := diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_03a*cos(Omega*t)

x_03a(t) := x(t) = sin(omega0*t)*_C2+cos(omega0*t)*_C1+f_03a*cos(Omega*t)/(omega0^2-Omega^2)

b)

> Eq_03b:= diff(x(t),t,t)+omega0^2*x(t)=f_03b*sin(Omega*t);
x_03b(t):=dsolve(Eq_03b);

Eq_03b := diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_03b*sin(Omega*t)

x_03b(t) := x(t) = sin(omega0*t)*_C2+cos(omega0*t)*_C1+f_03b*sin(Omega*t)/(omega0^2-Omega^2)

c)

> Eq_03c:= diff(x(t),t,t)+omega0^2*x(t)=f_031c*cos(Omega*t)+f_032c*sin(Omega*t);
x_03c(t):=dsolve(Eq_03c);

Eq_03c := diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_031c*cos(Omega*t)+f_032c*sin(Omega*t)

x_03c(t) := x(t) = sin(omega0*t)*_C2+cos(omega0*t)*_C1+(f_031c*cos(Omega*t)+f_032c*sin(Omega*t))/(omega0^2-Omega^2)

d)

> Eq_03d:= diff(x(t),t,t)+omega0^2*x(t)=f_03d*cos(n*Omega*t);
x_03d(t):=dsolve(Eq_03d);

Eq_03d := diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_03d*cos(n*Omega*t)

x_03d(t) := x(t) = sin(omega0*t)*_C2+cos(omega0*t)*_C1-f_03d*cos(n*Omega*t)/(-omega0^2+n^2*Omega^2)

e)

> Eq_03e:= diff(x(t),t,t)+omega0^2*x(t)=f_031e*cos(Omega*t)+f_032d*cos(n*Omega*t);
x_03e(t):=dsolve(Eq_03e);

Eq_03e := diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_031e*cos(Omega*t)+f_032d*cos(n*Omega*t)

x_03e(t) := x(t) = sin(omega0*t)*_C2+cos(omega0*t)*_C1+((-f_032d*omega0^2+f_032d*Omega^2)*cos(n*Omega*t)+(-f_031e*omega0^2+f_031e*n^2*Omega^2)*cos(Omega*t))/(-omega0^4+Omega^2*(n^2+1)*omega0^2-Omega^4...

The general solution x(t) of the oscillation equation depends on the frequency w0, the frequency of external force W and two arbitrary constants _C1 and _C2.

Let f_031c equal f_03a and f_032c equal f_03b:

Note that the external force Fc = f_031c*cos(omega*t)+f_032*sin(omega*t) is the superposition of external forces Fa = f_03a*cos(omega*t) and Fb = f_03b*sin(omega*t) and that the solution x_03c(t) is the superposition of the solution x_03a(t) and x_03b(t) .

Let f_031e equal f_03a and f_032e equal f_03d:

Note that the external force Fe = f_031e*cos(omega*t)+f_032e*cos(n*omega*t) is the superposition of external forces Fa = f_03a*cos(omega*t) and Fd = f_03d*sin(n*omega*t) and that the solution x_03e(t) is the superposition of the solution x_03a(t) and x_03d(t) .

These facts reflect property of linearity of differential equation of oscillation.

  Sub-Section 1.3.2. FORCED UNDAMPED OSCILLATOR. Resonance situation

Consider forced undamped oscillator with harmonic external force of frequency w0. This is the resonance situation. The equation of oscillation in this situation takes the forms:

f)

diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_03f*cos(omega0*t)

g)

diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_03g*sin(omega0*t)

h)

diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_031h*cos(omega0*t)+f_032h*sin(omega0*t)

where x(t) is the oscillation variable, w0 is the frequency, W is the frequency of external force and a1 and a2 are arbitrary constant factors.

The MAPLE executable expression for the differential equation of oscillation and resulting general solution are:

f)

> Eq_03f:= diff(x(t),t,t)+omega0^2*x(t)=f_03f*cos(omega0*t);
x_03f(t):=dsolve(Eq_03f);

Eq_03f := diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_03f*cos(omega0*t)

x_03f(t) := x(t) = sin(omega0*t)*_C2+cos(omega0*t)*_C1+1/2*f_03f*(cos(omega0*t)+sin(omega0*t)*omega0*t)/omega0^2

g)

> Eq_03g:= diff(x(t),t,t)+omega0^2*x(t)=f_03g*sin(omega0*t);
x_03g(t):=dsolve(Eq_03g);

Eq_03g := diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_03g*sin(omega0*t)

x_03g(t) := x(t) = sin(omega0*t)*_C2+cos(omega0*t)*_C1-1/2*f_03g*cos(omega0*t)*t/omega0

h)

> Eq_03h:= diff(x(t),t,t)+omega0^2*x(t)=f_031h*cos(omega0*t)+f_032h*sin(omega0*t);
x_03h(t):=dsolve(Eq_03h);

Eq_03h := diff(x(t), `$`(t, 2))+omega0^2*x(t) = f_031h*cos(omega0*t)+f_032h*sin(omega0*t)

x_03h(t) := x(t) = sin(omega0*t)*_C2+cos(omega0*t)*_C1+1/2*((f_031h-f_032h*omega0*t)*cos(omega0*t)+sin(omega0*t)*f_031h*omega0*t)/omega0^2

The general solution x(t) of the oscillation equation depends on the frequency and the frequency of external force w0 and two rbitrary constants _C1 and _C2.

Let f_031h equal f_03f and f_032h equal f_03g:

Note that the external force Fh = f_031h*cos(omega*t)+f_032h*sin(omega*t) is the superposition of external forces Ff = f_03f*cos(omega*t) and Fg = f_03g*sin(omega*t) and that the solution x_03h(t) is the superposition of the solution x_03f(t) and x_03g(t) .

These facts reflect the property of linearity of differential equations of oscillation.

  Section 1.4. FORCED DAMPED OSCILLATOR

In this Section we will consider two situations: Resonance oscillations and Nonresonance oscillations.

  Sub-Section 1.4.1. FORCED DAMPED OSCILLATOR. Single-frequency external force

Consider the forced damped oscillator with harmonic external force. The equation of oscillation in this situation takes the forms:

a)

diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_04a*cos(omega0*t)

b)

diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_04b*sin(sqrt(omega0^2-2*gamma^2)*t)

c)

diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_04c*cos(Omega*t)

where x(t) is the oscillation variable, w0 is the frequency, W is the frequency of external force, g is the damping factor and f1, f2 and f3 are constant factors.

The MAPLE expression for the differential equation of oscillation and resulting general solution are:

a)

> Eq_04a:= diff(x(t),t,t)+2*gamma*diff(x(t),t)+omega0^2*x(t)=f_04a*cos(omega0*t);
assume(gamma<omega0);

x_04a(t):=dsolve(Eq_04a);

Eq_04a := diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_04a*cos(omega0*t)

x_04a(t) := x(t) = exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1+1/2*f_04a*sin(omega0*t)/(gamma*omega0)

b)

> Eq_04b:= diff(x(t),t,t)+2*gamma*diff(x(t),t)+omega0^2*x(t)=f_04b*cos((sqrt(omega0^2-2*gamma^2))*t);
assume(gamma<omega0);

x_04b(t):=dsolve(Eq_04b);

Eq_04b := diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_04b*cos((omega0^2-2*gamma^2)^(1/2)*t)

x_04b(t) := x(t) = exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1-f_04b*(gamma*cos((omega0^2-2*gamma^2)^(1/2)*t)+sin((omega0^2-2*gamma^2)^(1/2)*t...

c)

> Eq_04c:= diff(x(t),t,t)+2*gamma*diff(x(t),t)+omega0^2*x(t)=f_04c*cos(Omega*t);
assume(gamma<omega0);

x_04c(t):=dsolve(Eq_04c);

Eq_04c := diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_04c*cos(Omega*t)

x_04c(t) := x(t) = exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1+f_04c*(cos(Omega*t)*omega0^2+2*gamma*Omega*sin(Omega*t)-Omega^2*cos(Omega*t))/(...

The general solution x(t) of the oscillation equation depends on frequency w0, damping factor g, and frequency of external force, two arbitrary constants _C1 and _C2, the frequency of external force W and the amplitude of external forces f.

> Eq_02:= diff(x(t),t,t)+2*gamma*diff(x(t),t)+omega0^2*x(t)=0;
Eq_04c:= diff(x(t),t,t)+2*gamma*diff(x(t),t)+omega0^2*x(t)=f_04c*cos(Omega*t);

assume(gamma<omega0);

x_02(t):=dsolve(Eq_02);

x_04c(t):=dsolve(Eq_04c);

Eq_02 := diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = 0

Eq_04c := diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_04c*cos(Omega*t)

x_02(t) := x(t) = _C1*exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)+_C2*exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)

x_04c(t) := x(t) = exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1-f_04c*((-omega0^2+Omega^2)*cos(Omega*t)-2*gamma*Omega*sin(Omega*t))/(Omega^4+(-...

> x_04c(t):=exp(-gamma*t)*sin(sqrt(-gamma^2+omega0^2)*t)*_C2+exp(-gamma*t)*cos(sqrt(-gamma^2+omega0^2)*t)*_C1+f_04c*(cos(Omega*t)*omega0^2-Omega^2*cos(Omega*t)+2*gamma*Omega*sin(Omega*t))/(Omega^4+(-2*omega0^2+4*gamma^2)*Omega^2+omega0^4);

x_04c(t) := exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1+f_04c*(cos(Omega*t)*omega0^2-Omega^2*cos(Omega*t)+2*gamma*Omega*sin(Omega*t))/(Omega^4...

These expressions show that the general solution x_02(t) for the free damped oscillator differs from the solution x_04c(t) for the forced damped oscillator by the expression (accurate within determination of constants):

f_04c*(cos(Omega*t)*omega0^2-Omega^2*cos(Omega*t)+2*gamma*Omega*sin(Omega*t))/(Omega^4+(-2*omega0^2+4*gamma^2)*Omega^2+omega0^4)

describing the presence of external force for the forced oscillator.

Note that this fact reflects the property of linearity of differential equation: the solution of a heterogeneous differential equation is the superposition of the general solution of the homogeneous equation and the particular solution of heterogeneous equation.

  Sub-Section 1.4.2. FORCED DAMPED OSCILLATOR. Multifrequency-frequency external force

Consider the forced damped oscillator with harmonic external force. The equation of oscillation in this situation takes the forms:

d)

diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_041d*cos(Omega*t)+f_042d*cos(2*Omega*t)

e)

diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_041e*cos(Omega1*t)+f_042e*cos(Omega2*t)

where x(t) is the oscillation variable, w0 is the frequency, g is the damping factor, W, W1, W2 are frequencies of external forces and f_04d, f_04e are amplitudes of external forces.

The MAPLE expression for the differential equation of oscillation and the resulting general solution are:

d)

> Eq_04d:=diff(x(t),t,t)+2*gamma*diff(x(t),t)+omega0^2*x(t)=f_041d*cos(Omega*t)+f_042d*cos(2*Omega*t);
assume(gamma<omega0);

x_04d(t):=dsolve(Eq_04d);

Eq_04d := diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_041d*cos(Omega*t)+f_042d*cos(2*Omega*t)

x_04d(t) := x(t) = exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1+1/16*(-4*f_042d*(Omega^4+(-2*omega0^2+4*gamma^2)*Omega^2+omega0^4)*(Omega-1/2*o...x_04d(t) := x(t) = exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1+1/16*(-4*f_042d*(Omega^4+(-2*omega0^2+4*gamma^2)*Omega^2+omega0^4)*(Omega-1/2*o...x_04d(t) := x(t) = exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1+1/16*(-4*f_042d*(Omega^4+(-2*omega0^2+4*gamma^2)*Omega^2+omega0^4)*(Omega-1/2*o...

e)

> Eq_04e:=diff(x(t),t,t)+2*gamma*diff(x(t),t)+omega0^2*x(t)=f_041e*cos(Omega1*t)+f_042e*cos(Omega2*t);
assume(gamma<omega0);

x_04e(t):=dsolve(Eq_04e);

Eq_04e := diff(x(t), `$`(t, 2))+2*gamma*diff(x(t), t)+omega0^2*x(t) = f_041e*cos(Omega1*t)+f_042e*cos(Omega2*t)

x_04e(t) := x(t) = exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1+(-(Omega2+omega0)*(Omega1^4+(-2*omega0^2+4*gamma^2)*Omega1^2+omega0^4)*(Omega2-...x_04e(t) := x(t) = exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1+(-(Omega2+omega0)*(Omega1^4+(-2*omega0^2+4*gamma^2)*Omega1^2+omega0^4)*(Omega2-...x_04e(t) := x(t) = exp(-gamma*t)*sin((-gamma^2+omega0^2)^(1/2)*t)*_C2+exp(-gamma*t)*cos((-gamma^2+omega0^2)^(1/2)*t)*_C1+(-(Omega2+omega0)*(Omega1^4+(-2*omega0^2+4*gamma^2)*Omega1^2+omega0^4)*(Omega2-...

>

The general solutions x(t) of the oscillation equation depend on the frequency w0, damping factor g, and frequency of external force, two arbitrary constants _C1 and _C2, the frequencies of external forces W, W1, W2 and amplitudes of external forces f4, f5.

© 2002. Alexei V. Tikhonenko