Basic Math/completing the square in quadratic equations,cubic equations,graphs
Expert: Josh - 11/20/2009
QuestionHi Josh, any help you can give me would be greatly appreciated.
completing the square in quadratic equations(i need to figure out how to do this other than the formula,and the usual way of quadratic
Can you help me with solving for x,in steps please,I have asked this question(the first) before,but i didnt understand the way it ws explained (sorry), but i understood the other complete square solutions you sent.I understand i can use the formula,but the question is asking complete square way.
Questions:
1. 10x^2+7x-12 =0
cubic equations , i have been doing synthetic division,but i dont know where to start with this one.
2x^3+9x^2+3x-4=0
and when using a graph for the equation x^3 -4x^2-6x+5=0
what do they mean?What i mean is how do i start a graph in values,i.e -1 -2 -3 0 1 2 3 which ones do i choose to get the correct result. I have never done a graph before :-(
i only have the answers -1.6,0.62,5 to 2s.f.
how do i get thses solutions?
thanks again for your time.
Answer
Edited:
- Q2 | Relationship between the a,b,c,d coefficients of a cubic polynomial and its roots p,q,r. | Putting minus sign back into equations which involve "b" and "d" | This has no impact on subsequent explanation.
- Q3 | Step 3 part (2) | added further explanation on how to find the solution in all three search intervals. I am mindful that some of the concepts might be new to you. Don't hesitate to post a follow-up if anything is unclear.
----------------------------------------
Hi Richard,
I'm glad you asked a follow-up. Regarding "completing the squares", let me try explaining it in another way. I'll focus more on the procedure this time. If you need to understand why something is done, the rationale is explained in the Appendix.
Consider x^2 + 4x - 1 = 0 [OR x^2 + bx + c = 0]
Step 1: Always break the second term (bx) into equal halves.
x^2 + 2x + 2x - 1 = 0
Step 2a: Balancing act (add "+b^2" and "-b^2" on LHS, this changes nothing)
x^2 + 2x + 2x + (2)^2 - (2)^2 - 1 = 0
Step 2b: Rewrite first four terms as "perfect square"
Recognizing [x+(b/2)]^2 = x^2 + bx + (b/2)^2
(x+2)^2 - (2)^2 - 1 = 0
Step 3: Take the terms we haven't touched to the RHS
(x+2)^2 = (2)^2 + 1
Step 4: Take square root on both sides of the equation
remember to include both possibilities (plus or minus)
(x+2) = +/- sqrt(4+1)
Step 5: Finally, subtract constant (b/2) from both sides
x = -2 +/- sqrt(5)
i.e., possible solutions are x=-2+sqrt(5) and x=-2-sqrt(5).
Q1: 10x^2+7x-12=0
The solutions are same as those for 10(x^2+0.7x-1.2)=0, so focus on (x^2+0.7x-1.2) instead.
x^2 + 0.7x -1.2 = 0
x^2 + 0.35x + 0.35x -1.2 =0 (Step 1)
x^2 + 0.35x + 0.35x +(0.35)^2 - (0.35)^2 -1.2 =0 (Step 2a)
(x+0.35)^2 - (0.35)^2 -1.2 =0 (Step 2b)
(x+0.35)^2 = (0.35)^2 + 1.2 (Step 3)
x+0.35 = +/- sqrt[(0.35)^2 + 1.2] (Step 4)
x= -0.35+sqrt[(0.35)^2 + 1.2], -0.35-sqrt[(0.35)^2 + 1.2] (Step 5)
With some practice, you will be able to go from Step 1 to Step 2b. Hopefully, you can now understand my earlier post (relevant portions reproduced below in an Appendix).
Q2. The "complete the squares" technique does not help us directly per se. Before we discuss what to do, I need to introduce some results to justify our approach, so that you can understand why we do what we do.
Suppose the cubic polynomial a*x^3 + b*x^2 + c*x + d = 0 has solutions x = p, q and r. Then, it can be factorized as K(x-p)(x-q)(x-r)=0 for some constant K. Taking a direct algebraic expansion,
| a*x^3 + b*x^2 + c*x + d = 0
| K(x-p)(x-q)(x-r) = 0
| K[x^2-(p+q)x+pq](x-r) = 0
| K[x^3-(p+q+r)x^2+(pq+pr+qr)x-pqr] = 0
Equating the coefficients, we obtain something useful.
| a = K,
| b/K = -(p+q+r)
| c/K = pq+pr+qr
| d/K = -(pqr)
Comment: The trick to finding the solutions of a cubic is by guessing the roots "p","q" and "r" based on the relationship -(d/a) = pqr.
Example: For 2x^3+9x^2+3x-4=0, identify a=2, b=9, c=3 and d=-4. Consider the requirement -d/a = p*q*r. We know the LHS = -(-4/2) = 2.
Step 1: Guess either p, q or r (one of the roots) by considering obvious factors for d/a (=-2)
> How about 1,-1,2,...and so forth?
Plug x=1 into the original expression 2x^3+9x^2+3x-4. This does not equal 0, so let's forget this.
Plug x=-1 into equation again. This time, we strike some luck. 2(-1)^3+9(1)^2+3(-1)-4 = 0.
Now, the hard part is done. We know that 2x^3+9x^2+3x-4 = (x+1)(i(x^2)+jx+k). In particular, the quadratic part can be found by long division.
Step 2: Discover the quadratic part by polynomial division.
Dividing 2x^3+9x^2+3x-4 by (x+1), (steps omitted here, google polynomial division for examples) we find i(x^2)+jx+k = 2x^2+7x-4.
Step 3: Use "complete-the-squares" or other method (e.g., guessing the other roots) to factorize the quadratic part.
Here, we use "complete the squares" since this is stated in the question. Consider 2x^2+7x-4 = 2(x^2+(7/2)x-2) = 0
[x^2+(7/4)x+(7/4)x-2] = 0
[x^2+(7/4)x+(7/4)x+(7/4)^2 -(7/4)^2-2] = 0
[{x+(7/4)}^2 -(7/4)^2-2] = 0
{x+(7/4)}^2 = (7/4)^2+2
x+(7/4) = +/- sqrt[(7/4)^2+2]
x = -1.75 +/- 2.25
soln: x=-4, x=0.5
Step 4: Complete factorization for cubic polynomial
2x^3+9x^2+3x-4 = 2(x+1)(x+4)(x-0.5)
Solutions: x=-1,-4,0.5.
Q3. Graphical solution to x^3-4x^2-6x+5=0
Key to this is knowing where the maximum and minimum points are. Let f(x)=x^3-4x^2-6x+5.
Step 1: Take the first derivative
f'(x) = df/dx = 3x^2-8x-6
Step 2: To locate the stationary points, set f'(x) to 0 and solve for x.
3x^2-8x-6 = 0
3(x^2-(8/3)x-2) = 0
Here, we use complete-the-square (skipping over step 1 and step 2a. Be very careful with this. This is not recommended during an exam, you don't save much time at all, but it's very easy to make a costly mistake.)
(x-(4/3))^2 -(4/3)^2 - 2 = 0
(x-(4/3))^2 = (4/3)^2 + 2
x-(4/3) = +/- sqrt((4/3)^2 + 2)
x=(4/3)-sqrt[(16/9)+2], (4/3)+sqrt[(16/9)+2]
x=-0.610317, 3.276983
Step 3: Take second derivative (to check concavity) and evaluate f"(x) at those stationary points
f"(x)=6x-8
f"(-0.610317) < 0
Interpretation: Negative means the curve is concave down, it has an inverted-U (or hat) shape, i.e., function attains a maximum value (has a local peak) at x=-0.610317.
f"(3.276983) > 0
Interpretation: Positive means this portion of the curve is U-shape, i.e., function attains a minimum value (has a trough) at x=3.276983.
Refer to plot given in the attached image.
When drawn by hand, we only look for key points and "interpolate" the graph in-between.
Knowing that:
(1) f(-0.610317)>0 and f(3.276983)<0, the function f(x) must cross the x-axis (has a solution) somewhere between -0.610307 and 3.276983. We can look for the zero-crossing point iteratively using, for instance, the bisection search method.
| Bisection Search Method explained (without formal arguments):
|
| A-----B-----C-----D-----E
| Suppose a continuous function f(x) is positive at x=A and
| negative at x=E. Check the sign of f(x) at the midpoint x=C.
|
| Scenario 1: If C is positive, we have narrowed our search
| for the zero-crossing point to the interval between C and E.
| Next, we check the sign of f(x) at point D, the midpoint
| between C and E. We repeat this procedure ad infinitum until
| satisfied that we are close enough to the true solution.
|
| Scenario 2: If C is negative, we have narrowed our search
| for the zero-crossing point to the interval between A and C.
| So, we repeat this procedure, checking the sign at point B.
|
| The search is complete when f(xo) gets arbitrary close to
| zero (say, within a tolerance of +/- 0.02). We then declare
| x=xo as a solution for f(x).
Illustration: Tracing the steps above, the solution ought to be between the "lower" and "upper" limits in each iteration. The values of f(x) at x="lower", "mid" and "upper" are also shown. Only the sign of f(midpt) helps us in narrowing the search interval.
iter: lower | upper | midpt | f(lower)| f(upper) | f(midpt)|
1: -0.610317 | 3.276983 | 1.333333 | 6.944 | -22.426 | -7.7407 |
2: -0.610317 | 1.333333 | 0.361508 | 6.944 | -7.7407 | 2.3554 |
3: 0.361508 | 1.333333 | 0.847420 | 2.355 | -7.7407 | -2.3484 |
4: 0.361508 | 0.847420 | 0.604464 | 2.355 | -2.3484 | 0.1325 |
5: 0.604464 | 0.847420 | 0.725942 | 0.132 | -2.3484 | -1.0810 |
6: 0.604464 | 0.725942 | 0.665203 | 0.132 | -1.0810 | -0.4668 |
7: 0.604464 | 0.665203 | 0.634833 | 0.132 | -0.4668 | -0.1652 |
8: 0.604464 | 0.634833 | 0.619649 | 0.132 | -0.1652 | -0.0158 |
We settle for a solution of 0.6196 since the approximation error is less than 0.02. But we could have kept going to obtain a more accurate answer.
The solution is actually closer to x=0.6180.
(2) Using similar arguments, we can again conduct a search for the two remaining solutions in the interval from -infinity to -0.610307, and the interval from 3.276983 to +infinity.
| This is not hopelessly difficult because the function
| decreases (increases) its value monotonically as x tends
| toward large negative (positive) values. So, the bisection
| search method works.
|
| e.g., We already know that f(x) is negative at x=3.276983, we need to find another point
| further up where f(x) is positive. For instance, at x=6, f(x) is positive. Then, using
| the "intermediate value theorem" the function must cross the x-axis (has a solution) in
| the interval between x=3.276983 and x=6. With these lower and upper limits, we conduct
| a bisection search until we converge (get close enough) to the solution.
| Again for the interval from -infinity to 0.610307, we know a solution exists there.
| This time, knowing that f(x)>0 at x=-0.610307, we need a point further down where
| f(x) is negative. For instance, we can check to see that f(x) is still positive when
| x=-1, but f(x)<0 when x=-2. So, our search interval is between -2 and -0.610307.
| A bisection search is used until we get close enough to the solution x=-1.6180 where
| the function has an approximate value of zero.
The remaining solutions are close to x=-1.6180 and x=5.
====================================================
Appendix: (excerpt from reply posted on Nov 5, 2009)
For x^2+0.7x-1.2=0
(i) Observe that we can split x^2 + 0.7x into x^2 + 0.35x + 0.35x. If we have x^2 + 0.35x + 0.35x + (0.35*0.35), we would have a perfect square (x+0.35)^2. So, the constant "(0.35)^2" is the only thing missing.
(ii) Observe that x^2 + 0.35x + 0.35x + (0.35)^2 - (0.35)^2 is in perfect harmony with (identical to) x^2 + 0.7x (what we started with). So, we can rewrite x^2+0.7x-1.2=0 as
x^2 + 0.35x + 0.35x + (0.35)^2 - (0.35)^2 -1.2 = 0
| Take a moment to absorb this, go over the observations to see if it makes sense.
| As the first four terms constitute a perfect square (i.e., x^2+(b/2)x+(b/2)x+(b/2)^2
| = [x-(b/2)]^2, the whole thing is equivalent to
(x + 0.35)^2 - (0.35)^2 -1.2 = 0
Now the hard part is done....are we ok to press ahead?
(iii) We add (0.35)^2+1.2 to both sides of the equation.
This gives (x + 0.35)^2 = (0.35)^2 + 1.2
(iv) Take square root on both sides (with the plus and minus sign out the front)
x + 0.35 = +/- sqrt{(0.35)^2 + 1.2}
(v) Finally, subtract 0.35 from both sides, we end up with two possible solutions:
x = -0.35 + sqrt{(0.35)^2 + 1.2} and x = -0.35 -sqrt{(0.35)^2 + 1.2}
Comment: The procedure we have just completed is actually a validation of the quadratic formula.
Starting from 10x^2+7x-12 = 10(x^2+0.7x-1.2)=0, if we let a=1, b=0.7, c=1.2, we can clearly see that the answers we obtained (using completing the square) is identical to the quadratic formula x = [-b + sqrt(b^2-4*a*c)]/(2a) and x = [-b - sqrt(b^2-4*a*c)]/(2a).