Rotate a curve by an angle

geometry

I’m trying to find an equation of a rotated curve about the origin and I’m confused about an issue, hoping for some help.

So to rotate a point $(x,y)$ about the origin counter clockwise by theta, we use the following mapping

$X\to \cos(\theta)-y\sin(\theta)$

$Y\to x\sin(\theta)+y\cos(\theta)$

For example if I want to rotate by 90 degrees counterclockwise then the mapping becomes:

$(x,y)\to (-y,x)$

Now, if I have the curve $y= x^2+3x$ and If I want to rotate it by 90 degrees counter clockwise with respect to the origin, I replace x with -y, and y with x. The equation of the rotated curve becomes:

$X=y^2-3y$

Now if I graph the rotated curve, I see that its rotated by 90 degrees clockwise, and not counterclockwise!!where is my mistake?

Best Answer

Suppose the original curve is given by $f(x,y) = 0$. The image a point $(x, y)$ on this curve is $(x', y') = (x \cos \theta - y \sin \theta, x \sin \theta + y \cos \theta)$. Since we want the relation between $x'$, and $y'$ and we only have the relation between $x$ and $y$, we have write $x$ and $y$ in terms of $x'$ and $y'$, then plug these expressions into $f(x,y)=0$. From the above expressions, it follows that,

$ x = \cos \theta x' + \sin \theta y' $

and

$ y = -\sin \theta x' + \cos \theta y' $

And then just plug in these expressions into $f(x,y) = 0$ to get the relation between $x'$ and $y'$. So with your example, $y = x^2 + 3 x$, and $\theta = 90^\circ$, hence

$x = 0 \cdot x' + 1 \cdot y' = y'$ and $ y = -1 \cdot x' + 0 \cdot y' = -x' $

Plug these in, you get

$ - x' = y'^2 + 3 y' $

so that

$ x' = - y'^2 - 3y' $

Finally, replacing $x'$ and $y'$ with the standard names of the variables we get $ x = - y^2 - 3 y $ as the equation of the rotated curve.