I'm trying to find a tangent point on an ellipse. Trying a lot, using answers found a.o. on this site, but obviously doing something wrong as I'm not getting any good results.
I've added a sketch, to help make it more clear.
The problem at hand:
I have an ellipse, and am basically looking for the $45^\circ$ tangent point, this is point P in the sketch.
The center of the ellipse is $(0,0)$.
$P$ is $200$ to the right from the origin, and $(b-22)$ up from the origin, so $P$ is at $(200, b-22)$.
For a given major radius $a$, I try to calculate the minor radius $b$.
The answer I need is in the form of $a = f(b)$.
How to do this?
(addition) The formula I managed to derive in different ways before asking here (and which came back in the answers) is $ a = \sqrt{200 \frac{b^2}{b-22}} $. Now when I fill in b=30, I get a=150. That's impossible as in this case point P is not on the ellipse, it's somewhere out of the ellipse.
(solution) First of all, thanks to all that helped out. In the end I realised I was much closer to the answer than I thought; but needed the final bits to put it all together. I've been drawing some nice ellipses now - those things are remarkably tricky to work with! Furthermore, to allow for the needed flexibility, I've replaced the value 200 for x in the image above, with the variable x.
The correct question is: what are the major and minor radiuses of an ellipse so that it passes through point P = (x,b-22) with slope -1?
Slope -1 at P: $$a = \sqrt{\frac{xb^2}{b-22}} $$
Point P on the ellipse: $$\frac{x^2}{a^2}+\frac{(b-22)^2}{b^2} = 1 $$
Substitute the first in the second, and solve:
$$b = \frac{22x-484}{x-44} $$
a in turn is caculated with the first formula. For more details on how these formulas are derived, see also the replies below.


The problem is that the given constraints determine $b$; you are not free to take $b=30$. As others have shown, the constraint on the tangent gives $$ a = b\sqrt{\frac{200}{b-22}} $$ The constraint that $P$ be on the ellipse gives $$ \frac{200^2}{a^2} + \frac{(b-22)^2}{b^2} = 1 $$ Use the first to eliminate $a$ from the second, and you'll get an equation for $b$, which is readily solved to give $$ b = \frac{979}{14} \approx 69.9 $$