Is there a way to rotate the graph of a function? Assuming I have the graph of a function $f(x)$ is there function $f_1(f(x))$ that will give me a rotated version of the graph of that function?
For example if I plot $\sin(x)$ I will get a sine wave which straddles the $x$-axis, can I apply a function to $\sin(x)$ to yield a wave that straddles the line that would result from $y = 2x$?
 A: Yes you can, but it might not be a function.
Say y = f(x) is the curve you want to rotate.
Then the equation of the curve of f(x) rotated by n radians is:
ycos(n) - xsin(n) = f(ysin(n) + xcos(n))
Try it out here: https://www.desmos.com/calculator
A: For common functions, it ms very easy.  $f(x)$ rotated $\phi$ is can be calculated by $(x+f(x)\cdot i)(\cos(\phi)+\sin(\phi)\cdot i)$ as coordinates instead of complex numbers.  Let's, however, replace $x$ with $t$, just to reduce confusion.
$(t+f(t)\cdot i)(\cos(\phi)+\sin(\phi)\cdot i) =
t\cos(\phi)-f(t)\sin(\phi)+t\sin(\phi)\cdot i+f(t)\cdot \cos(\phi)\cdot i$
In parametric form, that's:
$X=t\cos(\phi)-f(t)\sin(\phi)$
$Y=t\sin(\phi)+f(t)\cos(\phi)$
To convert that to a function, we find $t$ as a function of $x$ and plug that into $Y$ as a function of $t$.
This is possible with some equations, such as $f(t)=t^2$ or $f(t)=\dfrac 1t$.  However, with the sine function, it's not very easy.  In fact, there is no definite function for the rotation of a sine function.  However, you can represent it as an infinite polynomial.
The parametric of this graph would be
$X=\dfrac{t-2\sin(t)}{\sqrt5}$
$Y=\dfrac{2t+\sin(t)}{\sqrt5}$
To approximate a polynomial $y$-as-a-function-of-$x$ formula, we find the coefficients for each part of this formula.
The $x^0$ coefficient is the $y$-intercept divided by $0!$ ($y$ when $x$ is zero)/$0!$
The $x^1$ coefficient is the $y$-intercept of the derivative divided by $1!$
 $((y$ when $x$ is $0.00001)-(y$ when $x$ is $0))/0.00001/1!$
The $x^2$ coefficient is the $y$-intercept of the second derivative divided by $2!$
$((y$ when $x$ is $0.00002)-2*(y$ when $x$ is $0.00001)+(y$ when $x$ is $0))/0.00001/0.00001/2!$
The $x^3$ coefficient is the $y$-intercept of the third derivative divided by $3!$
$((y$ when $x$ is $0.00003)-3*(y$ when $x$ is $0.00002)+3*(y$ when $x$ is $0.00001)-(y$ when $x$ is $0))/0.00001/0.0001/0.0001/3!$
In case you haven't noticed, I'm using Pascal's triangle in this calculation.
I hope this helps!
A: You can do the rotation as Moron says, or you can write $y=2x+\sin(x)$.  This will remain a function, but doesn't have the same shape as a sine wave.  It depends upon what you want.
A: In general, the answer is no since the rotated version of the graph might not be the graph of a function. For instance it could happen that your rotated version of the graph contains two different points with the same $x$-value -- this cannot happen for the graph of a function.
A way out could be to parametrise your graph. So instead of a map $x\mapsto y(x)$ you look at the map $t\mapsto (t,y(t))$. After rotating the trajectory of this thing (not the graph!) it will still be the trajectory of a map $$t\mapsto (x(t),y(t)).$$
A: Once you rotate, it need not remain a function (i.e. one $x$ value can have multiple $y$ values corresponding to it).
But you can use the following transformation
$$x' = x\cos \theta - y \sin \theta$$
$$y' = x \sin \theta + y \cos \theta$$
to rotate by an angle of $\theta$. Point $(x,y)$ gets rotated to point $(x',y')$. Note: this is a rotation about the origin.
In your case of $y = 2x$, you need to rotate by $\arctan(2)$.
See this for more info: Rotation Matrix.
