1

I have the following equation of an ellipse:

$$ C=(x-a)^2+(y-a)^2+bxy $$

I would like to solve the equation for $x$ given $y$. $C$, $a$, and $b$ are all constants which are given and do not need to be solved for.

The solution should be a real number, but does not need to be an integer. I understand some values of x may not exist on the ellipse and there will be more than 1 x for a given y. My aim is to just re-write the above equation in terms of $x=$ ...

My first approach is to use Completing the Square or the Quadratic Formula. I found this math exchange post to helpful in applying Completing the Square

The equation can be re-written as:

$$ C-2a^2=x^2+bxy+y^2-2ax-2ay $$

which produces this $x^2+bxy+y^2$, which seems helpful but the math exchange post above solves for $x^2-xy+y^2$ which it isn't exactly the same. I think if I could apply the concept from the math exchange post but for $x^2+bxy+y^2$, that would get me very close to the solution.

--

Using the suggestion (comment) from @dxiv, we can re-write this as:

$$ C-a^2=x^2+x(by-2a)+y^2-2ay+a^2 $$

which can then be solved by completing the square.

I appreciate any help.

luca590
  • 113
  • 1
    The square you want to complete is $x^2+2 \cdot \frac{by-2a}{2} \cdot x + \left( \frac{by-2a}{2}\right)^2$. – dxiv May 29 '21 at 05:03
  • thanks for the comment, so you're saying that $2++2 = 2+2⋅(−2)/2⋅+((−2)/2)^2$ , is that correct? – luca590 May 29 '21 at 05:12
  • 1
    Those are not equal. What I am saying is to look at it as a quadratic in $x$, which is $x^2+(by-2a)x+y^2-2ay + a^2$, then complete the square as you would normally do for any quadratic. – dxiv May 29 '21 at 05:18
  • Oh I see, that's super helpful, thanks. I just updated the question with your comment, is this update correct? let me work on it a bit more now with this and then update with further progress. – luca590 May 29 '21 at 05:26
  • 1
    That's correct. Once you work it out, it's better to post it as a self-answer rather than adding the solution to the question. – dxiv May 29 '21 at 05:30
  • Okay, understood. I might need more help but let me try this first. Thanks – luca590 May 29 '21 at 05:31

1 Answers1

1

As @dxiv suggested and you have done, $$x^2+(by-2a)x+(y^2-2ay+2a^2-C)=0$$ Let $by-2a=k$ and $y^2-2ay+2a^2-C=l$, where both quantities are known. Then using the quadratic formula, we have: $$x=\frac {-k \pm \sqrt{k^2-4m}}{2}$$ The quadratic formula itself comes from the completing of square method, to see this, we have: $$(x^2-2(\frac k2)x+\frac {k^2}{4})+m-\frac {k^2}{4}=0$$ Hence we have $x$ in terms of $y$. Note how for every $y$, if $D>0$, we get $2$ distinct values of $x$, which is what you would expect from an ellipse.

Ritam_Dasgupta
  • 5,992
  • 2
  • 8
  • 23