Using partial derivatives, I found centre of the conic as $(0,1)$ and I think the conic represents an ellipse. But I am not able to find the rest of the answers.

  • $\begingroup$ Can you elaborate on how you found the center? $\endgroup$ Commented Jan 5, 2021 at 17:16
  • $\begingroup$ zdaugherty.ccnysites.cuny.edu/teaching/m202s16/resources/… $\endgroup$
    – saulspatz
    Commented Jan 5, 2021 at 17:20
  • $\begingroup$ @Chrystomath partial derivatives wrt x and y gives two equation, which we then solve to get centre coordinates $\endgroup$
    – Aditya
    Commented Jan 5, 2021 at 17:24
  • $\begingroup$ math.stackexchange.com/questions/993625/… $\endgroup$ Commented Jan 5, 2021 at 17:47
  • 1
    $\begingroup$ Given that you know the center of your ellipse, you can get a simpler equation by the substitutions $X=x$, $Y=y-1$. A bit of algebra then shows that $$21X^2-6XY+29Y^2=180.$$ So now you only have to determine the axes and the eccentricity. $\endgroup$ Commented Jan 5, 2021 at 18:02

5 Answers 5


Let $$f(x,y)= 21x^2 -6xy +29y^2 +6x-58y-151 $$ $$f_x’(x,y)= 42x-6y+6$$ $$f_y’(x,y)= 6x+58y-58$$ The center $(0,1)$ is obtained via $f’_x=f’_y=0$ and by matching the normal vectors at vertexes, i.e. $$f’_x:f’_y=(x-0):(y-1)$$ the equations for the major and minor axes are obtained $$3y-x-3=0,\>\>\>\>\>y+3x-1=0$$ Then, substitute them into $f(x,y)= 0$ to get the major vertexes $(\pm\frac9{\sqrt{10}},1\pm\frac3{\sqrt{10}})$ and the minor vertexes $(\mp\sqrt{\frac35},1\pm3\sqrt{\frac35})$, and in turn their respective lengths $2a=6$ and $2b=2\sqrt6$. Thus, the eccentricity is $e=\sqrt{1-\frac{b^2}{a^2}}= \frac1{\sqrt3}$.

  • $\begingroup$ What do you mean by 'matching the normal vectors at vertexes' and then how did you obtain the major and minor axes directly. $\endgroup$
    – Maverick
    Commented Jan 5, 2021 at 20:22
  • $\begingroup$ @Maverick - At the vertexes, the vectors normal to the curve $(f_x’,f_y’)$ are parallel to the vectors connecting the center and the vertexes, i.e. $(x-0, y-1)$. Then, solve the matching equation to obtain the axes. $\endgroup$
    – Quanto
    Commented Jan 5, 2021 at 20:36
  • $\begingroup$ @Quanto-Somehow I still don't get it. What are normal vectors actually and why should the be parallel to vectors connecting center and vertices $\endgroup$
    – Maverick
    Commented Jan 6, 2021 at 3:55
  • $\begingroup$ @Maverick - in other words, they are perpendicular to the tangent lines and parallel to the elliptical axes at the vextexes. $\endgroup$
    – Quanto
    Commented Jan 6, 2021 at 4:33
  • $\begingroup$ can you explain how you got the equation for major and minor axes im not able to understand @Quanto $\endgroup$ Commented Mar 20, 2023 at 13:47

Since Quanto has given an answer using calculus, I'll give an answer using linear algebra alone. First, we may express this conic in terms of matrix multiplication:

$$21x^2 -6xy +29y^2 +6x-58y-151=v^\top M v=0$$ where $v=(x,y,1)^\top$ and

$$M=M^\top=\begin{pmatrix} 21 & -3 & 3 \\ -3 & 29 & -29 \\ 3 & -29 & -151\end{pmatrix}.$$

The presence of nonzero off-diagonal entries in the last row and last column signals that it's not centered, since these lead to the linear terms in the equation. These may be eliminated by adding the second row to the third and then the second column to the third. These are jointly implemented by a similarity transformation with the appropriate upper-triangular matrix $U$:

$$M'=U^\top M U = \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 0 \\ 0 & 1 & 1\end{pmatrix} \begin{pmatrix} 21 & -3 & 3 \\ -3 & 29 & -29 \\ 3 & -29 & -151\end{pmatrix} \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & 1 \\ 0 & 0 & 1\end{pmatrix} =\begin{pmatrix} 21 & -3 & 0 \\ -3 & 29 & 0 \\ 0 & 0 & -180\end{pmatrix}.$$

We can now diagonalize $M'$ by hand. By inspection, it has an eigenvalue $-180$. The remaining $2$-by-$2$ block has determinant $600$ and trace $50$, and thus we deduce that the remaining eigenvalues are $30,20$. Computing the eigenvectors by inspection, we deduce that $M''$ is diagonalized as $M'=R \Lambda R^{-1}$ where $\Lambda=\operatorname{diag}(30,20,-180)$ and $$R=\begin{pmatrix} \frac{1}{\sqrt{10}} & \frac{3}{\sqrt{10}}&0 \\ -\frac{3}{\sqrt{10}} & \frac{1}{\sqrt{10}} & 0 \\ 0 & 0 & 1\end{pmatrix}.$$ Note that the columns of $R$ are the orthonormal eigenvectors of $M'$ and thus $R^\top=R^{-1}$. Putting these together, we have \begin{align} v^\top M v &=v^\top (U^{-1})^\top M' U^{-1} v\\ &=(U^{-1}v)^\top R \Lambda R^{-1} U^{-1} v\\ &=(R^{-1}U^{-1}v)^\top \Lambda (R^{-1} U^{-1})v\\ &=u^\top \Lambda u \end{align} where $u=R^{-1}U^{-1} v=(UR)^{-1}v$ gives the transformation to a coordinate system in which the ellipse is aligned with the axes. Explicitly, we have $$u=R^{-1}U^{-1}v =\begin{pmatrix} \frac{1}{\sqrt{10}} & -\frac{3}{\sqrt{10}}&0 \\ \frac{3}{\sqrt{10}} & \frac{1}{\sqrt{10}} & 0 \\ 0 & 0 & 1\end{pmatrix} \begin{pmatrix} 1 & 0 & 0 \\ 0 & 1 & -1 \\ 0 & 0 & 1\end{pmatrix}\begin{pmatrix} x \\ y \\ 1\end{pmatrix} =\begin{pmatrix} \frac{1}{\sqrt{10}}(x-3y+3) \\ \frac{1}{\sqrt{10}}(3x+y-1) \\ 1\end{pmatrix}.$$ We may thus write $u=(x',y',1)^\top$. In terms of the new coordinates, we have $$30x'^2+20y'^2=180\implies\frac{x'^2}{6}+\frac{y'^2}{9}=1.$$ The lengths of the axes are evidently $\sqrt{6}$ and $3$ respectively, and the eccentricity is $\sqrt{1-6/9}=1/\sqrt{3}$. Since the new coordinates are obtained by first translating and then rotating the system, this transformation doesn't change the dimensions and therefore these values also describe the original ellipse. In addition, we may note that the point $(x,y)=(0,1)$ is mapped to $(x',y')=(0,0)$ which we recognize as the center of the ellipse in these coordinates. Hence $(0,1)$ is indeed the center of the original ellipse.

P.S. I can't resist doing a little bit of calculus. Writing $f(x,y)=v^\top M v$ as above, we may write $f_x=2 v^\top M e_1$ and $f_y=2v^\top Me_2$. The condition that $f_x=f_y=0$, then, corresponds to choosing $v=(x,y,1)^\top$ such that it's orthogonal to both $Me_1=(21,-3,3)^\top$ and $Me_2=(-3,29,-29)$. This is readily accomplished by taking the cross product of these last two vectors, obtaining $$(Me_1)\times (Me_2) = (0,600,600).$$ From this we deduce that the vector $(0,1,1)$ will suffice and therefore the center is at $(0,1)$.


EDIT: simpler solution: Once we've obtained the shifted equation of the ellipse (therefore we got rid of the 1-degree terms) $$21X^2 - 6XY + 29Y^2 - 180 = 0$$ We can now write any point on the ellipse as $(r\sin\theta, r\cos\theta)$ where both $r$ and $\theta$ are variable. Substitute $X$ and $Y$ for this variable point, and obtain the function for $r$ varying on $\theta$. Since $r$ represents distance from $(X,Y)\equiv(0,0)$, we get the lengths of the semi minor and major axes by optimization.

I tried to use only basic coordinate geometry and a little optimization.

Reduce this by shifting to $21X^2-6XY+29Y^2-180=0$ and derive the condition of tangency for any line $Y=mX+c$, in which both $m$ and $c$ are variable. This comes out to be $$c^2=\frac{3}{10}(29m^2-6m+21)$$ In order to find the lengths of the semi-minor and -major axes, we write the expression for distance of tangent from the centre of the ellipse. Because the origin is shifted and the centre of the shifted ellipse is $(0,0)$, the lengths of the semi-minor and major-axes will merely be the maximum and minimum distances of the tangent from the origin.

Perpendicular distance of line from origin: $$\frac{|c|}{\sqrt{1+m^2}}=\sqrt{\frac{3}{10}\frac{29m^2-6m+21}{1+m^2}}$$

Now we minimize and maximize this to get the lengths of semi-minor and semi-major axes.

  • $\begingroup$ See also the answer which inspired my answer by @Hypergeometricx (I thought that if one could do it with circles, why not parallel tangents?) math.stackexchange.com/questions/993625/… $\endgroup$
    – zxayn
    Commented Dec 19, 2023 at 18:19

Another way.

By the rotation angle formula of the ellipse: $\tan2\theta=\frac{b}{c-a}=\frac{-6}{29-21}=-\frac34$, we have $\cos\theta=\frac3{\sqrt{10}}$ and $\sin\theta=-\frac1{\sqrt{10}}$ with the arbitrary sign choice.

We rotate the elipse by the substitution $x\to\frac{3x-y}{\sqrt{10}}$ and $y\to\frac{x+3y}{\sqrt{10}}$ and find $$\frac{(x-\frac{1}{\sqrt{10}})^2}{9}+\frac{(y-\frac3{\sqrt{10}})^2}{6}=1.$$ Hence, we have $a=3$, $b=\sqrt6$, $c=\sqrt{a^2-b^2}=\sqrt3$ and the eccentricity is $e=\frac ca=\frac1{\sqrt3}$.

The center of the rotated ellipse is $M'(\frac1{\sqrt{10}},\frac3{\sqrt{10}})$. We find the center of original ellipse by back rotation: $$\left[\matrix{\frac3{\sqrt{10}} & -\frac1{\sqrt{10}}\\\frac1{\sqrt{10}}&\frac3{\sqrt{10}}}\right]\left[\matrix{\frac1{\sqrt{10}} \\\frac3{\sqrt{10}}}\right]=\left[\matrix{0\\1}\right]. $$ I am confused by signs but the result is true.


The fact that there is an $xy$ term means that the axes of the conic are rotated from the coordinate axes. So the first thing I would do is rotate to new $x'y'$ at some angle $\theta$: $$x= x'\cos(\theta)- y'\sin(\theta), \quad y= x'\sin(\theta)+ y'\cos(\theta)$$

\begin{align} 21x^2&= 21(x'^2\cos^2(\theta)- 2x'y'\sin(\theta)\cos(\theta)+ y'^2\sin^2(\theta))\\ -6xy&= -6(x'^2\cos(\theta)\sin(\theta)+ x'y'(\cos^2(\theta)- \sin^2(\theta))- y'^2\sin(\theta)\cos(\theta))\\ 29y^2&= 29(x'^2\sin^2(\theta)+ 2x'y'\sin(\theta)\cos(\theta)+y'^2\cos^2(\theta)\\\\ 21x^2- 6xy+ 29y^2&= (21\cos^2(\theta)- 6\cos(\theta)\sin(\theta)+ 29\sin^2(\theta))x'^2\\&\qquad+ (-6\cos^2(\theta)+ 6\sin^2(\theta)+ 21\sin(\theta)\cos(\theta)+ 58\sin(\theta)\cos(\theta))x'y'\\ &\qquad+ (21\sin^2(\theta)+ 6\sin(\theta)\cos(\theta)+ \cos^2(\theta)y'^2 \end{align}

The point is to eliminate the coefficient of $x'y'$ so we must have $$-6\cos^2(\theta)+ 6\sin^2(\theta)+ 21\sin(\theta)\cos(\theta)+ 58\sin(\theta)\cos(\theta)= 0$$ or $$6\sin^2(\theta)+ 69\sin(\theta)\cos(\theta)- 6\cos^2(\theta)= 0$$

We can think of that as the quadratic equation $6X^2+ 69XY- 6Y^2= 0$. By the quadratic formula $$X= \frac{-69Y\pm\sqrt{4761Y^2+ 144Y^2}}{12}= \frac{-69Y\pm Y\sqrt{4905}}{12}= \frac{1.03}{12}Y.$$ So $\sin(\theta)= \dfrac{1.03}{12}cos(\theta)$ and $\tan(\theta)= \dfrac{1.03}{12}$.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .