From 4a5168aeeda4e8f4af4910adb4f6f28579ba7649 Mon Sep 17 00:00:00 2001 From: Ben Eater Date: Thu, 9 Aug 2012 18:00:42 -0700 Subject: [PATCH] Add exercise: Solutions to quadratic equations Reviewers: mark Reviewed By: mark Differential Revision: http://phabricator.khanacademy.org/D569 --- .../solutions_to_quadratic_equations.html | 151 ++++++++++++++++++ 1 file changed, 151 insertions(+) create mode 100644 exercises/solutions_to_quadratic_equations.html diff --git a/exercises/solutions_to_quadratic_equations.html b/exercises/solutions_to_quadratic_equations.html new file mode 100644 index 000000000..baf5ca576 --- /dev/null +++ b/exercises/solutions_to_quadratic_equations.html @@ -0,0 +1,151 @@ + + + + + Solutions to quadratic equations + + + +
+
+
+
+ "One rational solution" + randRangeNonZero(-6, 6) * 2 + randFromArray(getFactors(B * B / 4)) + (B * B) / (4 * A) + B * B - 4 * A * C +
+ +

+ Describe the solutions to the following quadratic equation: +

+
+ + expr(["+", + ["*", A, ["^", "x", 2]], + ["*", B, "x"], + C]) + = 0 +
+ +
ANSWER
+
    +
  • One rational solution
  • +
  • Two rational solutions
  • +
  • Two irrational solutions
  • +
  • One complex solution
  • +
  • Two complex solutions
  • +
+ +
+
+

+ We could use the quadratic formula to solve for the + solutions and see what they are, but there's a + shortcut... +

+

\qquad + x = \dfrac{-b \pm \sqrt{b^2 - 4ac}}{2a} + +

+
+ +
+ Think about what the part of the quadratic + formula under the + radical tells us about the solutions. +
+
+
+

+ Substitute the a, b, and + c coefficients from the quadratic + equation: +

+

+ \qquad\begin{array} + && b^2-4ac \\ \\ + =& B^2 - 4 ( + A)(C) \\ \\ + =& DISCRIMINANT + \end{array} + +

+
+

+ Because \blue{b^2 - 4ac} = 0, then the + quadratic formula reduces to + \dfrac{-b}{2a}, which means there + is just one rational solution. +

+

+ Because \blue{b^2 - 4ac} is negative, its + square is imaginary and the quadratic formula reduces to + \dfrac{-b \pm \sqrt{DISCRIMINANT}}{2a} + , which means there are two complex solutions. +

+

+ Because \blue{b^2 - 4ac} is a perfect + square, its square root is rational and the + quadratic formula reduces to + \dfrac{-b \pm sqrt(DISCRIMINANT)}{2a} + , which means there are two rational solutions. +

+

+ Because \blue{b^2 - 4ac} is not a perfect + square, its square root is irrational and the + quadratic formula reduces to + \dfrac{-b \pm \sqrt{DISCRIMINANT}}{2a} + , which means there are two irrational solutions. +

+
+
+ +
+
+ "Two rational solutions" +
+ randRangeNonZero(-9, 9) + randRangeNonZero(-9, 9) + randRangeNonZero(-9, 9) + B * B - 4 * A * C +
+
+
+ +
+
+ "Two irrational solutions" +
+ randRangeNonZero(-9, 9) + randRangeNonZero(-9, 9) + randRangeNonZero(-9, 9) + B * B - 4 * A * C +
+
+
+ +
+
+ "Two complex solutions" +
+ randRangeNonZero(-9, 9) + randRangeNonZero(-9, 9) + randRangeNonZero(-9, 9) + B * B - 4 * A * C +
+
+
+
+
+ +