Forced Spring Systems

Part 1. An Undamped Spring with External Forcing

Enter the coefficients and the differential equation.

k  =  5;
F0  =  1;
omega  =  2;
DE =  y''[t] + k^2*y[t] == F0*Cos[omega*t];

Solve the initial value problem.

DSolve[{DE, y[0] == 0, y'[0] == 0}, y[t],  t]

Copy the output from the preceding step to define the solution function y[t].

y[t_] :=  ?;

Plot the solution function.  (You may need to enlarge the plot to see details.)

Plot[y[t], {t, 0, 10}, 
        AxesLabel -> {"t", "y[t]"}];

Define the derivative function as v[t], and plot the trajectory in the phase plane.  (Again, you may need to enlarge the plot.)

v[t_] =  D[y[t], t]

ParametricPlot[{y[t], v[t]}, {t, 0, 10},  AspectRatio -> 1, 
        AxesLabel -> {"y[t]", "v[t]"}];

Change the value of ω successively in steps of 0.5 up to 4, and replot the solution function and trajectory for each value.

Answer to step 3:

Part 2. Beats

We repeat the commands here for the last case studied in Part 1.  Enter the coefficients and the differential equation.

k  =  5;
F0  =  1;
omega  =  4;
DE =  y''[t] + k^2*y[t] == F0*Cos[omega*t];

Solve the initial value problem.

DSolve[{DE, y[0] == 0, y'[0] == 0}, y[t],  t]

Copy the output from the preceding step to define the solution function y[t].

y[t_] :=  ?;

Plot the solution function.  (You may need to enlarge the plot to see details.  Note that we are using a longer time interval now.)

Plot[y[t], {t, 0, 15}, 
        AxesLabel -> {"t", "y[t]"}];

Define the derivative function as v[t], and plot the trajectory in the phase plane.

v[t_] =  D[y[t], t]

ParametricPlot[{y[t],  v[t]}, {t, 0, 15},  AspectRatio -> 1, 
        AxesLabel -> {"y[t]", "v[t]"}];

Change the value of ω successively, and replot for each value.

Write your descriptions here:

The following line unassigns values of the parameters so you can do symbolic calculations with formulas.

Clear[k,  F0,  omega];

Answer the rest of Part 2 here:

Part 3. Resonance

We repeat the commands here for defining the coefficients and the differential equation-- now with ω very close to k.

k  =  5;
F0  =  1;
omega  =  4.9;
DE =  y''[t] + k^2*y[t] == F0*Cos[omega*t];

Solve the initial value problem.

DSolve[{DE, y[0] == 0, y'[0] == 0}, y[t],  t]

Copy the output from the preceding step to define the solution function y[t].

y[t_] :=  ?;

Plot the solution function.  (You may need to enlarge the plot to see details.  Note the longer time interval.)

Plot[y[t], {t, 0, 25}, 
        AxesLabel -> {"t", "y[t]"}];

Experiment with values of ω closer to k in the following input cell, and answer step 1 in the text cell below.

Answer:

The next two lines unassign the parameters and the dependent variable, then define the forced spring equation with resonant frequency.

Clear[k,  F0,  omega,  y];
DE =  y''[t] + k^2*y[t] == F0*Cos[k*t];

Find the symbolic solution of the resonant equation.

DSolve[{DE,  y[0] == 0,  y'[0] == 0}, y[t],  t] // 
      Simplify

Define and plot the solution function.

k  =  5;
F0  =  1;
y[t_] :=  ?;
Plot[y[t], {t, 0, 15}, 
        AxesLabel -> {"t", "y[t]"}];

Define the derivative function as v[t], and plot the trajectory in the phase plane.

v[t_] = D[y[t], t]

ParametricPlot[{y[t],  v[t]}, {t, 0, 15},  AspectRatio -> 1, 
        AxesLabel -> {"y[t]", "v[t]"}];

Part 4. Damping

Copy and edit Mathematica lines from the preceding parts to answer the questions in Part 4.

Answers:

Part 5. Summary

Answer the summary questions here: