# publicKhan/khan-exercises

### Subversion checkout URL

You can clone with HTTPS or Subversion.

Fetching contributors…

Cannot retrieve contributors at this time

file 82 lines (72 sloc) 4.282 kb
 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81         Equation of a hyperbola

randRange(2, 9)        randRange(2, 9)        A * A        B * B        randRange( -9, 9 )        randRange( -9, 9 )        rand(2)        "+"        WHICH_NEG === 1 ? "" : "-"        H === 0 ? "x^2" : expr(["^", ["+", "x", -H], 2])        K === 0 ? "y^2" : expr(["^", ["+", "y", -K], 2])        H === 0 ? "\\dfrac{x^2}{" + A2 + "}" : "\\dfrac {" + expr(["^", ["+", "x", -H], 2]) + "}{" + A2 +"}"         K === 0 ? "\\dfrac{y^2}{" + B2 + "}" : "\\dfrac {" + expr(["^", ["+", "y", -K], 2]) + "}{" + B2 +"}"

The equation of hyperbola H is WHICH_NEG === 1 ? expr(["-", Y2T, X2T]) : expr(["-", X2T, Y2T]) = 1.

What are the asymptotes?

y = \pm B/A                    (x + -H) + K

enter integers, simplified fractions, or exact decimals for each term

pay attention to the sign of each number you enter to be sure the entire equation is correct

We want to rewrite the equation in terms of y, so start off by moving the y terms to one side:

Y2T = Y_MINUS 1 X_MINUS X2T

Multiply both sides of the equation by B2.

Y = {Y_MINUS B2 X_MINUS \dfrac{X \cdot B2}{A2}}

Take the square root of both sides.

\sqrt{Y} = \sqrt{Y_MINUS B2 X_MINUS \dfrac{X \cdot B2}{A2}}

plus("y", -K) = \pm \sqrt{Y_MINUS B2 X_MINUS \dfrac{X \cdot B2}{A2}}

As x approaches positive or negative infinity, the constant term in the square root matters less and less, so we can just ignore it.

plus("y", -K) \approx \pm \sqrt{\dfrac{X \cdot B2}{A2}}

plus("y", -K) \approx \pm \left(\dfrac{B \cdot (plus("x", -H))}{A}\right)

Add K to both sides and rewrite                Subtract -K from both sides and rewrite                Rewrite                as an equality in terms of y to get the equation of the asymptotes:

y = \pm fractionReduce(B, A)(plus( "x", -H ))K >= 0 ? "+" : "" K

Something went wrong with that request. Please try again.