1

I don't know if it is possible but I should numerically find out what is the S in my figure. a and b are known as well the angle too. Let's say that a = 100, b = 60 and angle 30 degrees as in figure. Ellipse

3 Answers3

2

The current point of the $+30°$ rotated ellipse being

$$\begin{pmatrix}x\\y\end{pmatrix}=\underbrace{\begin{pmatrix}\cos 30°&-\sin 30°\\\sin 30°&\ \ \ \cos 30°\end{pmatrix}}_{R_{30°}}\begin{pmatrix}a\cos\theta\\b \sin\theta\end{pmatrix}$$

you have to find the maximum $s$ of abscissa :

$$x=x(\theta):=\cos 30° (a \cos\theta)-\sin 30° (b \sin\theta)\tag{1}$$

which occurs for a value of $\theta$ giving a zero value to the derivative :

$$x'(\theta)=0$$

i.e.,

$$\cos 30° (-a \sin\theta)-\sin 30° (b \cos\theta)=0$$

giving

$$\tan \theta =- \dfrac{b}{a} \tan 30° \iff $$

$$\theta=-\arctan(\dfrac{b}{a \sqrt{3}})+k \pi\tag{2}$$

Take care : this equation gives the values of $\theta$ for which there is an extremum (maximum or minimum) : you have to choose among $k=0$ or $k=1$ for obtaining the maximal abscissa.

It remains to plug into (1) the value of $\theta$ given by (2) to obtain the desired value of $s$.

Jean Marie
  • 88,997
2

I like Jean Marie's answer best, but sometimes you get an ellipse defined using the center $\vec{c} = ( c_x , c_y )$, and the two semiaxis vectors, $\vec{a} = ( a_x , b_x )$ and $\vec{b} = ( b_x , b_y )$, so that the entire parametrized ellipse is $$\vec{p} = \vec{c} + \vec{a}\cos\theta + \vec{b}\sin\theta$$ noting that the two semiaxis vectors may not even be the true ones, that is, not even perpendicular to each other.

In this case, the $x$ coordinate as a function of the parameter $\theta$ is $$x = c_x + a_x \cos\theta + b_x \sin\theta$$ This reaches an extremum when its derivative with respect to $\theta$ is zero, $$\frac{d x}{d \theta} = b_x \cos\theta - a_x \sin\theta = 0$$ Rearranging the terms we get $$\frac{\sin\theta}{\cos\theta} = \frac{b_x}{a_x}$$ and therefore, at the extrema, $$\theta = \arctan\left(\frac{b_x}{a_x}\right)$$ Substituting back to the equation for $x$, we get $$x_\text{extrema} = c_x \pm \sqrt{a_x^2 + b_x^2}$$ and therefore the largest $x$ coordinate in an ellipse defined this way is $$x_\text{max} = c_x + \sqrt{a_x^2 + b_x^2}$$

Example
  • 166
1

An ellipse can be described as constant function $f(x,y)$. For example, a general ellipse can be described by $$ f(x,y) = \frac{x^2}{a^2}+\frac{y^2}{b^2} =1. $$ If you compute the gradient vector $$\nabla f =\begin{pmatrix} \partial_x f\\\partial_y f\end{pmatrix} $$ You get a vector which is perpendicular to the levelset described by f. Since you know that in the rightmost point the $y$ component of the normal of the ellipse equals $0$, you can then solve for a set of coordinates that satisfy this condition. This set is all points lying on the straight line passing from the most left point to the most right point of the ellipse. Using this, you can find which two coordinates both on the ellipse and on the line, thereby giving you a coordinate for both the most left and most right point.

  • 2
    But $x^2/a^2+y^2/b^2=1$ is not that general : it is the equation of the non-tilted ellipse ; you have first to obtain the cartesian equation of the tilted ellipse. – Jean Marie Jun 12 '20 at 10:01
  • If you know $a$ $b$ and the angle as in the question above, you can also find the cartesian equation. – User123456789 Jun 12 '20 at 12:53
  • Sure, but your gradient approach doesn't really add anything. Note that the gradient is essentially trivial for this function. If your ellipse is already in this form, then the rightmost point is $(a, 0)$ and you can skip the rest of the answer. – Mees de Vries Jun 12 '20 at 22:24