# Khan/khan-exercises

Switch branches/tags
Nothing to show
Fetching contributors…
Cannot retrieve contributors at this time
182 lines (173 sloc) 7.81 KB
 Graphing circles 2
randRange(-5, 5) randRange(-5, 5) randRange(1, 5) H === 0 ? "x^2" : expr(["^", ["+", "x", -H], 2]) K === 0 ? "y^2" : expr(["^", ["+", "y", -K], 2]) -2 * H -2 * K H * H + K * K - R * R

Graph the circle expr(["+", "x^2", "y^2", D === 0 ? null : ["*", D, "x"], E === 0 ? null : ["*", E, "y"], F === 0 ? null : F]) = 0.

graphInit({ range: 11, scale: 20, axisArrows: "<->", tickStep: 1, labelStep: 1, gridOpacity: 0.05, axisOpacity: 0.2, tickOpacity: 0.4, labelOpacity: 0.5 }); label( [ 0, 11 ], "y", "above" ); label( [ 11, 0 ], "x", "right" ); addMouseLayer(); graph.circle = addCircleGraph();
Drag the center point and perimeter of the circle to graph the equation.
if (_.isEqual(guess, [0, 0, 2])) { return ""; } return _.isEqual(guess, [H, K, R]);

First, convert the equation to standard form by completing the square.

Group the \blue{x} and \green{y} terms on the left side and move the constant term to the right side.

\qquad \blue{ (expr(["+", "x^2", ["*", D, "x"]])) (x^2) } + \green{ (expr(["+", "y^2", ["*", E, "y"]])) (y^2) } \quad = \quad -F

Add \blue{H * H} to both sides to complete the square for the \blue{x} term and \green{K * K} to both sides to complete the square for the \green{y} term.

\qquad \blue{ ( expr(["+", "x^2", ["*", D, "x"], H * H]) ) (x^2) } + \green{ ( expr(["+", "y^2", ["*", E, "y"], K * K]) ) (y^2) } \quad = \quad -F + \blue{H * H} + \green{K * K}

Simplify and write each term as a square: