A Half-Solved Mystery: Rotating a Sine Wave

A Half-Solved Mystery

A few minutes ago, I wondered how to write a function whose graph would be a sine curve, but one that undulated above and below the diagonal line y=x, rather than the x-axis, as is usually the case. How to accomplish such a 45 degree counterclockwise rotation?

Well, first, I abandoned degrees, set Geometer’s Sketchpad to radians, and then simply constructed plots for both y = x and y = sin(x). Next, I added them together. The result is the green curve (and equation) you see above.

This only half-solves the problem. Does it undulate above and below y=x? Yes, it does. However, if you rotate this whole thing, clockwise, one-eighth of a complete turn, so that you are looking at the green curve going along the x-axis, you’ll notice that it is not a true sine curve, but a distorted one. Why? Because it was generated by adding y-values along the original x-axis, not by a true rotation.

I’m not certain how to correct for this distortion, or otherwise solve the problem. If anyone has a suggestion, please leave it in a comment. [Note: an astute follower of this blog has now done exactly that, so I refer the reader to the comments for the rest of the story here.]

About RobertLovesPi

I go by RobertLovesPi on-line, and am interested in many things. The majority of these things are geometrical. Welcome to my little slice of the Internet. The viewpoints and opinions expressed on this website are my own. They should not be confused with the views of my employer, nor any other organization, nor institution, of any kind.
Image | This entry was posted in Mathematics and tagged , , , , , , , , , , , . Bookmark the permalink.

6 Responses to A Half-Solved Mystery: Rotating a Sine Wave

  1. I would define x’ = x cos(pi / 4) + y sin(pi / 4) and y’ = x sin(pi / 4) – y cos (pi / 4). This rotates the axes 45 degrees from (x,y) to (x’,y’).

    Then I would graph y’ as a function of x’. I tried it on Excel just to be sure. I made a column of x varying from 0 to 6.3 in steps of 0.1, a column of y defined as sin(x), and two columns for x’ and y’, then graphed y’ as a function of x’ in an xy scatter plot.

    (It also simplifies to x’ = (x + y) / sqrt(2) and y’ = (x – y) / sqrt(2).)

    Liked by 1 person

  2. Anonymous says:

    do you know how to make the diagonal go where ever you want like have it more vertical or horizontal

    Like

    • Well, all I did was add y = x to the sine function. For other slopes, use y = kx instead of y = x, with k not equal to one. This still only “half-solves” it, though; the resultant wave is skewed.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s