Ellipse in the triangle Find the equation of an ellipse if its center is S(2,1) and the edges of a triangle PQR are tangent lines to this ellipse. P(0,0), Q(5,0), R(0,4). 
My attempt: Let take a point on the line PQ. For example (m,0). Then we have an equation of a tangent line for this point: $(a_{11}m+a_1)x+(a_{12}m+a_2)y+(a_1m+a)=0$, where $a_{11}$ etc are coefficients of our ellipse: $a_{11}x^2+2a_{12}xy+a_{22}y^2+2a_1x+2a_2y+a=0$. Now if PQ: y=0, then $(a_{11}m+a_1)=0$, $a_{12}m+a_2=1$, $a_1m+a=0$.I've tried this method for other 2 lines PR and RQ and I got 11 equations (including equations of a center)! Is there a better solution to this problem?

Translate the center to the origin.. the triangle translates to
The translated points become $(-2,-1), (3,-1), (-2,3)$
I considered this on the projective plane, I don't know if that makes it any easier, but that is what I did... if you don't know projective geometry, just set $z = 1$ in everything that follows.
$\begin {bmatrix} x&y&z\end{bmatrix}
\begin {bmatrix} A&B&0\\B&C&0\\0&0&D\end{bmatrix}
\begin{bmatrix} x\\y\\z\end{bmatrix} = 0$
Describes a cone, which when it intersects the plane $z = 1$ forms the ellipse
i.e. $Ax^2 + 2Bxy + Cy^2 + D = 0$
The planes $x + 2z = 0, y+z = 0$ and $4x + 5y - 7z = 0$ are tangent to the cone.
Consider the triplet $(B,-A, 1)$
$\begin {bmatrix} A&B&0\\B&C&0\\0&0&D\end{bmatrix}
\begin{bmatrix} B\\-A\\1\end{bmatrix} = \begin{bmatrix} 0 \\ B^2 - AC \\ D \end{bmatrix}$
If $A = 1$ this point lies in the plane $y + z = 0.$
And if $D = B^2 - AC$
$\begin{bmatrix} B&-1&1\end{bmatrix}\begin{bmatrix} 0 \\ B^2 - AC \\ B^2 - AC \end{bmatrix}= 0$
The point is on our cone.
Similarly  $(-\frac {C}{2},\frac {B}{2}, 1)$
$\begin {bmatrix} A&B&0\\B&C&0\\0&0&B^2 - AC\end{bmatrix}
\begin{bmatrix} -\frac {C}{2}\\ \frac {B}{2}\\1\end{bmatrix} =
\begin{bmatrix} \frac 12 (B^2 - AC) \\ 0\\ B^2 - AC\end{bmatrix}$
If $C = 4$ the point is on the plane $x + 2z = 0$ and on the cone.  Our matrix thus far.
$\begin {bmatrix} 1&B&0\\B&4&0\\0&0&B^2-4\end{bmatrix}$
We just need an equation for the 3rd point of tangency.
$(\frac {4C - 5B}{7}, \frac {5A-4B}{7}, 1)$
If it is in the plane $4x + 5y - 7z = 0$
$4\frac {4C - 5B}{7} + 5\frac {5A - 4B}{7} - 7 = 0\\
4\frac {16 - 5B}{7} + 5\frac {5 - 4B}{7} - 7 = 0\\
64 - 40 B + 25 - 49 = 0\\
40-40B = 0\\
B = 1$
And finally we need to check to see if this point is on the cone.
$\begin {bmatrix} 1&1&0\\1&4&0\\0&0&-3\end{bmatrix}
\begin{bmatrix} \frac {11}{7}\\ \frac {1}{7}\\1\end{bmatrix} =
\begin{bmatrix} \frac {12}7  \\ \frac {15}{7} \\-3\end{bmatrix}$
$\begin{bmatrix} \frac {11}{7} & \frac {1}{7} & 1\end{bmatrix} =
\begin{bmatrix} \frac {12}7  \\ \frac {15}{7} \\-3\end{bmatrix} = \frac {132 + 15}{49} - 3 = 0$
$x^2 + 2xy + 4y^2 - 3 =0$
And finally translate back to the original coordinates
$(x-2)^2 + 2(x-2)(y-1) + 4(y-1)^2 - 3 = 0$
