1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Rotating a function about the origin

  1. May 21, 2009 #1
    stupid question from a high school kid. How do you algebraically rotate (not flip) a function about the origin for any given angle? and what is the notation for it?
     
  2. jcsd
  3. May 21, 2009 #2
    Nothing stupid about that question.

    There are several ways to look at it, depending on your level of mathematical knowledge. I'm guessing you haven't studied vectors or matrices, is that true? How about trig?

    If know some trig, then this might make some sense:

    For a given point (x,y) on your original function, you can identify the rotated point (x',y') as follows:

    x' = x*cos(a) - y*sin(a)
    y' = x*sin(a) + y*cos(a)

    where a is the angle of rotation.

    Does that help?
     
  4. May 21, 2009 #3

    disregardthat

    User Avatar
    Science Advisor

    An idea could be to transform the function to polar form, rotate with an angle of choice and then transform back to cartesian form.
     
  5. May 21, 2009 #4

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    This is really the same as belliott448's answer: Multiply
    [tex]\begin{bmatrix}cos(\theta) & -sin(\theta) \\ sin(\theta) & cos(\theta)\end{bmatrix}\begin{bmatrix}x \\ y \end{bmatrix}[/tex]

    to rotate the point (x,y) about the origin an angle [itex]\theta[/itex].
     
  6. May 21, 2009 #5
    so you mean for y=f(x) you can get the new function by plugging f(x) for y into the matrices and multiplying them?
    I get first row: x cos(theta) - f(x) sin(theta)
    second row: f(x) cos(theta) + x sin(theta)

    Is the new function f(x) cos(theta) + x sin(theta)?
     
    Last edited: May 21, 2009
  7. May 21, 2009 #6
    Sort of.

    If you start with a point (x,f(x)), that point will be rotated to (x',f'(x)), where the primes indicate the rotated values and are given by the equations you have. The trouble is that you now have a new function value, f', but it's expressed as a function of the original x, not of the new x', which is what you need in order to find the form of the new function.

    You can fix this by inverting the equation for x' in order to solve for x in terms of x', and then plug that into your expression for f' to express it as a function of x'.

    I'm pretty sure that what you'll end up with is the same as what you'd get by following Jarles' suggestion to switch to polar coordinates, do the rotation, and then transform back again. That's bound to give you the same sines and cosines.

    I'm not sure if one method will be easier to perform, but it's too late for me to try it tonight! Sorry! I'll do it tomorrow if no one else has by then.
     
  8. May 23, 2009 #7
    I tried putting e^x cos(pi/3) + x sin(pi/3) on my calculator and it didn't work. Am I doing something wrong?
     
  9. May 23, 2009 #8

    disregardthat

    User Avatar
    Science Advisor

    You have to use the vector representation of your function.
     
  10. May 23, 2009 #9
    Okay, so your function is y = e^x, right? If you plug in a specific value of x, say 1.5, then you get y = e^1.5 = 4.5 (approximately).

    If you rotated this point (1.5,4.5) by pi/3, you'll get:

    x' = 1.5 cos(pi/3) - 4.5 sin(pi/3) = -3.1
    y' = 1.5 sin(pi/3) + 4.5 cos(pi/3) = 3.5

    for the coordinates of the rotated point. That's fine if all you want to do is to plot the rotated function, but if you write down a new function whose curve is the rotated one, you need a few more steps.

    y' is the y coordinate of the rotated point (3.5), so it's the value of the new function, but the expression above gives you y' in terms of x, the original x coordinate (1.5); what you need is an expression in terms of x', the x coordinate of the rotated point (-3.1), since that's the x value that corresponds to y'. To get that, you have substitute for x in the expression for y' (x appears both as x and also in the expression for y, namely e^x), to write it in terms of x'.

    This means that you have to invert the equations for x' and y' to get equations for x and y in terms of x' and y'. Try that - you'll have to solve the two equations for x and y. (Hint: the answer should look very much like the original equations, but with some changes of sign. This makes sense, if you think about it, since writing x and y as functions of x' and y' just tells you how to rotate (x',y') back to (x,y), so it's just a rotation by the negative of the original angle.)

    Do all that, and should have an expression for y' as a function of x', which is the equation for the rotated curve.
     
  11. May 23, 2009 #10
    You know, now that I attempt the algebra involved in the example above, I see that it gets pretty complicated because of the exp() function and the need to invert equations containing it (this is related to the fact that not every function gives rise to a simple function when rotated).

    I recommend going through the steps above for a simple linear function, like a line through the origin. It's a lot easier both to solve this and also to see if the result makes sense, since you should be able to predict the correct answer.
     
  12. May 25, 2009 #11
    i have a ti-83... what do i put in X1T and Y1T?
     
  13. May 26, 2009 #12
    Beats me! I'm old-school and have never programmed a TI-83.

    It's still not clear to me what you're trying to do. Do you just want to produce a plot of the rotated function? If so, then the steps outlined above should be sufficient (I'm assuming the TI-83 lets you create a function as a routine with several steps in it.)

    Are you actually trying to determine the functional form of the rotated function? Do you have a specific function in mind that you want to rotate?

    It would be a little easier to help if we knew what your goal is.
     
  14. May 26, 2009 #13

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    If your original function is y= f(x), you can use x itself a parameter: x= t, y= f(t).

    After the rotation, through angle [itex]\theta[/itex] you have
    [itex]x' = x cos(\theta) - y sin(\theta)[/itex]
    [itex]y' = x sin(\theta) + y cos(/theta)[/itex]

    Again, using x itself as parameter, that becomes
    [itex]x' = t cos(\theta) - f(t) sin(\theta)[/itex]
    [itex]y' = t sin(\theta) + f(t) cos(\theta)[/itex]

    Use those as X1T and Y1T.
     
  15. May 26, 2009 #14

    CRGreathouse

    User Avatar
    Science Advisor
    Homework Helper

    Change [mode] to parametric, then do as Halls suggests.
     
  16. May 26, 2009 #15

    HallsofIvy

    User Avatar
    Staff Emeritus
    Science Advisor

    I assumed lolgarithms was asking about parametric mode. "X1T" and "Y1T" are what the TI-83 calls the functions in parametric mode. In function mode it would be just Y1, Y2, etc.
     
  17. May 26, 2009 #16
    oh, i mean ti-84 silver edition
     
  18. May 26, 2009 #17
    the most important for me is the functional form. is it in closed form?
     
  19. May 27, 2009 #18
    Not in general, I wouldn't think. Suppose you rotate a sine curve by more than 45 degrees - it will no longer be single-valued, so you won't be able to write down a simple expression for the resulting function. If it is in closed form, I'll bet it's ugly!
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook




Similar Discussions: Rotating a function about the origin
  1. Rotation around origin (Replies: 6)

Loading...