document.write( "Question 245854: Prove the quadratic formula by completing the square.\r
\n" ); document.write( "\n" ); document.write( "ax^2+by=-c
\n" ); document.write( "

Algebra.Com's Answer #179523 by jsmallt9(3758)\"\" \"About 
You can put this solution on YOUR website!
\"ax%5E2+%2B+bx+=+-c\"
\n" ); document.write( "Completing the square means we want one side of the equation to match left side of the pattern: \"p%5E2+%2B+2pq+%2B+q%5E2+=+%28p%2Bq%29%5E2\". Matching this pattern is easier if the leading coefficient is 1 so I'll divide both sides by a:
\n" ); document.write( "\"x%5E2+%2B+%28b%2Fa%29x+=+%28-c%29%2Fa\"
\n" ); document.write( "Now comes the tricky part. We need to figure what third term we need on the left side to match the pattern. With a leading coefficient of 1, this is a little easier. The third term we need is the square of 1/2 of the coefficient of x. The coefficient of x is b/a and 1/2 of this is b/2a and the square of b/2a is \"%28b%2F2a%29%5E2\". This is the third term we need. So we will create it by adding it to both sides of the equation:
\n" ); document.write( "\"x%5E2+%2B+%28b%2Fa%29x+%2B+%28b%2F2a%29%5E2+=++%28b%2F2a%29%5E2+%2B+%28-c%29%2Fa\"
\n" ); document.write( "We now have the left side matching the pattern. So we can rewrite it as a perfect square:
\n" ); document.write( "\"%28x+%2B+b%2F2a%29%5E2+=++%28b%2F2a%29%5E2+%2B+%28-c%29%2Fa\"
\n" ); document.write( "(If you don't see this, multiply out the left side and see if you get \"x%5E2+%2B+%28b%2Fa%29x+%2B+%28b%2F2a%29%5E2\"). We have now completed the square. The rest is solving for x.

\n" ); document.write( "On the right side we need to do some simplifying:
\n" ); document.write( "\"%28x+%2B+b%2F2a%29%5E2+=++b%5E2%2F4a%5E2+%2B+%28-c%29%2Fa\"
\n" ); document.write( "Get the denominators equal so we can add:
\n" ); document.write( "\"%28x+%2B+b%2F2a%29%5E2+=++b%5E2%2F4a%5E2+%2B+%28%28-c%29%2Fa%29%284a%2F4a%29\"
\n" ); document.write( "\"%28x+%2B+b%2F2a%29%5E2+=++b%5E2%2F4a%5E2+%2B+%28-4ac%29%2F4a%5E2\"
\n" ); document.write( "Add:
\n" ); document.write( "\"%28x+%2B+b%2F2a%29%5E2+=++%28b%5E2+%2B+%28-4ac%29%29%2F4a%5E2\"
\n" ); document.write( "or
\n" ); document.write( "\"%28x+%2B+b%2F2a%29%5E2+=++%28b%5E2+-4ac%29%2F4a%5E2\"
\n" ); document.write( "Now we can find the square root of each side:
\n" ); document.write( "\"sqrt%28%28x+%2B+b%2F2a%29%5E2%29+=++sqrt%28%28b%5E2+-4ac%29%2F4a%5E2%29\"
\n" ); document.write( "On the right side we can simplify:
\n" ); document.write( "\"sqrt%28%28x+%2B+b%2F2a%29%5E2%29+=++sqrt%28b%5E2+-4ac%29%2Fsqrt%284a%5E2%29\"
\n" ); document.write( "\"sqrt%28%28x+%2B+b%2F2a%29%5E2%29+=++sqrt%28b%5E2+-4ac%29%2F2a\"
\n" ); document.write( "(We use \"sqrt%284a%5E2%29+=+2a\" instead of \"sqrt%284a%5E2%29+=+abs%282a%29\" because we will end up with both the positive and negative values of the right side anyway.) Now we can simplify the left side:
\n" ); document.write( "\"abs%28x+%2B+b%2F2a%29+=++sqrt%28b%5E2+-4ac%29%2F2a\"
\n" ); document.write( "Solving absolute value equations requires two equations:
\n" ); document.write( "\"x+%2B+b%2F2a+=++sqrt%28b%5E2+-4ac%29%2F2a\" or \"x+%2B+b%2F2a+=++-sqrt%28b%5E2+-4ac%29%2F2a\"
\n" ); document.write( "Now we add -b/2a to each each side:
\n" ); document.write( "\"x+=+-b%2F2a+%2B+sqrt%28b%5E2+-4ac%29%2F2a\" or \"x+=+-+b%2F2a+-+sqrt%28b%5E2+-4ac%29%2F2a\"
\n" ); document.write( "The two fractions on the right side of both equations conventiently have the same denominator so we can add them:
\n" ); document.write( "\"x+=+%28-b+%2B+sqrt%28b%5E2+-4ac%29%29%2F2a\" or \"x+=+%28-+b+-+sqrt%28b%5E2+-4ac%29%29%2F2a\"
\n" ); document.write( "The shorthand for these two equations is:
\n" ); document.write( "\"x+=+%28-b+%2B-+sqrt%28b%5E2+-4ac%29%29%2F2a\"
\n" ); document.write( "which is the familiar quadratic formula!
\n" ); document.write( "
\n" ); document.write( "
\n" );