<s>[INST] Find an ellipse from two points and the tangent at a third point I am searching an ellipse in the form $\frac{\left(x - x_\circ\right)^2}{a^2} +  \tfrac{\left(y - y_\circ\right)^2}{b^2} = 1$ (its axis parallel to the coordinate axes). What I know are three points, and for one of them I additionally know the direction ϑ of the tangent. I only need to consider solvable situations where the three points are distinct, not in a line, and the tangent will not pass between the two other points.

How can I get $x_0$,  $y_0$, a and b for this ellipse? From visual guesswork, I am pretty sure there is only one solution, but I have no idea how to get there.
 [/INST] You have $4$ unknowns, which are, $a, b, x_0, y_0$, and you can write down $4$ equations, so from dimensionality the problem should be solvable.  Let the three points be $P_1(x_1, y_1), P_2(x_2, y_2), P_3 (x_3, y_3)$.  The equation of the ellipse to be identified is
$ A x^2 + B xy + C y^2 + D x + E y + F = 0 $
Since, the axes of the ellipse are parallel to the coordinate axes, $B = 0$.
We can also take $A = 1$.  Hence,
$ x^2 + C y^2 + D x + E y + F = 0 \hspace{24pt} (1)$
which is an equation with $4 $ unknowns $C, D, E, F$
Differentiating $(1)$ implictly, we obtain,
$ 2 x + 2 C y y' + D + E y' = 0 \hspace{24pt} (2)$
Now plug in the three points that you have into $(1)$ , and also the slope value $y'_1 = \tan \theta$ into (2), you obtain the following system of equations:
$ x_1^2 + C y_1^2 + D x_1 + E y_1 + F = 0 \hspace{24pt} (3)$
$ x_2^2 + C y_2^2 + D x_2 + E y_2 + F = 0 \hspace{24pt} (4)$
$ x_3^2 + C y_3^2 + D x_3 + E y_3 + F = 0 \hspace{24pt} (5)$
and assuming the point with the known slope is the first one, then
$ 2 x_1 + 2 C y_1 \tan \theta + D + E \tan \theta = 0 \hspace{24pt} $
To account for any value of $\theta$, multiply the last equation by $\cos \theta$:
$ 2 x_1 \cos \theta + 2 C y_1 \sin \theta + D \cos \theta + E \sin \theta = 0\hspace{24pt}(6)$
Equations $(3), (4), (5), (6)$ is a linear system of four equations in the four unknowns $C, D, E, F$, and can be readily solved.
Once we have the values of $C, D, E, F$, then it should be straight forward to find $a, b, x_0, y_0$.
We have
$ x^2 + C y^2 + D x + E y + F = 0 \hspace{24pt} (1)$
Completing the squares in $x$ and $y$:
$ (x + \dfrac{D}{2} )^2 - \dfrac{D^2}{4} + C (y + \dfrac{E}{2 C})^2 - \dfrac{E^2}{4C} + F = 0 $
Hence, $x_0 = - \dfrac{D}{2}$, $y_0 = - \dfrac{E}{2 C} $
So that the equation now is
$ (x - x_0)^2 + C (y - y_0)^2 = K $
where $ K = - F + \dfrac{D^2}{4} + \dfrac{E^2}{4C} $
Dividing by $K$ ,
$ \dfrac{(x - x_0)^2}{K} + \dfrac{ (y - y_0)^2 }{ K / C } = 1 $
So $a = \sqrt{K} $, and $b = \sqrt{\dfrac{K}{C} } $
</s>