Back to Schedule

## Assignment 2 Solutions

```1) (6 points total, 1 per solution)
Fun with complex numbers.  Assume j = sqrt(-1).
Show your work, and reduce/convert to simplest form:

a)  (1-j)2 = 1 - 2j - 1 = - 2j

b)  (1-j)/(1+j) = (1-j)(1-j)/(1-j)(1+j) = -2j / 1+1 = -j

c)  (-1)-1/4 =  (remember -1 = ejPI) =
e-jPI/4=cos(PI/4-jsin(PI/4) = 0.707 - 0.707j,
and 3 other solutions (these are called the "nth roots" of -1,
where here n=3.  One cool thing about these solutions is that they can be
interpreted as "aliased" versions of each other.).  Another cool aspect
comes up whenever you need a particular set of equal values of some
complex exponential (plucked string model for example, more later).

d)  |j2| / |(1-j)2| = abs(j^2) / abs(-2j) = |-1|/|2| = 1/2 = 0.5

e)  ln(ej) = ln(e) + ln(j=ePI/2) = ln(e) + ln(ejPI/2)
= 1 + jPI/2.

f)  (j-j)j = x
ln((j-j)j) = ln(x)

= j ln(j-j))  (remember -j = e-jPI/2)
keep substituting and cranking and,
believe it or not, you end up with j,
that's right, j to the -j to the j is j.

2) (6 points total, 1 per solution)
Fun with rectangular/polar conversion.  Convert these
to polar, and plot them (except (c))

a)  1 - j = sqrt(12+(-1)12)ejarctan(-1/1) = sqrt(2)ejarctan(-1) = 1.414ej-PI/4

b)  1 + (√ 3)j = 1 + sqrt(3)j = sqrt(1+3)ejarctan(sqrt(3)/1) = 2 ejPI/3

c)  x - jy = sqrt(x2 + (-y)2)ejarctan(-y/x)

d)  (-1)1/4 = (ejPI)1/4 = ejPI/4
(and 3 more roots, (the roots of unity again), more on this
when we hit the plucked string, or pluck it :-)

e)  ejΠ - 1 = exp(jPI) - 1 = -1 - 1 = -2

f)  sin(θ) + jcos(θ) = sin(theta) + jcos(theta) = j(cos(theta) - jsin(theta)) =
j(e-jtheta = ej(PI/2-theta)

3)  (3 points total, 2 for proof, 1 for meaning)
Use complex exponential identities to show that

cos(A) + cos(B) = 2 cos((A-B)/2)cos((A+B)/2)

I find it easier to convert the right side to the left side:

2[(ej(A-B)/2+[e-j(A-B)/2)/2 * ([ej(A+B)+[ej(A+B))/2]

= [ej(2A-B+B)/2 + e-j(2A-B+B)/2 +  ej(2B-A+A)/2 + e-j(2B-A+A)/2] / 2

= [ejA + e-jA] / 2 +  [ejB + e-jB] / 2

= cos(A) + cos(B) //

How does this relate to question 6 of Assignment 1?

Summing together two cosine waves of frequency 500.0 and 500.1 Hz.
is equivalent to multiplying two sine waves, one with frequency 500.05,
and one with frequency .05 Hz.  This allows us to interpret beats as
either an additive interference, or as a multiplicative "modulation."

4)  (3 points total)
Show that Equation 4.3 from the Cook book solves the differential equation
for the mass/spring/damper.  Plug and chug the 2nd and 1st derivatives.
If you're careful it all works out and cancels to be zero!!

5)  (4 points total)
Find a slinky, bungy cord, big rubber band, or similar springy object.
Find an object of suitable (you'll see later) weight.
Secure a timing device (stopwatch or watch with second hand).
Attach one end of the spring to something solid and
relatively unmoveable (like your roommate, doorframe,
etc.).  Attach your suitably weighted object to the bottom
of the spring.  Pull your object down, stretching the spring some.
Let go, and count how many oscillations happen in a timed
interval (say, 15 or 30 seconds).  Pull it down a measured
amount, like 12 inches, let go, and time how long it takes
until the oscillations damp to 1/10 of the original amplitude
(1.2 or so inches for an initial displacement of 12 inches).
Try to measure the weight of the object.  From that, your measured
frequency of oscillation, and your measured damping time, calculate
the spring constant and damping constant of your mass/spring/damper

6)  (4 points total)
Change the constants in the masprdmp.c code to reflect your
estimated/calculated constants (from (5) above).  Change the
code so that it synthesizes for a longer time (like a minute).
Recompile, run, inspect the resulting wave in a sound editor and
see if it all makes sense.  Turn in a plot of your synthesized wave.

PLOTTING REALLY SLOW OSCILLATIONS!!

7)  (2 points total)
Disconnect your spring from the rigid object, and suspend your
mass from the spring from your hand.  Move your hand up and down
at various rates, slow, faster, really fast, noisily random.
Report what you observe.  Is there a rate at which the mass
oscillates in synchrony with your hand?  Why would this be?

RESONANCE!!

8)  Do something really interesting with Tae Hong's

MATLAB Code, and MATLAB in general.  Make a 22.05 second musical
statement with it. Submit as usual and we'll listen and discuss.

ART!!

```

Back to Schedule