# Khan/khan-exercises

Fetching contributors…
Cannot retrieve contributors at this time
50 lines (41 sloc) 2.45 KB
 Equation of an ellipse
randRange( 2, 9 ) randRange( 2, 9 ) randRange( -9, 9 ) randRange( -9, 9 ) max( A, B ) min( A, B) H === 0 ? "\\dfrac{x^2}{" + A*A + "}" : "\\dfrac {" + expr(["^", ["+", "x", -H], 2]) + "}{" + A*A +"}" K === 0 ? "\\dfrac{y^2}{" + B*B + "}" : "\\dfrac {" + expr(["^", ["+", "y", -K], 2]) + "}{" + B*B +"}"

The equation of an ellipse E is rand(2) === 1 ? expr(["+", Y2T, X2T]) : expr(["+", X2T, Y2T]) = 1.

What are its center (h, k) and its major and minor radius?

(h, k) = (H, K)

Major radius = MAJ

Minor radius = MIN

The equation of an ellipse with center (h, k) is \dfrac{(x - h)^2}{a^2} + \dfrac{(y - k)^2}{b^2} = 1.

We can rewrite the given equation as \dfrac{(x - negParens(H))^2}{A*A} + \dfrac{(y - negParens(K))^2}{B*B} = 1 .

Thus, the center (h, k) = (H, K).

MAJ*MAJ is bigger than MIN*MIN so the major radius is \sqrt{MAJ*MAJ} = MAJ and the minor radius is \sqrt{MIN*MIN} = MIN.