Monday, November 7, 2011

msinx + ncosx

Adding multiples of sinx and cosx creates a new sine wave that is taller and has a phase shift.  The rules are as follows:

f(x) = msinx + ncosx

Amplitude = sqrt(m² + n²) 

Phase shift: f(x) = 0 when
msinx = -ncosx

With a little algebraic manipulation we get f(x) = 0 when tanx = -n/m. Therefore the phase shift is -arctan(-n/m).  This is where the function will equal 0, but you have to check to see if it is rising at that point or falling.

If it is rising, we can re-write f(x) = sqrt(m² + n²)sin(x - arctan(-n/m)).

If it is falling, f(x) = -sqrt(m² + n²)sin(x - arctan(-n/m)).

I created this picture over at the website WolframAlpha by typing in "plot sinx + cosx and sinx + 2cosx and 2sinx + cosx", without the quotation marks.









This picture is of all the possible choices of +/-sinx +/- cosx.  The inverse tangent of +/- 1 is +/- pi/4, so those are the places where the graphs cross the x-axis closest to the origin.  The new amplitude for all of these is sqrt(1² + 1²) = sqrt(2).  These four examples tell us how the four options work

f(x) = sinx + cosx:  Graph is in blue.  It crosses the axis at x = -pi/4 and goes upwards so it can be re-written as
f(x) = sqrt(2)sin(x + pi/4)

g(x) = -sinx - cosx:  Graph is in green.  It crosses the axis at x =-pi/4 and goes downwards so it can be re-written as
g(x) = -sqrt(2)sin(x + pi/4)


h(x) = sinx - cosx:  Graph is in red.  It crosses the axis at x = pi/4 and goes upwards so it can be re-written as
h(x) = sqrt(2)sin(x - pi/4)

k(x) = -sinx + cosx:  Graph is in yellow.  It crosses the axis at x = pi/4 and goes downwards so it can be re-written as
k(x) = -sqrt(2)sin(x - pi/4)

Rules for the signs in front of the amplitude and the phase shift.

The sign in front of phase shift is positive if m and n agree in sign (either both positive or both negative) and is negative if m and n disagree in sign.

The sign in front of the amplitude agrees with the sign in front of the sine function.  (I incorrectly stated in class it was the sign in front of the cosine function.  Sorry for the error.)

We will have a lab to practice this on Wednesday.
<br>



No comments:

Post a Comment