Mathematics 263                                  Laboratory 2                               September 8, 1993
	  
Name: _____________________________   Lab Partner: ___________________________
	  
Consulted with:  ____________________________________________________________

Applications of Second Order
Differential Equations

According to Hooke's Law, the motion of an object attached to a spring is described by the initial-value problem

where m is the mass of the object,  c y'(t)  is the damping (frictional) force exerted on the object by the medium it's moving through,  k y(t)  is the force exerted by the spring itself as it pulls the object back toward the equilibrium position, y'0 is the object's initial velocity, and y0 is the object's initial displacement from the equilibrium position. In this lab we will be considering the behavior of the solutions of some such initial-value problems for different values of m, c, k, y0  and y'0.

Part 1:  Springs without Friction

Consider the differential equation y'' + 4 y = 0, which has the form of the equation above provided c = 0 (so there is no damping force) and k = 4m.  The equation has general solution y(t) = C cos(2t) + D sin(2t).  The constants can only be determined with additional information.  Mathematica find this solution using the command

gsoln = DSolve[y''[t]+4 y[t]==0,y[t],t]

What happens to a mass attached to a spring modeled by this equation if its initial position is one unit above the equilibrium position? It depends on the initial velocity. To find a solution when the mass starts at rest (no velocity), replace the differential equation in the command above with the list of equations: {y''[t]+4 y[t]==0, y[0]==1, y'[0]==0}. Assign your output the name soln[0] (rather than gsoln).

Here's a little trick to avoid losing the original input and the corresponding output: position the cursor just below the output; it should flop over on its side and look like a dog bone.  Press the left mouse button and a horizontal line should appear where the cursor is.  Now press down the CRTL key and at the same time type L and Mathematica  will repeat the last command line. Use the mouse to position the cursor in the new input "cell" where you would like to edit; click the left button again and the blinking "insertion point" will appear just where you want to add more text.(Note that when we have a list of equations to solve, we enclose them in curly brackets, {}.) Enter your edited command.  What solution did you get?

Notice that Mathematica gives the solution in the form of a replacement rule, with an arrow not an equal sign.  To define a function we use the command

a[t_] := y[t] /. soln[0]

To make sure we have defined the function correctly, we can plot it

Plot[a[t],{t,0,20}]

If we have solved the equation and defined a(t) correctly, the solution looks like a cosine curve. That doesn't mean the mass is moving along a cosine curve — after all, it's attached to a spring and moves up and down. Briefly explain why the curve has two dimensions (vertical and horizontal) while the motion only has one dimension (vertical).

Solve the inital value problem with inital velocity –1, and use it to define a function b(t).  Write the definition  of b(t) below.

Solve the inital value problem with inital velocity 1, and use it to define a function c(t).  Write the definition  of c(t) below.

We can plot all three solutions at once using the command

Plot[{a[t],b[t],c[t]},{t,0,20},
    PlotStyle->{Red,Green,Blue}]

It turns out that two of the solutions actually describe the same motion, the only difference being that the masses are doing the same things at different times. (It's just like two people making the same drive on different days.) Which two are they? (Hint: In this kind of situation there's an old saying: "What goes up must come down, and with the same speed, too.")

How can you tell they're the same, from the picture?

Part 2:  Energy and Differential Equations

Do this part after the lab period is over!

In Part 1 of this lab we investigated solutions to the differential equation y'' + 4 y = 0, which models the motion of a mass suspended from a spring without damping.  The lack of damping, or friction, implies that the mass-spring system is conservative, that is, no energy is lost.  This is a statement of  physics, but it follows mathematically from the differential equation.  In this part you will show that this is true.

Start with the differential equation below, multiply it (both sides) by y', and integrate the result (both sides) from t = 0 to t = T.

Simplify your result to show that the system energy: E(t) = (m y'2(t) + k y2(t))/2 has the same value at t = 0 as t = T. Since T is arbitrary, we can conclude the "function" E has the same value always.  Write a brief essay describing your work in this section, explaining in your own words how we know that the function E(t) is constant if the function y solves the differential equation above.  This should take no more than one side of a sheet (unless you have large handwriting), and perhaps as little as a third of a side. A clear, consise exposition that would be informative to someone who had not done this lab is valuable regardless of its length.

Part 3:  RLC Circuits and Springs with Friction

A simple RLC circuit contains a resistor of R ohms, a capacitor of C farads, and a coil of L henries.  According to Kirchhoff's Laws, as time passes the charge q(t) on the capacitor in such a circuit satisfies a differential equation

which is much like the equation given at the start of this lab.  Use Mathematica to find the general solution that is valid when L = 0.5, R = 10.0, and C = 0.25. Follow the same pattern for this command as you used in the first DSolve of the lab.  Write the general solution below.

We're going to compare the three particular solutions we get with the following initial conditions.

(a) q(0) = 0 and q'(0) = 0.  Modify the last DSolve command to take the initial conditions in to account in the same way as was done in Part 1. Name the solution f(t), using the same input format we used earlier with a, b, and c.

(b) q(0) = 1 and q'(0) = 1.  Name this solution g(t).

(c) q(0) = 1 and q'(0) = –20.  Name this solution h(t).

To compare the solutions try to plot them together, as we did for a(t), b(t), and c(t) at the end of Part 1. Use different colors, and try several different intervals, say 0 < t < 0.5, 0 < t < 5, and 0 < t < 50. (For the last, Mathematica may chop the picture off in a way you don't like. Try inserting the option PlotRange->{-0.05, 0.1} at the end of the plot command you are using, before the last ] and with a comma before it.  In a few of sentences, write your impression of how the three solutions are different and how they are alike.

Since RLC circuits and masses on springs are governed by the same type of differential equation, it makes sense that the two kinds of systems should be fundamentally similar in some way.  Each system has three parts: mass, spring, and friction on the one hand; and capacitor, resistor, coil on the other. Think about the similarities between the two systems, and then circle what you think are the most appropriate responses in the three sentences below.

The mass is most similar to the         capacitor     resistor     coil.

The friction is most similar to the     capacitor     resistor     coil.

The spring is most similar to the       capacitor     resistor     coil.