# Sin curve

1. Nov 3, 2005

### Tido611

is there a way to turn a sin curve (sin(x)) from a horizontal graph to a 45 degree, y=x graph mathematically

2. Nov 3, 2005

### James R

Yes.

Your initial equation is y=sin x

Put

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

where, in your case $\theta = 45$ degrees.

$$\frac{1}{\sqrt{2}}(x' + y') = \sin \left[ \frac{1}{\sqrt{2}}(x' - y') \right]$$

Now, the only problem you have is to rearrange this so as to write y' in terms of x'.

3. Nov 4, 2005

### TD

You rotated over an angle of -45° because your minus-sign was placed wrongly. You have to be careful whether it's the coordinate axis which are being rotated or the function itself. In this case, the rotation matrix is:

$$\left( {\begin{array}{*{20}c} {\cos \theta } & {\sin \theta } \\ { - \sin \theta } & {\cos \theta } \\ \end{array}} \right)$$

giving the new equation:

$$\frac{1}{\sqrt{2}}(y' - x') = \sin \left[ \frac{1}{\sqrt{2}}(x' + y') \right]$$

4. Nov 6, 2005

Fair enough.