5

What is the general equation of the ellipse that is not in the origin and rotated by an angle?

This Post discusses the formula for an ellipse rotated by an angle. Is a similar formula valid for hyperbola? I think it will be $$\frac{((x−h)\cos A+(y−k)\sin A)^2}{a^2}-\frac{((x−h)\sin A−(y−k)\cos A)^2}{b^2}=1$$

Note: I have no idea how to write an equation using code.If someone could do that, that would be great!

Mostafa Ayaz
  • 31,924
  • You can use MathJax to format math. https://math.meta.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference – saulspatz Mar 25 '18 at 13:51

4 Answers4

10

From @amd, we have that $$(x-h)\sin\theta=x''\sin\theta\cos\theta-y''\sin^2\theta\tag{1}$$$$(y-k)\cos\theta=x''\sin\theta\cos\theta+y''\cos^2\theta\tag{2}$$ Now $(2)-(1)$ gives $$y''=(y-k)\cos\theta-(x-h)\sin\theta\tag{3}$$ using the identity $\sin^2\theta+\cos^2\theta=1$.

Hence putting $(3)$ into $y-k=x''\sin\theta+y''\cos\theta$, we get $$x''=\frac{y-k-(y-k)\cos^2\theta+(x-h)\sin\theta\cos\theta}{\sin\theta}=(y-k)\sin\theta+(x-h)\cos\theta\tag{4}$$ since $1-\cos^2\theta=\sin^2\theta$.

Combining $(3)$ and $(4)$, we get $$\left(\frac{(y-k)\sin\theta+(x-h)\cos\theta}a\right)^2-\left(\frac{(y-k)\cos\theta-(x-h)\sin\theta}b\right)^2=1\tag{5}$$

5

The standard equation of an hyperbola in origin is $${x^2\over a^2}-{y^2\over b^2}=1$$We first rotate the hyperbola around the origin and then transport it to some arbitrary point. The rotation matrix is $$\begin{bmatrix}\cos\theta&-\sin\theta\\\sin\theta&\cos\theta\end{bmatrix}$$then by applying it to the standard equation of the hyperbola we obtain $$x'=x\cos\theta-y\sin\theta\\y'=x\sin\theta+y\cos\theta$$which means that$$x=x'\cos\theta+y'\sin\theta\\y=-x'\sin\theta+y'\cos\theta$$so the new equation of the rotated hyperbola is the same you attained whose center is transported to some point $(h,k)$.
For parameterization, notice that the standard form is $$x=a\cosh t\\y=b\sinh t$$so the new parameterization would become $$x=a\cosh t\cos\theta-b\sinh t\sin\theta\\y=a\cosh t\sin\theta+b\sinh t\cos\theta$$

Mostafa Ayaz
  • 31,924
  • 1
    This is interesting. Can you explain to me what angles t and θ are? How do I find them? – alfreema Sep 20 '18 at 14:43
  • 1
    Sure! The angle $\theta$ is the same which you want to rotate the standard hyperbola for example for the hyperbola $x^2-y^2=1$ if we rotate it as much as $\pi\over 4$ counterclockwise, we attain$${(x+y)^2\over 2}-{(x-y)^2\over 2}=1$$which is $$xy={1\over 2}$$ after simplification. The angle $t$ is the parameter for which $x$ and $y$ are functions of and they co-vary so the parameterization becomes $$x={1\over\sqrt 2}(\cosh t-\sinh t)\y={1\over\sqrt 2}(\cosh t-\sinh t)$$for $t\in\Bbb R$ – Mostafa Ayaz Sep 20 '18 at 20:57
  • You can use the above parameterization to plot it using a graphical software such as MATLAB. That's why the parameterization is essential. – Mostafa Ayaz Sep 20 '18 at 20:59
  • @Alfreema, it might be the angle between asymptotes of the hyperbola that you are interested in? If $\frac{(x-x_0)^2}{a^2}-\frac{(y-y_0)^2}{b^2}=1$ is the equation of the hyperbola, then $\frac{(x-x_0)^2}{a^2}-\frac{(y-y_0)^2}{b^2}=0$ is the common equation of the asymptotes. Thus $\pm \frac{b}{a}$ are their slopes. With the use of $\tan \gamma= \frac{b}{a}$ you get the angle between the asymptotes equal to $\min(2\gamma,\pi-2\gamma).$ – user376343 Sep 21 '18 at 11:23
1

It’s a straightforward matter to derive the equation yourself. Rotating a point $(x'',y'')$ through an angle $\theta$ about the origin is done via the transformation $$x' = x''\cos\theta-y''\sin\theta \\ y' = x''\sin\theta+y''\cos\theta$$ and a translation of $(x',y')$ by $(h,k)$ is $$x = x'+h \\ y = y'+k.$$ Combine these two transformations and solve for $x''$ and $y''$ in terms of $x$ and $y$, then substitute into the basic equation $\left({x'' \over a}\right)^2-\left({y'' \over b}\right)^2 = 1$.

amd
  • 53,693
  • Could you complete the substitutions? I want to write an algorithm that will plot hyperbolas at an angle, and the final equation would be helpful. I tried performing the substitutions, but I don't believe I am doing it correctly. – alfreema Sep 17 '18 at 15:56
0

Also you can draw rotated hyperbola using pair of functions $$y_1=\frac{2}{x+\sqrt{\frac{4}{\tan (b)-\tan (a)}+x^2}}+x \tan (b)$$ and $$y_2=\frac{2}{x-\sqrt{\frac{4}{\tan (b)-\tan (a)}+x^2}}+x \tan (b)$$ connected at points $$\left(\frac{-2}{\sqrt{\tan (a)-\tan (b)}},\frac{-\tan (a)-\tan (b)}{\sqrt{\tan (a)-\tan (b)}}\right)$$ and $$\left(\frac{2}{\sqrt{\tan (a)-\tan (b)}},\frac{\tan (a)+\tan (b)}{\sqrt{\tan (a)-\tan (b)}}\right)$$ where $a$ and $b$ - angles of asymptotes. Sample image.

E.Sokol
  • 91
  • 3