Showing posts with label polynomial. Show all posts
Showing posts with label polynomial. Show all posts

Monday, January 21, 2019

Completing the Square


Completing the square is a technique used to take a quadratic equation and put it in a form called the vertex form.  This is an important technique that does not stop just in algebra.  We will revisit this in the calculus post for integration techniques.

The technique is very easy.

Lets look at a quadratic equation in the standard form.

Y=X²+BX+C  

To write this equation in vertex form, we take 1/2 of the B value and write our equation like this:

Y=(X+1/2B)²+k
Both of these equations are equivalent so
We expand (X+1/2B)², we have (X+1/2B)²=X²+BX+1/4B²
We know that (X+1/2B)²-k will expand to: X²+BX+1/4B²+k=X²+BX+C 
So C=1/4B² + k or if we want to find k we do the following:
k=C-1/4B²

Not too bad right?  We are going to now do an example.
Y=X²+6X+8
B=6
1/2B=3
C=8
(X+1/2B)²=(X+3)²
k=8-3²=-1
So our equation becomes:
Y=(X+3)²-1
Vertex form is (X-h)
²+k
The vertex is at x=-3 and y=-1 or (-3,-1)

Lets look at:
Y=X²-4X-3
B=-4
1/2B=-2
C=-3
(X+1/2B)²=(X-4)²
k=-3-(-2)²=-3-4=-7
So our Vertex form becomes:
Y=(X-2)²-7
Our vertex is at: (-2,-7)
Note that:   Even though our 1/2B term was negative we still ended up subtracting it from the C term.

Homework:

Factor the following into the vertex form by completing the square:
Y=X²+12X-7
Y=X²-6X+6
Y=X²+11X-1
Y=X²-14X-31
Y=X²-9x+4

The solutions are posted here.

In future posts, we will be looking at completing the square on equations with multipliers on the leading coefficient, a synthetic way of completing the square, and an explanation of why completing the square works. 





Sunday, January 20, 2019

Simple Factoring of Quadratics


How do you factor quadratics?

We are going to learn a simple method for factoring quadratics when the leading multiplier is 1 and the quadratic has non-complex integer solutions that are positive.
If you are at this point you have learned how to FOIL if not visit the link.

Lets expand (x+8)(x+21)
(x+8)(x+21)=x²+29x+168

Now how would we factor something like this if we did not know what the factors are.
If we expand a quadratic, it looks like this:  (x+A)(x+B)=x²+(A+B)x+AB
The second term or the number before x is the addition of 2 roots or A+B
The last term is the multiplication of 2 roots or AB.

First If we factor 168 into all of its roots, we will find all potential factors:

168 factors into these pairs:     1         168
                                                 2         84
                                                 3         56
                                                 4         42
                                                 6         28
                                                 8         21
                                                 12       14
                                                 24         7

Now we see which 2 pairs add up to 29.  The only 2 that add up to 29 are 8 and 21.

Lets do a couple of simpler problems where we do not already know the factors:

Example 1:      x²+12x+32

Lets factor 32:                                                     32
                                                                          2    16
                                                                                2    8
                                                                                     2   4
                                                                                         2   2
                                                      or
                                                    1         32
                                                    2         16
                                                    4          8

So
1 and 32 add up to 33
2 and 16 add up to 18
4 and 8 add up to 12 so this is our solution set so it looks like this factored:
x²+12x+32=(x+4)(x+8)

One more example:
x²+10x+21

 Lets factor 21:                                                 1        21
                                                                         3         7

We see the only 2 number that add up to 10 are 3 and 7 so:
x²+10x+21=(x+3)(x+7)

In a future post we will do numbers with negative roots.







Pascals Triangle

Here is a Pascals triangle for up to a 20th order polynomial.  The second number in the series is the order of the polynomial.






                                                                             1
                                                                                                                    1    1
                                                                                                                  1   2   1
                                                                                                                1   3   3   1
                                                                                                            1  4    6    4   1
                                                                                                       1   5    10  10   5   1
                                                                                                     1   6   15   20   15   6   1
                                                                                                  1   7   21   35   35   21   7   1
                                                                                               1   8   28   56   70   56   28   8   1
                                                                                        1   9   36   84   126   126   84   36   9   1     
                                                                               1   10   45   120   210   252   210   120   45   10   1
                                                                          1   11   55   165   330   462   462   330   165   55   11   1  
                                                                      1   12   66   220   495   792   924   792   495   220   66   12   1
                                                                  1   13   78   286   715   1287   1716   1716   1287   715   286   78   13   1
                                                        1   14   91   364   1001   2002   3003   3432   3003   2002   1001   364   91   14   1
                                                 1   15   105   455   1365   3003   5005   6435   6435   5005   3003   1365   455   105   15   1
                                      1   16   120   560   1820   4368   8008   11440   12870   11440   8008   4368   1820   560   120   16   1
                               1   17   136   680   2380   6188   12376   19448   24310   24310   19448   12376   6188   2380   680   136   17   1
                         1   18   153   816   3060   8568 18564   31824   43758   48620   43758   31824   18564   8568   3060   816   153   18   1  
                1   19   171   969   3876   11628   27132   50388   75582   92378   92378   75582   50388   27132   11628   3876   969   171   19   1
1   20   190   1140   4845   15504   38760   77520   125970   167960   184756   167960   125970   77520   38760   15504   4845   1140   190   20   1  

Monday, January 7, 2019

Binomial Theory Using Polynomial Expansion

If we expand:
 (x+a)(x+b)=x²+(a+b)x+ab
(x+a)(x+b)(x+c)=x³+(a+b+c)x²+(ab+ac+bc)x+abc
(x+a)(x+b)(x+c)(x+d)=x⁴+(a+b+c+d)x³+(ab+ac+ad+bc+bd+cd)x²+(abc+abd +cd+bcd)x+abcd

Lets say that we want to have 2 numbers or a binomial we would change the expressions above to:
(x+1)², (x+1)³, and (x+1)⁴
They equal:
(x+1)²=x²+(1+1)x+1X1=x²+2x+1
(x+1)³=x³+(1+1+1)x²+(1X1+1X1+1X1)x+1X1X1=x³+3x²+3x=1
When when we expand a binomial, the number preceding each x is just the number of combinations of a,b,c variables preceding our x in our polynomial expansion.

(x+1)⁴=x⁴+4x³+6x²+4x+1
(x+1)ⁿ=xⁿ+[nC(n-1)]xⁿ⁻¹+[nC(n-2)]xⁿ⁻²+[nC(n-3)]xⁿ⁻³...........

Now lets lets see what happens if we use a variable like y instead of 1.
(x+y)²=x²+(y+y)x+y.y=x²+2yx+y²
(x+1)³=x³+(y+y+y)x²+(y.y+y.y+y.y)x+y.y.y=x³+3yx²+3y²x+y³
(x+y)⁴=x⁴+4yx³+6x²y²+4xy³+y⁴

Our expansion becomes
(x+y)ⁿ=xⁿ+[nC(n-1)]xⁿ⁻¹y+[nC(n-2)]xⁿ⁻²y²+[nC(n-3)]xⁿ⁻³y³...........yⁿ

Lets say we have (x+y)⁶=x⁶+6x⁵y+15x⁴y²+20x³y³+15x²y⁴+6xy⁵+y⁶

If we had a number like 3 instead of y, we would substitute 3 where we have y and it would look like this:

(x+3)⁶=x⁶+6x⁵(3)+15x⁴(9)+20x³(27)+15x²(81)+6x(243)+y⁶(729)=x⁶+18x⁵+135x⁴+540x³+ 1215x²+1458x+729y⁶

As you can see there is a lot of calculation involved in expanding binomial series.  There is a way that you can just plug a number in from a table. This table is called Pascal's Triangle.  We will do post on this next.  Many people skip binomial expansion and just use Pascal's Triangle.








Sunday, January 6, 2019

Polynomial Expansion 



(x+a)(x+b)=x²+(a+b)x+ab
Is the first and many times the last way we learn to expand polynomial equations.  The equation on the left side of the equal sign is known as the factored form and the equation on the right side is known as the general form.  This is very simple.  Third, forth, fifth, and nth order polynomials are very easy to understand also even though most people are not taught how to do it.

Lets look at the expansion of a third order polynomial:

(x+a)(x+b)(x+c)=x³+(a+b+c)x²+(ab+ac+bc)x+abc

And lets look at a forth order expansion:

(x+a)(x+b)(x+c)(x+d)=x⁴+(a+b+c+d)x³+(ab+ac+ad+bc+bd+cd)x²+(abc+abd+acd+bcd)x+abcd

How do we arrive at these expansion solutions?  Lets multiply through and see.

(x+a)(x+b)(x+c)

Lets multiply (x+a)(x+b)=x²+(a+b)x+ab
Lets multiply  (x+a)(x+b)(x+c)=(x+c)(x+a)(x+b)=(x+c)[x²+(a+b)x+ab]
Multiplying x =x³+(a+b)x²+abx
Multiplying c=cx²+c(a+b)x+abc=cx²+(ca+cb)x+abc=
(x+c)[x²+(a+b)x+ab]=x³+(a+b)x²+abx+cx²+(ca+cb)x+abc
Combine terms:  x³+(a+b)x²+cx²+(ca+cb)x+abx+abc=x³+(a+b+c)x²+(ab+ac+bc)x+abc

This is a little tedious but there is a pattern:


  • The first term is going to be an exponent of the order of the polynomial.
  • The second term is going to be the addition of all the roots times xⁿ⁻¹
  • The last term will be the multiplication of all the roots.  This is consistent among all polynomials.
  • The middle terms are just permutations of the roots.
So lets look at (x+a)(x+b)(x+c)(x+d)(x+e)(x+f)=

  • First lets look at the second term:  That will be (a+b+c+d+e+f)x⁵
  • The last term is: abcdef
  • The third term is ab+ac+ad+ae+af+bc+bd+be+bf+cd+ce+cf+de+df+ef
  • The forth term is abc+abd+abe+abf+acd+ace+acf+ade+adf+aef+bcd+bce+bcf+bde+bdf+bef+cde+cdf +cef+def
  • The fifth term: abcd+abce+abcf+acde+acdf+adef+bcde+bcdf+bdef+cdef
  • The sixth term is abcde+abcdf+acdef

So (x+a)(x+b)(x+c)(x+d)(x+e)(x+f)=x⁶+(a+b+c+d+e+f)x⁵+(ab+ac+ad+ae+af+bc+bd+be+bf+cd+ce+cf+de+df+ef)x⁴+(abc+abd+abe+abf+acd+ace+acf+ade+adf+aef+bcd+bce+bcf+bde+bdf+bef+cde+cdf
+cef+def )x³+(abcd+abce+abcf+acde+acdf+adef+bcde+bcdf+bdef+cdef)x²+(abcde+abcdf+acdef)x + abcdef

That is pretty long.  The main idea is that is the second term and the last term are always very easy to ascertain.  While we have formulas for the quadratic equation, we do not have similar equations for finding roots of higher order polynomials but there are many things we can use to solve this equation like multiple similar roots, even and odd roots as well as other roots.   We will look at those in the subsequent posts; We will also look at expansion of the equations with the leading or first terms being numbers other than 1;   We will also use these equations to explain the binomial expansion theory; We will also look at algorithms for solving and expanding polynomials.

Lots of good things to follow.




¹  ²  ³  ⁴  ⁵  ⁷  ⁸  ⁹