Monday, January 7, 2019

Pascal's Triangle


1
1 1      1
2 1   2    1
3 1   3    3    1
4 1    4   6    4    1
5 1   5   10   10   5   1
6 1   6  15   20   15   6    1
 1  7  21  35  35   21     7   1

On the last post we looked at binomial expansion.  It involved calculating combinations as well as carrying large numbers and was not very easy.  With Pascal's triangle we, there is no need to calculate combinations because they are given on the table.

So lets look at the table.  The numbers in red are the order of polynomial ad the number go in front of the variable from left to right.  To show this lets say that we wanted to see what (x+1)⁴:

This equation is 4th order.  So we use: 1       4       6        4         1
This becomes:   (x+1)⁴=x   +  4 x³   +   6 x²   +    4x    +     1= x⁴+4x³+x²+4x+1
That's pretty nifty isn't it?
If we wanted (x+y)⁴=x⁴+4x³y+x²y²+4xy³+y

 So you might ask if you need to memorize this table of does this table only go down to 7th order equations.  The answer is no to both questions.  You can construct this table and it goes down to as large a order as you want.

How do we construct it.

Start with                                                                                                  1
Put 1 on outside of the 1                                                                        1    1
Put one on the outside of the 1 and add the middle numbers:             1    2    1      (2=1+1)
Repeat                                                                                                1    3    3   1    (3=1+1)
Repeat                                                                                             1    4     6   4   1   (4=3+1) (6=3+3)

So if you are observing, you will see the number in the triangle is between two numbers and it is the sum of those 2 numbers.

The order of the equation starts at 1  at the two 1's ie                               1   1    1
The numbers descend from 1 from there:                                                2   1   2    1
                                                                                                               1    3   3     1
                                                                                                         ...................................

So just to show how easy it is if we had (x+1)⁸=x⁸+8x⁷+28x⁶+56x⁵+70x⁴ +56x³+28x²+8x+1

Homework:  Construct the 8 the through 10 order of pascals triangle.  I will be posting a large table soon so check back. 

                                                                                                            




¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹   

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.




¹  ²  ³  ⁴  ⁵  ⁷  ⁸  ⁹

Friday, January 4, 2019

Fast Multiplication Using Foiling


Many people have used Foiling to distribute quadratic equations.  It actually can be very helpful in multiplying very fast.

When we foil we multiply the first terms together, then we multiply the outside, then the inside, and finally the last terms.  So lets see this in action.

11X15  Not so easy right?

Lets rewrite it:
(10 +1)(10+ 5)
First term is 10X10=100
Outside: 5x10=50
Inside: 1x10=10
Last: 5x1=5
So 100+50+10+5=165

Still doesn't feel to easy?  There are too many numbers so lets modify our foil and lets make three spaces.

100  + 60    +   5     
First       O+I       Last

Okay a little easier
How about these numbers?:

1x1=1
5x1+1x1=6
5x1=5

Quite a bit simpler

Okay line them all up like:        1
                                                   +   6
                                                   +       5
It's 165.

Lets try 13X15:

1x1=                                        1
5x1+3x1=                                     8
3x5 = ?????? what do we do now?
Not to worry.  It is easy.  I promise.

1x1=                                        1
5x1+3x1=                                     8
3x5 =                                             1  5

So our answer is 195.  Since our last multiplier was 2 digits, we just carrier it into the next column which is shared by 8.

How about multiplying a number like (63)(72)?

6x7=                                        4 2
2x6+3x7=                                   33  
3x2 =                                                6

The answer is 4536.  Now that is easy to do on paper but to do it in your head is probably still a little difficult.  Let's break this a part but we are going to start with the middle.  2x6=12 and 3x7=21 they add up to 33.  33 is easy to remember.  We have 6 x 7 is 42 with a carry from 33 of 3 which is 45 and 2 times 3 is 6 so we have 4536.

Okay lets do something even more difficult:  49x83.
Middle is 3x4 +9x8 =12+72=84 remember this number.
Our first number is 8x4=32.
Our last number is 3 times nine 27.
We have a carry from the last digit of 2 and add this to 4=6.
We have a carry of 8 and add that to 32 =40.
So our number is 4067.

Okay lets try:

14x31
Do you visualize and see 434?  If you didn't, I will post more worked process.  It takes a bit of traininng your mind to do these.  After you practice, you will be able to do these really well.

Try these numbers and write down the answer after you figured these out and check with a calculator.
67x85

49x72

88x55

31x96

I will do a post with more worked practice but if you do thes






Thursday, January 3, 2019

Foiling Quadratic Functions


(X+A)(X+B) is the multiplication of two factors in a quadratic equation.  We also call it distribution.  A very easy way to solve these equation is with a term called Foiling.  Lets break it down.



First + Outside + Inside + Last


Example:

Expand (X+5)(X+3)
First (X)(X)=X² + Outside (X)(3)=3X +  Inside (5)(X)=5X + Last (5)(3)=15=X² + 8X + 15

Ah ha.  Now you know what foil means.
Lets try expanding (X-4)(X+3)
First (X)(X)=X² + Outside (X)(3)=3X +  Inside (-4)(X)=-4X + Last (-4)(3)=-12=X² -X -12

Something a little harder
Expand (-3X+7)(2X-4)
First (-3X)(2X)=-6X² + Outside (-3X)(-4)=-12X +  Inside (7)(2X)=14X + Last (7)(-24)=-28=
=-6X² +2X -28

Whohoo! Now try a few yourself:

1) (X+5)(X+2)
2) (X-3)(X+5)
3) (X+9)(X+1)
4) (3X+2)(X-7)
5) (6x-4)(3X-2)

Answers (1) x²+7x +10 (2) x²+2x-15 (3) x²+10x+9 (4) 3x²-19x-14 (5) 18x²+8


Wednesday, January 2, 2019

Converting Decimals to Binary Numbers the Easy Way


In a previous post, I showed what binary numbers are.  We need to understand know how to convert binary numbers to decimal numbers before we proceed.  

There are a few ways to do this but I am going to show you the easiest way.

So to get the idea lets start with number 7.

We know that this will the some of some roots of 2ⁿ.

Lets figure out how to count in binary but before we do that lets see how we count by going up digits  in the decimal system: (this is counting by successive decades instead of units)

1 10 100 1000 10,000 100,000 1,000,000 .............

We count the same way in binary:
1 10 100 1000 10000 10000 1000000

 If we wanted to figure out what the value of a binary digit in the decimal system, it would be as follows:

 1=2⁰ =1 10=2¹=2  100=2²=4 1000= 2³=8

or

n   1 2 3 4  5  6   7   8     9     10    11    12     13     14     15       16       17       18         19           20
n-10 1 2 3 4   5   6   7     8     9     10     11     12     13     14       15       16       17         18          19
2ⁿ  1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 32768 65536 131072 262144 524,288

If you want to make your own list by expanding the series above, just keep multiplying by 2.  This list will allow you to express binary in a decimal value up to 1,000,000 .

Example

 Find the binary equivalent of 7 in the decimal system.  

First we find the largest number on our list less than 7 and that is 4.   4 is represent by 100 in binary


We will subtract 4 from 7:  7-4=3 and we will find the highest number on our list less than or equal to 3 and that is 2 or 10. We will subtract 2 from 3-2=1

So 7 in decimal is 111 in binary.

What did we just do in this example?  We ended up finding the highest digit and then subtracted to find the remainder so we can find the next highest digit and so on.  It is an easy process, but with large numbers, there can be many steps.

Okay lets find the binary equivalent of the decimal 892.
512 is the largest number on our list less than 892.   n-1=9 so n = 10.       892-512=378
256 is the largest number under 378 on our list so n=9. 378-256=122
64 is the largest number under 122 on our list so n=7. 122-64=58
32 is the largest number under 58 so n=6.  58-32=26
16 is the largest number under 26 so n=5.  26-16=10
8 is the largest number under 10 so n=4. 10-8=2
2 is at n=2

Our answer is:  1 1 0 1 1 1 1 0 1 0 or 1101111010
 Place:             10 9 8 7 6 5 4 3 2 1

To learn the concepts pick some large decimal numbers and convert into binary and use a decimal to binary calculator to check your answer.





30 x 30 Table for Squares


Students and also many adults like myself were compelled to learn a multiplication table and to know perfect squares up to 12².  A student who is able to memorize squares up to 30² will be way ahead of other students.  Even learning up to 20² 

Lets see if we can learn up to a 20².  You have a these numbers 169, 196, 225, 256, 289, 324, 361, and 400.  We are going to memorize one number and that is 13²=169.

So we start with 169 and we then reverse the 2 digits and have 196.
We also understand that all numbers that end in 5 always end in 25.  If 14² is 196, then 15² will be larger than 200 so  15²=225.

We take the last 2 digits and move them to the front.  So 225 becomes 25x and 16² has a units digit of 6 so 16²=256.

17² is 289 and the last two digits add up to 17.

324 is 2 3 4 a numerical procession  with 2 and 3 reversed.

361 3+6=9 so if we add them together in our number we have 91.  We flip these around and we have 19.

Another quick way is that the front numbers progress by 3 from 169 3 times and then progress by 4.  The units digit always follows the square of the units digit.
169 196 225 256 289 324 369 400

400 is easy.

There are many people who will contend that there are fast ways to figure out squares and there are but if a person is able to  memorize the table to a 20 x 20 (30 x 30 is even better) they will be incredible mathematicians.  Concepts like long division, factoring polynomials, logarithms, trigonometry, and basic algebra will be easier.  Advanced math like many integration theorems, Greens Theorem  and Fourier Transforms will all be easier if person understands numbers beyond the 10 by 10 multiplication table.  People will also understand and retain this information for life time instead of just forgetting about it when they leave academia.  













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
1 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
2 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30 32 34 36 38 40 42 44 46 48 50 52 54 56 58 60
3 3 6 9 12 15 18 21 24 27 30 33 36 39 42 45 48 51 54 57 60 63 66 69 72 75 78 81 84 87 90
4 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 76 80 84 88 92 96 100 104 108 112 116 120
5 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 85 90 95 100 105 110 215 120 125 130 135 140 145 150
6 6 12 18 24 30 36 42 48 54 60 66 72 78 84 90 96 102 108 114 120 126 132 238 144 150 156 162 168 174 180
7 7 14 21 28 35 42 49 56 63 70 77 84 91 98 105 112 119 126 133 140 147 154 261 168 175 182 189 196 203 210
8 8 16 24 32 40 48 56 64 72 80 88 96 104 112 120 128 136 144 152 160 168 176 285 192 200 208 216 224 232 240
9 9 18 27 36 45 54 63 72 81 90 99 108 117 126 135 144 153 162 171 180 189 208 308 216 225 234 243 252 261 270
10 10 20 30 40 50 60 70 80 90 100 110 120 130 140 150 160 170 180 190 200 210 220 230 240 250 260 270 280 290 300
11 11 22 33 44 55 66 77 88 99 110 121 132 143 154 165 176 187 198 209 220 231 242 253 264 275 286 297 308 319 330
12 12 24 36 48 60 72 84 96 108 120 132 144 156 168 180 192 204 216 228 240 252 264 276 288 300 312 324 336 348 360
13 13 26 39 52 65 78 91 104 117 130 143 156 169 182 195 208 221 234 247 260 273 286 299 312 325 338 351 364 377 390
14 14 28 42 56 70 84 98 112 126 140 154 168 182 196 210 224 238 252 266 280 294 308 322 336 350 364 378 392 406 420
15 15 30 45 60 75 90 105 120 135 150 165 180 195 210 225 240 255 270 285 300 315 330 345 360 375 390 405 420 435 450
16 16 32 48 64 80 96 112 128 144 160 176 192 208 224 240 256 272 288 304 320 336 252 368 384 400 416 432 448 464 480
17 17 34 51 68 85 102 119 136 153 170 187 204 221 238 255 272 289 306 323 340 357 274 391 408 425 442 459 476 493 510
18 18 36 54 72 90 108 126 144 162 180 198 216 234 252 270 288 306 324 342 360 378 296 414 432 450 468 486 504 522 540
19 19 38 57 76 95 114 133 152 171 190 209 228 247 266 285 304 323 342 361 380 399 318 437 456 475 492 513 532 551 570
20 20 40 60 80 100 120 140 160 180 200 220 240 260 280 300 320 340 360 380 400 420 440 460 480 500 518 540 560 580 600
21 21 42 63 84 105 126 147 168 189 210 231 252 273 294 315 336 357 378 399 420 441 462 483 504 525 542 567 588 609 630
22 22 44 66 88 110 132 154 176 208 220 242 264 286 308 330 252 274 296 318 440 462 484 506 528 550 572 594 616 638 660
23 23 46 69 92 215 238 261 285 308 230 253 276 299 322 345 368 391 414 437 460 483 506 529 552 575 595 618 641 667 690
24 24 48 72 96 120 144 168 192 216 240 264 288 312 336 360 384 408 432 456 480 504 528 552 576 600 624 648 672 696 720
25 25 50 75 100 125 150 175 200 225 250 275 300 325 350 375 400 425 450 475 500 525 550 575 600 625 650 618 700 725 750
26 26 52 78 104 130 156 182 208 234 260 286 312 338 364 390 416 442 468 494 520 546 572 595 624 650 676 702 728 754 780
27 27 54 81 108 135 162 189 216 243 270 297 324 351 378 405 432 459 486 513 540 567 594 618 648 675 702 729 756 783 810
28 28 56 84 112 140 168 196 224 252 280 308 336 364 392 420 448 476 504 532 560 588 616 641 672 700 728 756 784 812 840
29 29 58 87 116 145 174 203 232 261 290 319 348 377 406 435 464 493 522 551 580 609 638 667 696 725 754 783 812 841 870
30 30 60 90 120 150 180 210 240 270 300 330 360 390 420 450 480 510 540 570 600 630 660 690 720 750 780 810 840 870 900