391

The Magic of Math: Solving for x and Figuring Out Why

  • Upload
    others

  • View
    4

  • Download
    1

Embed Size (px)

Citation preview

Page 1: The Magic of Math: Solving for x and Figuring Out Why
Page 2: The Magic of Math: Solving for x and Figuring Out Why

AdvancePraiseforTheMagicofMath

“Theysaymagiciansshouldneverrevealtheirsecrets.Happily,ArthurBenjaminhas ignored thissillyadage—for in thissmallvolume,Benjaminreveals tohisaudience the secrets of numbers and other mathematical illusions that haveintriguedmathematiciansformillennia.”—EdwardB.Burger,president,SouthwesternUniversity,andauthorofThe5ElementsofEffectiveThinking

“This book will be magical for my students, as it would have been for methroughoutmyschooldays.They’llbeabletorevisitthebookfrequentlyastheylearn more math, finding deeper appreciation and discovering new areas toexplorewitheachvisit.”—RichardRusczyk,founder,ArtofProblemSolving,anddirector,USAMathematicalTalentSearch

“InTheMagicofMath,ArthurBenjaminhaspulledoffaseeminglyimpossibletrick.Hehasmadehighermathematicsappearsonaturalandengagingthatyouwillwonderwhy youwere ever bored and confused inmath class. There aremanybooksthatattempttopopularizemathematics.Thisisoneofthebest.OnvirtuallyeverypageI foundmyself learningnewthings,or lookingat familiartopicsinnovelways.”—JasonRosenhouse,professorofMathematics,JamesMadisonUniversity,andauthorofTheMontyHallProblem

“In The Magic of Math, mathemagician Arthur Benjamin gives us anentertainingandenlighteningtourofawideswathoffundamentalmathematicalideas,presented inaway that isaccessible toabroadaudience.Aparticularlyappealing feature of the book is the frequent use of friendly, down-to-earthexplanationsoftheconceptsandconnectionsbetweenthem.”—RonaldGraham,presidentemeritus,AmericanMathematicalSociety,andcoauthorofMagicalMathematics

Page 3: The Magic of Math: Solving for x and Figuring Out Why

“Thisbookisawhirlwind tourofmathematicsfromarithmeticandalgebraallthewaytocalculusandinfinity,andespeciallythenumber9.ArthurBenjamin’senthusiastic and engaging writing style makes The Magic of Math a greatadditiontoanymathenthusiast’sbagoftricks.”—LauraTaalman,professorofMathematicsandStatistics,JamesMadisonUniversity

“Mathematicsisfullofsurprisinglybeautifulpatterns,whichArthurBenjamin’swittypersonalitybringstolifeinTheMagicofMath.Youwillnotonlydiscovermany wonderful ideas, but you will also find some fun mathematical magictricks thatyouwillwant to tryoutonyour friendsand family.Beprepared tolearnthatmathismoreentertainingthanyoumayhavethought.”—GeorgeW.Hart,mathematicalsculptor,researchprofessor,StonyBrookUniversity,andcofounder,TheMuseumofMathematics

“TheMagicofMathisadelightfulstrollthroughagardenfilledwithfascinatingexamples.Anyonewithanyinterestinmagic,puzzles,ormathwillhavemanyhoursofenjoymentinreadingthisbook.”—MariaM.Klawe,president,HarveyMuddCollege

“Arthur Benjamin has created an instant mathematical classic, by combiningIsaacAsimov’sclaritywithMartinGardner’stasteandaddinghisownsenseoffunandadventure.IwishhewrotethisbookwhenIwasakid.”—PaulA.Zeitz,professorandchairofMathematics,UniversityofSanFrancisco,andauthorofTheArtandCraftofProblemSolving

“There’s aplayful joy tobe found in thisbook, for readers at any level.Mostmagiciansdon’trevealtheirsecrets,butinTheMagicofMath,ArthurBenjaminshowshowuncoveringthemysterybehindbeautifulmathematicaltruthsmakesmathevenmoremarveloustobehold.”—FrancisSu,president,MathematicalAssociationofAmerica

“The Magic of Math offers an expansive, unforgettable journey throughmathematicswherenumbersdanceandmathematical secretsare revealed. Justopen the book and start reading; you’ll be swept over by the magic ofBenjamin’s writing. Luckily, there is no magician’s code to these secrets as

Page 4: The Magic of Math: Solving for x and Figuring Out Why

you’llundoubtedlywanttoshareandperformthemwithfamilyandfriends.”—TimChartier,professorofMathematics,DavidsonCollege,andauthorofMathBytes

Page 5: The Magic of Math: Solving for x and Figuring Out Why
Page 6: The Magic of Math: Solving for x and Figuring Out Why
Page 7: The Magic of Math: Solving for x and Figuring Out Why
Page 8: The Magic of Math: Solving for x and Figuring Out Why
Page 9: The Magic of Math: Solving for x and Figuring Out Why

Copyright©2015byArthurBenjaminPublishedbyBasicBooks,AMemberofthePerseusBooksGroupAllrightsreserved.PrintedintheUnitedStatesofAmerica.Nopartofthisbookmaybereproducedinanymannerwhatsoeverwithoutwrittenpermissionexcept in thecaseofbriefquotationsembodiedincriticalarticlesandreviews.Forinformation,addressBasicBooks,250West57thStreet,NewYork,NY10107.

BookspublishedbyBasicBooksareavailableatspecialdiscountsforbulkpurchasesintheUnitedStatesby corporations, institutions, and other organizations. For more information, please contact the SpecialMarketsDepartmentatthePerseusBooksGroup,2300ChestnutStreet,Suite200,Philadelphia,PA19103,orcall(800)810-4145,ext.5000,[email protected].

IllustrationsbyNatalyaSt.ClairAcatalogrecordforthisbookisavailablefromtheLibraryofCongress.

LibraryofCongressControlNumber:2015936185ISBN:978-0-465-06162-4(e-book)10987654321

Page 10: The Magic of Math: Solving for x and Figuring Out Why

Idedicatethisbooktomywife,Deena,anddaughters,LaurelandAriel.

Page 11: The Magic of Math: Solving for x and Figuring Out Why

Contents

0Introduction1TheMagicofNumbers

2TheMagicofAlgebra

3TheMagicof9

4TheMagicofCounting

5TheMagicofFibonacciNumbers

6TheMagicofProofs

7TheMagicofGeometry

8TheMagicofπ

9TheMagicofTrigonometry

10TheMagicofiande

11TheMagicofCalculus

12TheMagicofInfinity

Page 12: The Magic of Math: Solving for x and Figuring Out Why

AftermathAcknowledgmentsIndex

0 Introduction

1 TheMagicofNumbers

2 TheMagicofAlgebra

3 TheMagicof9

4 TheMagicofCounting

5 TheMagicofFibonacciNumbers

6 TheMagicofProofs

7 TheMagicofGeometry

8 TheMagicofπ

9 TheMagicofTrigonometry

10 TheMagicofiande

11 TheMagicofCalculus

12 TheMagicofInfinity

AftermathAcknowledgmentsIndex

Page 13: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERZERO

Introduction

Throughout my life, I have always had a passion for magic. Whether I waswatchingothermagiciansorperformingmagicmyself,Iwasfascinatedwiththemethodsusedtoaccomplishamazingandimpressivefeats,andIlovedlearningitssecrets.Withjustahandfulofsimpleprinciples,Icouldeveninventtricksofmyown.

Ihad thesameexperiencewithmathematics.Fromaveryearlyage, I sawthatnumbershadamagicalltheirown.Here’satrickyoumightenjoy.Thinkofa number between 20 and 100. Got it? Now add your digits together. Nowsubtract the total fromyouroriginalnumber.Finally,add thedigitsof thenewnumbertogether.Areyouthinkingofthenumber9?(Ifnot,youmightwanttocheck your previous calculation.) Pretty cool, huh?Mathematics is filledwithmagic like this,butmostofusareneverexposed to it in school. In thisbook,youwillseehownumbers,shapes,andpurelogiccanyielddelightfulsurprises.And with just a little bit of algebra or geometry, you can often discover thesecretsbehindthemagic,andperhapsevendiscoversomebeautifulmathematicsofyourown.

Thisbookcoverstheessentialmathematicalsubjectslikenumbers,algebra,geometry, trigonometry, and calculus, but it also covers topics that are not sowell represented, like Pascal’s triangle, infinity, and magical properties ofnumberslike9,π,e, i,Fibonaccinumbers,and thegoldenratio.Andalthough

Page 14: The Magic of Math: Solving for x and Figuring Out Why

noneof thebigmathematicalsubjectscanbecompletelycovered in justa fewdozen pages, I hope you come away with an understanding of the majorconcepts, a better idea ofwhy theywork, and an appreciationof the eleganceand relevance of each subject. Even if you have seen some of these topicsbefore,Ihopeyouwillseethemandenjoythemwithnewperspectives.Andaswe learn more mathematics, the magic becomes more sophisticated andfascinating.Forexample,hereisoneofmyfavoriteequations:

eiπ+1=0

Some refer to this as “God’s equation,” because it uses the most importantnumbers inmathematics inonemagicalequation.Specifically, ituses0and1,which are the foundations of arithmetic;π = 3.14159 . . . ,which is themostimportantnumber ingeometry;e=2.71828 . . . ,which is themost importantnumberincalculus;andtheimaginarynumberi,withasquareof−1.We’llsaymore aboutπ in Chapter 8, and the numbers i and e are described in greaterdetail in Chapter 10. In Chapter 11, we’ll see the mathematics that help usunderstandthismagicalequation.

Mytargetaudienceforthisbookisanyonewhowillsomedayneedtotakeamath course, is currently taking a math course, or is finished taking mathcourses.Inotherwords,Iwantthisbooktobeenjoyedbyeveryone,frommath-phobicstomath-lovers.Inordertodothis,Ineedtoestablishsomerules.

Rule1:Youcanskipthegrayboxes(exceptthisone)!Eachchapterisfilledwith“Asides,”whereIliketogooffonatangenttotalkaboutsomethinginteresting.Itmightbeanextraexampleoraproof,orsomethingthatwillappealtothemoreadvancedreaders.Youmightwanttoskipthesethefirsttimeyoureadthisbook(andmaybethesecondandthirdtimes too). And I do hope that you reread this book. Mathematics is asubjectthatisworthrevisiting.

Rule2:Don’tbeafraidtoskipparagraphs,sections,orevenchapters.Inaddition to skipping the gray boxes, feel free to go forward anytime you getstuck.Sometimesyouneedperspectiveona topicbefore it fullysinks in.Youwillbesurprisedhowmucheasieratopiccanbewhenyoucomebacktoitlater.Itwouldbeashametostoppartwaythroughthebookandmissallthefunstuff

Page 15: The Magic of Math: Solving for x and Figuring Out Why

thatcomeslater.Rule3:Don’tskipthelastchapter.Thelastchapter,onthemathematicsof

infinity, has lots ofmind-blowing ideas that they probablywon’t teach you inschool,andmanyoftheseresultsdonotrelyontheearlierchapters.Ontheotherhand, the last chapter does refer to ideas that appear in all of the previouschapters, so that might give you the extra incentive to go back and rereadpreviouspartsofthebook.

Ruleπ:Expecttheunexpected.Whilemathematicsisaseriouslyimportantsubject,itdoesn’thavetobetaughtinaseriousanddryfashion.AsaprofessorofmathematicsatHarveyMuddCollege,Ican’tresisttheoccasionalpun,joke,poem, song, or magic trick tomake a class more enjoyable, and they appearthroughoutthesepages.Andsincethisisabook,youdon’thavetohearmesing—luckyforyou!

Followtheserules,anddiscoverthemagicofmathematics!

Page 16: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERONE

1+2+3+4+···+100=5050TheMagicofNumbers

NumberPatternsThestudyofmathematicsbeginswithnumbers.Inschool,afterwelearnhowtocountandrepresentnumbersusingwordsordigitsorphysicalobjects,wespendmanyyearsmanipulatingnumbersthroughaddition,subtraction,multiplication,division,andotherarithmeticalprocedures.Andyet,weoftendon’tget to seethatnumberspossessamagicoftheirown,capableofentertainingus,ifwejustlookbelowthesurface.

Let’s startwith a problem given to amathematician namedKarl FriedrichGausswhenhewasjustaboy.Gauss’steacheraskedhimandhisclassmatestoadd up all the numbers from 1 to 100, a tedious task designed to keep thestudentsbusywhiletheteacherdidotherwork.Gaussastonishedhisteacherandclassmatesby immediatelywritingdown theanswer:5050.Howdidhedo it?Gauss imagined the numbers 1 through 100 split into two rows, with thenumbers 1 through 50 on the top and the numbers 51 through 100 writtenbackward on thebottom,as shownbelow.Gaussobserved that eachof the50columnswouldadduptothesamesum,101,andsotheirtotalwouldjustbe50×101,whichis5050.

Page 17: The Magic of Math: Solving for x and Figuring Out Why

Splittingthenumbersfrom1to100intotworows;eachpairofnumbersaddsto101

Gauss went on to become the greatest mathematician of the nineteenthcentury,notbecausehewasquickatdoingmentalcalculations,butbecauseofhis ability to make numbers dance. In this chapter, we will explore manyinterestingnumberpatternsandstarttoseehownumbersdance.Someofthesepatternscanbeappliedtodomentalcalculationsmorequickly,andsomearejustbeautifulfortheirownsake.

We’ve used Gauss’s logic to sum the first 100 numbers, but what if wewantedtosum17or1000or1million?Wewill,infact,usehislogictosumthefirst n numbers, where n can be any number you want! Some people findnumberstobelessabstractwhentheycanvisualizethem.Wecallthenumbers1,3,6,10,and15triangularnumbers,sincewecancreatetrianglesliketheonesbelow using those quantities of dots. (You might dispute that 1 dot forms atriangle, but nevertheless 1 is considered triangular.) The official definition isthatthenthtriangularnumberis1+2+3+···+n.

Thefirst5triangularnumbersare1,3,6,10,and15

Noticewhathappenswhenweputtwotrianglessidebyside,asdepictedontheoppositepage:

Page 18: The Magic of Math: Solving for x and Figuring Out Why

Howmanydotsareintherectangle?

Sincethetwotrianglesformarectanglewith5rowsand6columns,thereare30dots altogether.Hence, eachoriginal trianglemusthavehalf asmanydots,namely15.Ofcourse,weknewthatalready,butthesameargumentshowsthatifyou take two triangleswithn rowsandput them togetheraswedid, thenyouforma rectanglewithn rowsandn + 1 columns,which hasn × (n + 1) dots(oftenwrittenmoresuccinctlyasn(n+1)dots).Asaresult,wehavederivedthepromisedformulaforthesumofthefirstnnumbers:

Noticewhatwejustdid:wesawapatterntosumthefirst100numbersandwereabletoextendittohandleanyproblemofthesameform.Ifweneededtoaddthenumbers1through1million,wecoulddoitinjusttwosteps:multiply1,000,000by1,000,001,thendivideby2!

Onceyoufigureoutonemathematicalformula,otherformulasoftenpresentthemselves.Forexample,ifwedoublebothsidesofthelastequation,wegetaformulaforthesumofthefirstnevennumbers:

2+4+6+···+2n=n(n+1)

What about the sum of the first n odd numbers? Let’s look at what thenumbersseemtobetellingus.

Page 19: The Magic of Math: Solving for x and Figuring Out Why

Whatisthesumofthefirstnoddnumbers?

Thenumbersontherightareperfectsquares:1×1,2×2,3×3,andsoon.It’s hard to resist noticing the pattern that the sumof the firstn oddnumbersseemstoben×n,oftenwrittenasn2.Buthowcanwebesurethatthisisnotjustsometemporarycoincidence?We’llseeafewwaystoderivethisformulainChapter 6, but such a simple pattern should have a simple explanation. Myfavoritejustificationusesacount-the-dotsstrategyagain,andremindsusofwhywecallnumberslike25perfectsquares.Whyshouldthefirst5oddnumbersaddto52?Justlookatthepictureofthe5-by-5squarebelow.

Howmanydotsareinthesquare?

Thissquarehas5×5=25dots,but let’scount thedotsanotherway.Startwith the1dot in theupper leftcorner. It is surroundedby3dots, then5dots,then7dots,then9dots.Consequently,

1+3+5+7+9=52

Ifwestartedwithann-by-nsquare, thenwecanbreakit inton (backward)L-

Page 20: The Magic of Math: Solving for x and Figuring Out Why

shapedregionsofsizes1,3,5,...,(2n−1).Whenviewedthisway,wehaveaformulaforthesumofthefirstnoddnumbers:

1+3+5+···+(2n−1)=n2

Aside

Later in this book,we’ll see how the approach of counting dots (and thegeneral approach of answering a question in two differentways) leads tosomeinterestingresultsinadvancedmathematics.Butitcanalsobeusefulforunderstandingelementarymathematicsaswell.Forexample,whydoes3×5=5×3?I’msureyouhaven’tevenquestionedthatstatementsinceyouwere told, as a child, that the order of multiplication doesn’t matter.(Mathematicians say that multiplication of numbers is commutative.) Butwhy should3 bags of 5marbles contain the same amount as 5 bags of 3marbles?The explanation is simple if you just count thedots in a 3-by-5rectangle.Countingrowbyrow,wesee3rowsof5dotsapiece,givingus3×5dots.Ontheotherhand,wealsohave5columnswith3dotsapiece,sotherearealso5×3dots.

Whydoes3×5=5×3?

Let’sapply thepatternfromthesumofoddnumbers to findanevenmorebeautifulpattern.Ifourgoalistomakethenumbersdance,thenyoumightsayweareabouttodosomesquaredancing.

Considerthisinterestingpyramidofequations:

Page 21: The Magic of Math: Solving for x and Figuring Out Why

Whatpatternsdoyousee?It’seasytocountthenumbersineachrow:3,5,7,9,11,andsoon.Nextcomesanunexpectedpattern.Whatisthefirstnumberofeachrow?Judgingfromthefirst5rows,1,4,9,16,25,...,theyappeartobetheperfectsquares.Whyisthat?Let’slookatthefifthrow.Howmanynumbersappearbefore row5? Ifwecount thenumbers in thepreceding four rows,wehave3+5+7+9.Toget the leadingnumberofrow5,wejustadd1 to thissum,sowereallyhavethesumofthefirst5oddnumbers,whichwenowknowtobe52.

Now let’s verify the fifth equation without actually adding any numbers.WhatwouldGaussdo?Ifwetemporarilyignorethe25atthebeginningoftherow,thenthereare5remainingnumbersontheleft,whichareeach5lessthantheircorrespondingnumbersontheright.

Comparingtheleftsideofrow5withtherightsideofrow5

Hencethefivenumbersontherighthaveatotalthatis25greaterthantheircorrespondingnumbersontheleft.Butthisiscompensatedforbythenumber25ontheleft.Hencethesumsbalanceaspromised.Bythesamelogic,andalittlebitofalgebra,itcanbeshownthatthispatternwillcontinueindefinitely.

Aside

Forthosewhowishtoseethelittlebitofalgebranow,hereitis.Rown isprecededby3+5+7+···+(2n−1)=n2−1numbers,sotheleftsideof

Page 22: The Magic of Math: Solving for x and Figuring Out Why

the equation must start with the number n2, followed by the next nconsecutive numbers, n2 + 1 through n2 + n. The right side has nconsecutive numbers starting with n2 + n + 1 through n2 + 2n. If wetemporarilyignorethen2numberontheleft,weseethatthennumbersontherightareeachnlargerthantheircorrespondingnumbersontheleft,sotheirdifferenceisn×n,whichisn2.Butthisiscompensatedforontheleftbytheinitialn2term,sotheequationsbalance.

Time for a newpattern.We saw that odd numbers could be used tomakesquares.Nowlet’sseewhathappenswhenweputalltheoddnumbersinonebigtriangle,asshownonthenextpage.

Weseethat3+5=8,7+9+11=27,13+15+17+19=64.Whatdothenumbers1,8,27,and64haveincommon?Theyareperfectcubes!Forexample,summingthefivenumbersinthefifthrow,weget

Anoddtriangle

21+23+25+27+29=125=5×5×5=53

Thepatternseemstosuggestthatthesumofthenumbersinthenth rowisn3.Willthisalwaysbethecase,orisitjustsomeoddcoincidence?Tohelpusunderstandthispattern,checkoutthemiddlenumbersinrows1,3,and5.Whatdoyousee?Theperfectsquares1,9,and25.Rows2and4don’thavemiddlenumbers,butsurroundingthemiddlearethenumbers3and5withanaverageof4, and the numbers 15 and 17 with an average of 16. Let’s see howwe canexploitthispattern.

Look again at row 5. Notice that we can see that the sum is 53 withoutactually adding the numbers by noticing that these five numbers aresymmetrically centered around thenumber25.Since the averageof these five

Page 23: The Magic of Math: Solving for x and Figuring Out Why

numbersis52,thentheirtotalmustbe52+52+52+52+52=5×52,whichis53.Similarly,theaverageofthefournumbersofrow4is42,sotheirtotalmustbe43.Withalittlebitofalgebra(whichwewon’tdohere),youcanshowthattheaverageofthennumbersinrownisn2,sotheirtotalmustben3,asdesired.

Sincewe’retalkingaboutcubesandsquares,Ican’tresistshowingyouonemorepattern.What totalsdoyougetasyouaddthecubesofnumbersstartingwith13?

Thesumofthecubesisalwaysaperfectsquare

Whenwestartsummingcubes,weget thetotals1,9,36,100,225,andsoon,whichareallperfectsquares.Butthey’renotjustanyperfectsquares;theyare thesquaresof1,3,6,10,15,andsoon,whichareall triangularnumbers!Earlierwesawthatthesewerethesumsofintegersandso,forexample,

13+23+33+43+53=225=152=(1+2+3+4+5)2

To put it another way, the sum of the cubes of the first n numbers is thesquare of the sumof the firstn numbers.We’re not quite ready to prove thatresultnow,butwewillseetwoproofsofthisinChapter6.

FastMentalCalculationsSomepeoplelookatthesenumberpatternsandsay,“Okay,that’snice.Butwhatgood are they?”Most mathematicians would probably respond like any artistwould—by saying that a beautiful pattern needs no justification other than itsbeauty. And the patterns become even more beautiful the more deeply weunderstandthem.Butsometimesthepatternscanleadtorealapplications.

Here’s a simple pattern that I had the pleasure of discovering (even if Iwasn’t the first person to do so)when Iwas young. Iwas looking at pairs of

Page 24: The Magic of Math: Solving for x and Figuring Out Why

numbersthataddedupto20(suchas10and10,or9and11),andIwonderedhowlargetheproductcouldget.Itseemedthatthelargestproductwouldoccurwhenbothnumberswereequalto10,andthepatternconfirmedthat.

Theproductofnumbersthataddto20

Thepatternwasunmistakable.Asthenumberswerepulledfartherapart,theproductbecamesmaller.Andhowfarbelow100werethey?1,4,9,16,25,...,which were 12, 22, 32, 42, 52, and so on. Does this pattern always work? Idecidedtotryanotherexample,bylookingatpairsofnumbersthataddupto26.

Theproductofnumbersthataddto26

Onceagain,theproductwasmaximizedwhenwechosethetwonumberstobeequal,andthentheproductdecreasedfrom169by1,then4,then9,andsoon.Afterafewmoreexamples,Iwasconvincedthatthepatternwastrue.(I’llshowyouthealgebrabehinditlater.)ThenIsawawaythatthispatterncouldbeappliedtosquaringnumbersfaster.

Supposewewant to square thenumber13. Insteadofperforming13×13directly,wewillperformtheeasiercalculationof10×16=160.Thisisalmostthe answer, but sincewewent up and down 3, it is shy of the answer by 32.Thus,

Page 25: The Magic of Math: Solving for x and Figuring Out Why

132=(10×16)+32=160+9=169

Let’stryanotherexample.Trydoing98×98usingthismethod.Todothis,wegoup2to100,thendown2to96,thenadd22.Thatis,

982=(100×96)+22=9600+4=9604

Squaringnumbers that end in5 are especially easy, sincewhenyougoupanddown5,thenumbersyouaremultiplyingwillbothendin0.Forexample,

352=(30×40)+52=1200+25=1225552=(50×60)+52=3000+25=3025852=(80×90)+52=7200+25=7225

Nowtry592.Bygoingupanddown1,youget592=(60×58)+12Buthowshouldyoumentallycalculate60×58?Threewordsofadvice:lefttoright.Let’sfirstignorethe0andcompute6×58fromlefttoright.Now6×50=300and 6 × 8 = 48. Add those numbers together (from left to right) to get 348.Therefore,60×58=3480,andso

592=(60×58)+12=3480+1=3481

Aside

Here’sthealgebrathatexplainswhythismethodworks.(Youmaywanttocomeback to thisafter readingabout thedifferenceofsquares inChapter2.)

A2=(A+d)(A−d)+d2

whereA is thenumberbeing squared, andd is thedistance to thenearesteasynumber(althoughtheformulaworksforanynumberd).Forexample,whensquaring59,A=59andd=1,sotheformulatellsyoutodo(59+1)

Page 26: The Magic of Math: Solving for x and Figuring Out Why

×(59−1)+12,asinthepreviouscalculation.

Onceyougetgoodatsquaringtwo-digitnumbers,youcansquarethree-digitnumbersbythesamemethod.Forexample,ifyouknowthat122=144,then

1122=(100×124)+122=12,400+144=12,544

Asimilarmethodcanbeusedformultiplyinganytwonumbersthatarecloseto 100.When you first see themethod, it looks like puremagic. Look at theproblem104×109.Nexttoeachnumberwewritedownitsdistancefrom100,asinthefigurebelow.Nowaddthefirstnumbertotheseconddistancenumber.Here,thatwouldbe104+9=113.Thenmultiplythedistancenumberstogether.Inthiscase,4×9=36.Pushthosenumberstogetherandyouranswermagicallyappears.

Amagicalwaytomultiplynumberscloseto100—here,104×109=11,336

I’llshowyoumoreexamplesofthisandthealgebrabehinditinChapter2.Butwhilewe’reonthesubject,letmesayafewmorewordsaboutmentalmath.We spend an awful amount of time learning pencil-and-paper arithmetic, butprecious little time learning how to do math in your head. And yet, in mostpractical situations, you aremore likely to need to calculatementally than tocalculateonpaper.Formost largecalculations,youwilluseacalculatortogetthe exact answer, but you generally don’t use a calculator when reading anutrition label or hearing a speech or listening to a sales report. For thosesituations, you typically just want a good mental estimate of the importantquantities.Themethods taught inschoolare fine fordoingmathonpaper,buttheyaregenerallypoorfordoingmathinyourhead.

Icouldwriteabookonfastmentalmathstrategies,butherearesomeoftheessential ideas. Themain tip, which I cannot emphasize enough, is to do theproblemsfromlefttoright.Mentalmathisaprocessofconstantsimplification.Youstartwithahardproblemandsimplifyittoeasierproblemsuntilyoureachyouranswerattheend.

Page 27: The Magic of Math: Solving for x and Figuring Out Why

Mentaladdition.Consideraproblemlike

314+159

(I’mwritingthenumbershorizontallysoyou’relesstemptedtogointopencil-and-paper mode.) Starting with 314, first add the number 100 to give us asimpleradditionproblem:

414+59

Adding50to414givesusanevensimplerproblemthatwecansolverightaway:

464+9=473

That is the essence ofmental addition. The only other occasionally usefulstrategy is that sometimes we can turn a hard addition problem into an easysubtractionproblem.Thisoftenarisesifweareaddingthepriceofretailitems.Forexample,let’sdo

$23.58+$8.95

Since$8.95 is5centsbelow$9,wefirstadd$9 to$23.58, thensubtract5cents.Theproblemsimplifiesto

$32.58−$0.05=$32.53

Mentalsubtraction.The most important idea with mental subtraction problems is the strategy ofoversubtracting. For example, when subtracting 9, it’s often easier to firstsubtract10,thenaddback1.Forexample,

83−9=73+1=74

Ortosubtract39,it’sprobablyeasiertofirstsubtract40,thenaddback1.

83−39=43+1=44

Page 28: The Magic of Math: Solving for x and Figuring Out Why

When subtracting numberswith twoormore digits, the key idea is to usecomplements. (You’ll compliment me later for this.) The complement of anumberisitsdistancetothenext-highestroundnumber.Withone-digitnumbers,thisisthedistanceto10.(Forexample,thecomplementof9is1.)Fortwo-digitnumbers,thisisthedistanceto100.Lookatthefollowingpairsofnumbersthataddto100.Whatdoyounotice?

Complementarytwo-digitnumberssumto100

Wesaythatthecomplementof87is13,thecomplementof75is25,andsoon.Conversely, the complement of 13 is 87 and the complement of 25 is 75.Readingeachproblemfromlefttoright,youwillnoticethat(exceptforthelastproblem) the leftmost digits add to 9 and the rightmost digits add to 10. Theexception iswhen thenumbersend in0 (as in the lastproblem).Forexample,thecomplementof80is20.

Let’sapplythestrategyofcomplementsfortheproblem1234−567.Now,thatwould not be a fun problem to do onpaper.Butwith complements,hardsubtractionproblemsbecomeeasyadditionproblems!Tosubtract567,webeginbysubtracting600.That’seasytodo,especiallyifyouthinkfromlefttoright:1234−600=634.Butyou’vesubtractedtoomuch.Howmuchtoomuch?Well,how far is 567 from 600? It’s the same as the distance between 67 and 100,whichis33.Thus

1234−567=634+33=667

Noticethattheadditionproblemisespeciallyeasybecausethereareno“carries”involved. This will often be the case when doing subtraction problems bycomplements:

Somethingsimilarhappenswiththree-digitcomplements.

Complementarythree-digitnumberssumto1000

For most problems (when the number does not end in zero), the

Page 29: The Magic of Math: Solving for x and Figuring Out Why

corresponding digits sum to 9, except the last pair of digits sum to 10. Forexample,with789,7+2=9,8+1=9,and9+1=10.Thiscanbehandywhenmaking change. For example, my favorite sandwich frommy local deli costs$6.76. Howmuch change would I get from $10.00? The answer is found bytakingthecomplementof676,whichis324.Hencethechangebackis$3.24.

Aside

Whenever I buy this sandwich, I can’t help but notice that both the priceand the changewere perfect squares (262= 676 and 182= 324). (Bonusquestion:Thereisanotherpairofperfectsquaresthataddupto1000.Canyoufindthem?)

Mentalmultiplication.After you have memorized your multiplication table through 10, you canmentally calculate, at least approximately, the answer to any multiplicationproblem. The next step is tomaster (but notmemorize!) your one-digit timestwo-digitmultiplicationproblems.Thekeyideaistoworkfromlefttoright.Forexample,whenmultiplying8×24,youshould firstmultiply8×20, thenaddthisto8×4:

8×24=(8×20)+(8×4)=160+32=192

Onceyou’vemasteredthose,it’stimetopracticeone-digittimesthree-digitmultiplicationproblems.Theseareabit trickier,since there ismore tokeep inyourmemory.Thekeyhereistograduallyaddthenumbersasyougoalongsothereisnotasmuchtoremember.Forexample,whenmultiplying456×7,youstoptoadd2800+350,asbelow,beforeadding42toit.

Page 30: The Magic of Math: Solving for x and Figuring Out Why

Once you have the hang of doing problems of this size, then it’s time tomove on to two-digit times two-digit problems. Forme, this iswhere the funbegins, because there are usually many different ways you can attack theseproblems.Bydoing theproblemmultipleways,youcancheckyouranswer—and simultaneously revel in the consistency of arithmetic! I’ll illustrate all ofthesemethodswithasingleexample,32×38.

Themostfamiliarmethod(mostcloselyresemblingwhatyoudoonpaper)istheadditionmethod,which can be applied to any problem.Herewe break upone number (usually the onewith the smaller ones digit) into two parts, thenmultiply each part by the other number, and add the results together. Forexample,

32×38=(30+2)×38=(30×38)+(2×38)=···

Nowhowdowecalculate30×38?Let’sdo3×38,thenattachthe0attheend.Now3×38=90+24=114,so30×38=1140.Then2×38=60+16=76,so

32×38=(30×38)+(2×38)=1140+76=1216

Anotherway todoaproblemlike this (typicallywhenoneof thenumbersendsin7,8,or9)istousethesubtractionmethod.Hereweexploitthefactthat38=40−2toget

38×32=(40×32)−(2×32)=1280−64=1216

Thechallengewiththeadditionandsubtractionmethodsisthattheyrequireyou to hold on to a big number (like 1140 or 1280) while doing a separatecalculation. That can be difficult. My usual preferred method for two-digitmultiplicationisthefactoringmethod,whichcanbeappliedwheneveroneofthenumbers can be expressed as the product of two 1-digit numbers. In ourexample,weseethat32canbefactoredas8×4.Consequently,

Page 31: The Magic of Math: Solving for x and Figuring Out Why

38×32=38×8×4=304×4=1216

Ifwefactor32as4×8,weget38×4×8=152×8=1216,but Iprefer tomultiplythetwo-digitnumberbythelargerfactorfirst,sothatthenextnumber(usuallyathree-digitnumber)ismultipliedbythesmallerfactor.

Aside

Thefactoringmethodalsoworkswellonmultiplesof11,sincethereisanespeciallyeasytrickformultiplyingby11: justadd thedigitsandput thetotalinbetween.Forexample,todo53×11,weseethat5+3=8,sotheansweris583.What’s27×11?Since2+7=9,theansweris297.Whatifthe totalof the twodigits isbigger than9?In thatcase,we insert the lastdigitofthetotalandincreasethefirstdigitby1.Forexample,tocompute48×11,since4+8=12,theansweris528.Similarly,74×11=814.Thiscan be exploited when multiplying numbers by multiples of 11. Forexample,

74×33=74×11×3=814×3=2442

Anotherfunmethodformultiplyingtwo-digitnumbersistheclosetogethermethod.Youcanuseitwhenbothnumbersbeginwiththesamedigit.Itseemsutterly magical when you first watch it in action. For example, would youbelievethat

38×32=(30×40)+(8×2)=1200+16=1216

Thecalculationisespeciallysimple(asintheexampleabove)whentheseconddigitssumto10.(Here,bothnumbersbeginwith3andtheseconddigitshavethesum8+2=10.)Here’sanotherexample:

83×87=(80×90)+(3×7)=7200+21=7221

Evenwhen the second digits don’t add up to 10, the calculation is almost assimple.Forexample,tomultiply41×44,ifyoudecreasethesmallernumberby

Page 32: The Magic of Math: Solving for x and Figuring Out Why

1(toreachtheroundnumber40),thenyoumustincreasethelargernumberby1aswell.Consequently,

41×44=(40×45)+(1×4)=1800+4=1804

For34×37,ifyoudecrease34by4(toreachtheroundnumber30),thenitgetsmultipliedby37+4=41,andthenweadd4×7asfollows:

34×37=(30×41)+(4×7)=1230+28=1258

Bytheway,themysteriousmultiplicationwesawearlierof104×109wasjustanapplicationofthissamemethod.

104×109=(100×113)+(04×09)=11300+36=11,336

Some schools are asking students to memorize their multiplication tablesthrough20.Ratherthanmemorizetheseproducts,wecancalculatethemquicklyenoughusingthismethod.Forexample,

17×18=(10×25)+(7×8)=250+56=306

Whydoesthismysteriousmethodwork?Forthis,we’llneedalgebra,whichwewilldiscussinChapter2.Andoncewehavealgebra,wecanfindnewwaystocalculate.For example,we’ll seewhy the lastproblemcanalsobedoneasfollows:

18×17=(20×15)+((−2)×(−3))=300+6=306

Speaking of the multiplication table, check out the one-digit table on theoppositepage that Ipromisedearlier.Here’saquestion thatwouldappeal toayoungGauss:What is the sum of all the numbers in themultiplication table?Takeaminuteandseeifyoucanfigureitoutinanelegantway.I’llprovidetheanswerattheendofthechapter.

Mentalestimationanddivision.Let’sbeginwithaverysimplequestionwithaverysimpleanswer thatwearerarelytaughtinschool:

(a) Ifyoumultiply two3-digit numbers together, canyou immediately tell

Page 33: The Magic of Math: Solving for x and Figuring Out Why

howmanydigitscanbeintheanswer?Andafollow-upquestion:(b) How many digits can be in the answer when multiplying a four-digit

numberbyafive-digitnumber?We spend so much time in school learning to generate the digits of a

multiplication or division problem, and very little time thinking about theimportant aspects of the answer. Yet it’s way more important to know theapproximate size of the answer than to know the last digits or even the firstdigits. (Knowing that theanswerbeginswith3 ismeaninglessuntilyouknowwhether the answer will be closer to 30,000 or 300,000 or 3,000,000.) Theanswer toquestion (a) is fiveor sixdigits.Why is that?Thesmallestpossibleansweris100×100=10,000,whichhasfivedigits.Thebiggestpossibleansweris 999× 999,which is strictly less than 1000× 1000= 1,000,000,which hassevendigits(butjustbarely!).Since999×999issmaller,thenitmusthavesixdigits.(Ofcourse,youcouldeasilycomputethelastanswerinyourhead:9992=(1000×998)+12=998,001.)Hencetheproductoftwo3-digitnumbersmusthavefiveorsixdigits.

Whatisthesumofall100numbersinthemultiplicationtable?

Theanswertoquestion(b) iseightorninedigits.Why?Thesmallestfour-digit number is 1000, also known as 103 (a 1 followed by three zeros). The

Page 34: The Magic of Math: Solving for x and Figuring Out Why

smallestfive-digitnumberis10,000=104.Sothesmallestproductis103×104

=107,whichhaseightdigits.(Wheredoes107comesfrom?103×104=(10×10×10)×(10×10×10×10)=107.)Andthelargestproductwillbejustahairlessthantheten-digitnumber104×105=109,sotheanswerhasatmostninedigits.

Byapplyingthislogic,wearriveatasimplerule:Anm-digitnumbertimesann-digitnumberhasm+norm+n−1digits.

It’susuallyeasytodeterminehowmanydigitswillbeintheanswerjustbylooking at the leading (leftmost) digits of each number. If the product of theleadingdigitsis10orlarger,thentheproductisguaranteedtohavem+ndigits.(Forexample,with271×828,theproductoftheleadingdigitsis2×8=16,sotheanswerhassixdigits.)Iftheproductoftheleadingdigitsis4orsmaller,thenitwill havem +n − 1 digits. For example, 314 × 159 has five digits. If theproductoftheleadingdigitsis5,6,7,8,or9,thencloserinspectionisrequired.For example, 222 × 444 has five digits, but 234 × 456 has six digits. Bothanswersareverycloseto100,000,whichisreallywhatmatters.)

Byreversingthisrule,wegetanevensimplerrulefordivision:Anm-digitnumberdividedbyann-digitnumberhasm−norm−n+1digits.

Forexample,anine-digitnumberdividedbyafive-digitnumbermusthavefour or five digits. The rule for determining which answer to choose is eveneasier than themultiplication situation. Instead of multiplying or dividing theleadingdigits,wesimplycomparethem.Iftheleadingdigitofthefirstnumber(the number being divided) is smaller than the leading digit of the secondnumber, then it’s the smaller choice (m − n). If the leading digit of the firstnumberislargerthantheleadingdigitofthesecondnumber,thenit’sthelargerchoice(m−n+1).Iftheleadingdigitsarethesame,thenwelookattheseconddigitsandapplythesamerule.Forinstance314,159,265dividedby12,358willhaveafive-digitanswer,but ifwe insteaddivide itby62,831, theanswerwillhave four digits. Dividing 161,803,398 by 14,142 will result in a five-digitanswersince16isgreaterthan14.

Iwon’tgothroughtheprocessofdoingmentaldivisionsinceitissimilartothe pencil-and-paper method. (Indeed, any method for division problems onpaperrequiresyoutogeneratetheanswerfromlefttoright!)Butherearesomeshortcutsthatcansometimesbehandy.

When dividing by 5 (or any number ending in 5), the problem usuallysimplifiesifyoudoublethenumeratoranddenominator.Forexample:

Page 35: The Magic of Math: Solving for x and Figuring Out Why

34÷5=68÷10=6.8

Afterdoublingbothnumbers,youmightnoticethatboth246and9aredivisibleby3(we’llsaymoreabout this inChapter3), sowecansimplify thedivisionproblemfurtherbydividingbothnumbersby3.

Aside

Lookatthereciprocalsofallthenumbersfrom1to10:

1/2=0.5,1/3=0.333...,1/4=0.25,1/5=0.2

1/6=0.1666...,1/8=0.125,1/9=0.111...,1/10=0.1

All of the decimal expansions above either terminate or repeat after twoterms. But the oneweird exception is the fraction for 1/7, which repeatsaftersixdecimalplaces:

1/7=0.142857142857...

(The reason all the other reciprocals end so quickly is that the othernumbers from2 through11divide intoeither10,100,1000,9,90,or99,but the first nice number that 7 divides into is 999,999.) If youwrite thedecimaldigitsof1/7inacircle,somethingmagicalhappens:

Page 36: The Magic of Math: Solving for x and Figuring Out Why

The7thcircle

What’sremarkable is thatall theotherfractionswithdenominator1/7canalso be created by going around the circle forever from the appropriatestartingpoint.Specifically,

1/7=0.142857142857...,2/7=0.285714285714...,

3/7=0.428571428571...,4/7=0.571428571428...,

5/7=0.714285714285...,6/7=0.857142857142...

Let’sendthischapterwiththequestionweaskedafewpagesago.What isthesumofallthenumbersinthemultiplicationtable?Whenyoufirstreadthequestion, it seems intimidating, just as summing the first 100 numbers mighthave.Bybecomingmorefamiliarwiththebeautifulpatternsthatemergewhennumbers dance,we have a better chance of finding a beautiful answer to thisquestion.

Webeginbyaddingthenumbersinthefirstrow.AsGauss(orourtriangularnumberformulaorjustsimpleaddition)couldtellus:

1+2+3+4+5+6+7+8+9+10=55

Whataboutthesumofthesecondrow?Well,that’sjust

2+4+6+···+20=2(1+2+3+···+10)=2×55

Page 37: The Magic of Math: Solving for x and Figuring Out Why

Bythesamereasoning,thethirdrowwillsumto3×55.Continuingthislogic,weconcludethatthesumofallofthesenumbersis

(1+2+3+···+10)×55=55×55=552

whichyoushouldnowbeabletodoinyourhead...3025!

Page 38: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERTWO

TheMagicofAlgebra

MagicalIntroductionMyfirstencounterwithalgebrawasalessonfrommyfatherwhenIwasakid.Hesaid,“Son,doingalgebraisjustlikearithmetic,exceptyousubstitutelettersfornumbers.Forexample,2x+3x=5xand3y+6y=9y.Yougotit?”Isaid,“Ithinkso.”Hesaid,“Okay,thenwhatis5Q+5Q?”Iconfidentlysaid,“10Q.”Hesaid,“Icouldn’thearyou.Canyousayitlouder?”SoIshouted,“TENQ!”andhesaid,“You’rewelcome!”(Mydadwasalwaysmuchmoreinterestedinpuns,jokes,andstoriesthanteachingmath,soIshouldhavebeensuspiciousfromthestart!)

Mysecondexperiencewithalgebrawas trying tounderstand the followingmagictrick.

Step1.Thinkofanumberfrom1to10(thoughitcanbelargerifyouwish).Step2.Doublethatnumber.Step3.Nowadd10.Step4.Nowdivideby2.

Page 39: The Magic of Math: Solving for x and Figuring Out Why

Step5.Nowsubtractthenumberthatyoustartedwith.Ibelieveyouarenowthinkingofthenumber5.Right?Sowhatisthesecretbehindthemagic?Algebra.Let’sgothroughthetrick

stepbystep,beginningwithStep1.Idon’tknowwhatnumberyoustartedwith,solet’srepresentitbytheletterN.Whenweusealettertorepresentanunknownnumber,theletteriscalledavariable.

InStep2,youaredoublingthenumber,soyouarenowthinkingof2N.(Wetypically avoidusing themultiplication symbol, especially since the letterx isfrequentlyusedasavariable.)AfterStep3,yournumberis2N+10.ForStep4,wedivide thatquantityby2,givingusN+5.Finally,wesubtract theoriginalnumber,whichwasN.AftersubtractingNfromN+5,youareleftwith5.Wecansummarizeourtrickinthefollowingtable.

RulesofAlgebraLet’s start with a riddle. Find a number such that when you add 5 to it, thenumbertriples.

Tosolvethisriddle,let’scalltheunknownnumberx.Adding5toitproducesx+5.Tripling theoriginalnumbergivesus3x.Wewant thosenumbers tobeequal,sowehavetosolvetheequation

3x=x+5

Ifwesubtractxfrombothsidesoftheequation,weget

2x=5

(Wheredoes2x come from?3x−x is the sameas3x − 1x,whichequals2x.)Dividingbothsidesofthatequationby2givesus

Page 40: The Magic of Math: Solving for x and Figuring Out Why

x=5/2=2.5

Wecanverifythatthisanswerworks,since2.5+5=7.5,whichisthesameas3times2.5.

Aside

Here’sanothertrickthatalgebracanhelpusexplain.Writedownanythree-digitnumberwherethedigitsareindecreasingorder,like842or951.Thenreverse those numbers and subtract the second number from the first.Whateveryouransweris,reverseit, thenaddthosetwonumberstogether.Let’sillustratewiththenumber853.

Nowtryitwithadifferentnumber.Whatdidyouget?Remarkably,aslongasyoufollowtheinstructionsproperly,youwillalwaysendupwith1089!Whyisthat?

Algebratotherescue!Supposewestartwiththethree-digitnumberabcwherea>b>c. Justas thenumber853=(8×100)+(5×10)+3, thenumberabchasvalue100a+10b+c.Whenwereversethedigits,wegetcba,whichhasvalue100c+10b+a.Subtracting,weget

(100a+10b+c)−(100c+10b+a)=(100a−a)+(10b−10b)+(c−100c)=99a−99c=99(a−c)

Inotherwords,thedifferencehastobeamultipleof99.Sincetheoriginalnumberhasdigitsindecreasingorder,a−cisatleast2,soitmustbe2,3,4,5,6,7,8,or9.Consequently,aftersubtracting,weareguaranteedtohaveoneofthesenumbers:

198,297,396,495,594,693,792,or891

Page 41: The Magic of Math: Solving for x and Figuring Out Why

Ineachofthesesituations,whenweaddthenumbertoitsreversal,

198+891=297+792=396+693=495+594=1089

weseethatweareforcedtoendupwith1089.

WehavejustillustratedwhatIcallthegoldenruleofalgebra:dountoonesideasyouwoulddountotheother.

Forexample,supposeyouwishtosolveforxintheequation

3(2x+10)=90

Ourgoalistoisolatex.Let’sbeginbydividingbothsidesby3,sotheequationsimplifiesto

2x+10=30

Next,let’sgetridofthat10bysubtracting10frombothsides.Whenwedothat,weget

2x=20

Finally,whenwedividebothsidesby2,wearesimplyleftwith

x=10

It’salwaysagood idea tocheckyouranswer.Here,wesee thatwhenx = 10,3(2x+10)=3(30)=90,asdesired.Arethereanyothersolutionstotheoriginalequation? No, because such a value of x would also have to satisfy thesubsequentequations,sox=10istheonlysolution.

Here’s a real-life algebra problem that comes from the New York Times,whichreportedin2014thatthemovieTheInterview,producedbySonyPictures,generated $15million in online sales and rentals during its first four days ofavailability.Sonydidnotsayhowmuchofthistotalcamefrom$15onlinesalesversus$6onlinerentals,but thestudiodidsay that therewereabout2milliontransactions overall. To solve the reporter’s problem, let’s let S denote thenumberofonlinesalesandletRdenotethenumberofonlinerentals.Sincetherewere2milliontransactions,weknowthat

Page 42: The Magic of Math: Solving for x and Figuring Out Why

S+R=2,000,000

andsinceeachonlinesaleisworth$15andeachonlinerentalisworth$6,thenthetotalrevenuesatisfies

15S+6R=15,000,000

Fromthefirstequation,weseethatR=2,000,000−S.Thisallowsustorewritethesecondequationas

15S+6(2,000,000−S)=15,000,000

or equivalently, 15S + 12,000,000 − 6S = 15,000,000, which only uses thevariableS.Thiscanberewrittenas

9S+12,000,000=15,000,000

Subtracting12,000,000frombothsidesgivesus

9S=3,000,000

andthereforeSisapproximatelyone-thirdofamillion.ThatisS≈333,333andsoR=2,000,000−S≈1,666,667.(Checking:totalsaleswouldbe$15(333,333)+$6(1,666,667)≈$15,000,000.)

It’s time to discuss a rule that we have been using throughout this bookwithoutexplicitlynamingit,calledthedistributivelaw,which is therule thatallowsmultiplication and addition toworkwell together. The distributive lawsaysthatforanynumbersa,b,c,

a(b+c)=ab+ac

Thisistherulethatweareusingwhenwemultiplyaone-digitnumberbyatwo-digitnumber.Forexample,

7×28=7×(20+8)=(7×20)+(7×8)=140+56=196

Thismakes sense ifwe thinkaboutcounting.Suppose Ihave7bagsofcoins,andeachbaghas20goldcoins and8 silver coins.Howmanycoins are therealtogether?Ontheonehand,eachbaghas28coins,sothetotalnumberofcoins

Page 43: The Magic of Math: Solving for x and Figuring Out Why

is7×28.Ontheotherhand,wecanalsoseethatthereare7×20goldcoinsand7 × 8 silver coins, and therefore (7 × 20) + (7 × 8) coins altogether.Consequently,7×28=(7×20)+(7×8).

Youcanalsoviewthedistributivelawgeometricallybylookingat theareaofarectanglefromtwodifferentperspectives,asinthepicturebelow.

Therectangleillustratesthedistributivelaw:a(b+c)=ab+ac

Ontheonehand, thearea isa(b+c).But the leftpartof therectanglehasareaab and the right part has areaac, so the combined area isab + ac. Thisillustratesthedistributivelawwhenevera,b,carepositivenumbers.

By the way, we sometimes apply the distributive law to numbers andvariablestogether.Forinstance,

3(2x+7)=6x+21

When thisequation is read fromleft to right, itcanbe interpretedasawayofmultiplying3times2x+7.Whentheequationisreadfromrighttoleft,itcanbeseenasawayoffactoring6x+21by“pullingouta3”from6xand21.

Aside

Why does a negative number times a negative number equal a positivenumber?Forinstance,whyshould(−5)×(−7)=35?Teacherscomeupwithmanyways to explain this, from talking about canceling debts to simplysaying “that’s just theway it is.”But the real reason is thatwewant thedistributivelawtoworkforallnumbers,notjustforpositivenumbers.And

Page 44: The Magic of Math: Solving for x and Figuring Out Why

ifyouwant thedistributive law towork fornegativenumbers (andzero),thenyoumustaccepttheconsequences.Let’sseewhy.

Supposeyouacceptthefactthat−5×0=0and−5×7=−35.(Thesecanbeprovedtoo,usingastrategysimilartowhatweareabouttodo,butmostpeoplearehappytoacceptthesestatementsastrue.)Nowevaluatetheexpression

−5×(−7+7)

Whatdoesthisequal?Ontheonehand,thisisjust−5×0,whichweknowtobe0.Ontheotherhand,usingthedistributivelaw,itmustalsobe((−5)×(−7))+(−5×7).Consequently,

((−5)×(−7))+(−5×7)=((−5)×(−7))−35=0

Andsince((−5)×(−7))−35=0,weareforcedtoconcludethat(−5)×(−7)=35. Ingeneral, thedistributive lawensures that (−a)×(−b)=ab for allnumbersaandb.

TheMagicofFOILOneimportantconsequenceofthedistributivelawistheFOILruleofalgebra,whichsaysthatforanynumbersorvariablesa,b,c,d,

(a+b)(c+d)=ac+ad+bc+bd

FOILgets itsnamefromFirst-Outer-Inner-Last.Here,ac is theproductof thefirsttermsin(a+b)(c+d).Thenadistheproductoftheouterterms.Thenbcistheproductoftheinnerterms.Thenbdistheproductofthelastterms.

Toillustrate,let’smultiplytwonumbersusingFOIL:

23×45 =(20+3)(40+5) =(20×40)+(20×5)+(3×40)+(3×5) =800+100+120+15 =1035

Page 45: The Magic of Math: Solving for x and Figuring Out Why

Aside

WhydoesFOILwork?By thedistributive law (with the sumpartwrittenfirst)wehave

(a+b)e=ae+be

Nowifwereplaceewithc+d,thisgivesus

(a+b)(c+d)=a(c+d)+b(c+d)=ac+ad+bc+bd

wherethelastequalitycomesfromapplyingthedistributivelawagain.Orifyoupreferamoregeometricargument (whena,b,c,d arepositive), findtheareaoftherectanglebelowintwodifferentways.

Ontheonehand,therectanglehasarea(a+b)(c+d).Ontheotherhand,wecandecomposethebigrectangleintofoursmallerrectangles,withareasac,ad, bc, and bd. Hence the area is also equal to ac + ad + bc + bd.EquatingthesetwoareasgivesusFOIL.

Here is a magical application of FOIL. Roll two dice and follow theinstructionsinthetablebelow.Asanexample, let’ssupposewhenyouroll thedice, the first die has 6 on top and the seconddie has 3 on top.Their bottomnumbersare1and4,respectively.

Page 46: The Magic of Math: Solving for x and Figuring Out Why

Inourexample,wearrivedata totalof49.And ifyou try ityourselfwithanynormalsix-sideddiceyouwillarriveatthesametotal.It’sbasedonthefactthat on every normal six-sided die, the opposite sides add to 7. So if the diceshowxandyonthetop,thentheymusthave7−xand7−yonthebottom.Sousingalgebra,ourtablelookslikethis.

NoticehowweuseFOILin the thirdrow(andthat−x times−y ispositivexy). We could also arrive at 49 using less algebra by looking at the secondcolumnofourtableandnoticingthatthesearepreciselythefourtermswewouldgetbyFOILing(x+(7−x))(y+(7−y))=7×7=49.

Inmostalgebraclasses,FOILismainlyusedformultiplyingexpressionsliketheonesbelow.

(x+3)(x+4)=x2+4x+3x+12=x2+7x+12

Noticethatinourfinalexpression,7(calledthecoefficientofthexterm)isjustthesumofthetwonumbers3+4.Andthelastnumber,12(calledtheconstantterm) is theproductof thenumbers3×4.Withpractice,youcanimmediatelywrite down the product. For example, since 5 + 7 = 12 and 5 × 7 = 35, weinstantlyget

(x+5)(x+7)=x2+12x+35

Page 47: The Magic of Math: Solving for x and Figuring Out Why

It works with negative numbers, too. Here are some examples. In the firstexample,weexploitthefactthat6+(−2)=4and6×(−2)=−12.

(x+6)(x−2)=x2+4x−12(x+1)(x−8)=x2−7x−8(x−5)(x−7)=x2−12x+35

Hereareexampleswherethenumbersarethesame.

(x+5)2=(x+5)(x+5)=x2+10x+25(x−5)2=(x−5)(x−5)=x2−10x+25

Notice that, inparticular, (x + 5)2≠x2+25, a commonmistakemadebybeginning algebra students. On the other hand, something interesting doeshappenwhenthenumbershaveoppositesigns.Forexample,since5+(−5)=0,

(x+5)(x−5)=x2+5x−5x−25=x2−25

Ingeneral,it’sworthrememberingthedifferenceofsquaresformula:

(x+y)(x−y)=x2−y2

We applied this formula in Chapter 1, where we learned a shortcut forsquaringnumbersquickly.Themethodwasbasedonthefollowingalgebra:

A2=(A+d)(A−d)+d2

Let’sfirstverifytheformula.Bythedifferenceofsquaresformula,weseethat[(A+d)(A−d)]+d2=[A2−d2]+d2=A2.Hence theformulaworksforallvaluesofAandd.Inpractice,Aisthenumberthatisbeingsquared,anddisthedistancetothenearesteasynumber.Forexample,tosquare97,wechoosed=3sothat

972 =(97+3)(97−3)+32

=(100×94)+9 =9409

Page 48: The Magic of Math: Solving for x and Figuring Out Why

Aside

Here’saproofofthedifferenceofsquarelawusingpictures.Itshowshowageometric object with area x2 − y2 can be cut and rearranged to form arectanglewitharea(x+y)(x−y).

Wealso learned inChapter1 amethod formultiplyingnumbers thatwereclose together.We focused on numbers thatwere near 100 or beganwith thesamedigit,butonceweunderstandthealgebrabehindit,wecanapplyittomoresituations.Hereisthealgebrabehindtheclose-togethermethod.

(z+a)(z+b)=z(z+a+b)+ab

Theformulaworksbecause(z+a)(z+b)=z2+zb+za+ab,andthenwecanfactoroutzfromthefirstthreeterms.Theformulaworksforanynumbers,butwe typically choose z to end in zero (which is why I chose the letter z). Forexample, to do the problem 43 × 48, we let z = 40, a = 3, b = 8. Then ourformulatellsusthat

Page 49: The Magic of Math: Solving for x and Figuring Out Why

43×48 =(40+3)(40+8) =40(40+3+8)+(3×8) =(40×51)+(3×8) =2040+24 =2064

Noticethat theoriginalnumbersbeingmultipliedhaveasumof43+48=91,and theeasiernumbersbeingmultipliedalsohaveasumof40+51=91.This is not a coincidence, since the algebra tells us that the original numbersbeingmultipliedhaveasumof(z+a)+(z+b)=2z+a+b,andthisisalsothesumof the easiernumbers zandz +a +b.With this algebra,we see thatwecouldalsorounduptoeasynumbers.Forinstance,thelastcalculationcouldalsohave been performed with z = 50, a = −7, and b = −2, so our initialmultiplicationwillbe50×41.(Aneasywaytoget41istonoticethat43+48=91=50+41.)Consequently,

43×48 =(50−7)(50−2) =(50×41)+(−7×−2) =2050+14 =2064

Aside

InChapter1,weused thismethod formultiplyingnumbers thatwere justabove 100, but it alsoworksmagicallywith numbers that are just below.Forexample,

96×97 =(100−4)(100−3) =(100×93)+(−4×−3) =9300+12 =9312

Notethat96+97=193=100+93.(Inpractice,Ijustaddthelastdigits,6+7, toknowthat100willbemultipliedbyanumber thatends in3,so it

Page 50: The Magic of Math: Solving for x and Figuring Out Why

mustbe93.)Also,onceyougetthehangofit,youdon’thavetomultiplytwonegativenumbers together,but justmultiply theirpositivevalues.Forexample,

97×87 =(100−3)(100−13) =(100×84)+(3×13) =8400+39 =8439

Themethodcanalsobeapplied tonumbers thatare justbelowandabove100,butnowyouhavetodoasubtractionattheend.Forinstance,

109×93 =(100+9)(100−7) =(100×102)−(9×7) =10,200−63 =10,137

Again,thenumber102canbeobtainedthrough109−7or93+9or109+93−100(orjustbysummingthelastdigitsoftheoriginalnumbers;9+3tellsyouthatthenumberwillendin2,whichmaybeenoughinformation).Withpractice,youcanusethistomultiplyanynumbersthatarerelativelyclose together. I’ll illustrate using three-digit numbers of moderatedifficulty.Noticehere,thenumbersaandbarenotone-digitnumbers.

218×211 =(200+18)(200+11) =(200×229)+(18×11) =45,800+198

=45,998

985×978 =(1000−15)(1000−22) =(1000×963)+(15×22) =963,000+330 =963,330

Solvingforx

Page 51: The Magic of Math: Solving for x and Figuring Out Why

Earlierinthischapter,wesawexamplesofsolvingsomeequationsbyapplyingthegoldenruleofalgebra.Whentheequationcontainsjustonevariable(sayx)and when both sides of the equation are linear (which means that they cancontainnumbersormultiplesofx,butnothingmorecomplicated,likex2terms),thenitiseasytosolveforx.Forexample,tosolvetheequation

9x−7=47

wecouldadd7tobothsidesoftheequationtoget9x=54,thendivideby9tofindx=6.

Orforaslightlymorecomplicatedalgebraproblem:

5x+11=2x+18

wesimplifybysubtracting2xfrombothsidesand(atthesametime,ifyoulike)subtracting11frombothsides,resultingin

3x=7

whichhasthesolutionx=7/3.Ultimatelyanylinearequationcanbesimplifiedtoax=b(orax−b=0)whichhassolutionx=b/a(assuminga≠0).

The situation gets more complicated for quadratic equations (where thevariablex2entersthepicture).Theeasiestquadraticequationstosolvearethoselike

x2=9

whichhas two solutions,x = 3 andx =−3.Evenwhen the right side is not aperfectsquare,asbelow,

x2=10

wehavetwosolutions, ...and ....Ingeneral,forn> 0, the number , called the square root of n, denotes the positivenumber with a square of n. When n is not a perfect square, is usuallycomputedwithacalculator.

Page 52: The Magic of Math: Solving for x and Figuring Out Why

Aside

Whatabouttheequationx2=−9?Fornow,wesayithasnosolution.Andindeedtherearenorealnumberswithasquareof−9.ButinChapter10,wewill see that inavery real sense, thereare twosolutions to this equation,namelyx=3iandx=−3i,where i is calledan imaginary numberwith asquareof−1.Ifthatsoundsimpossibleandridiculousnow,that’sfine.Buttherewasatimeinyourlifewhennegativenumbersseemedimpossibletoo.(Howcananumberbelessthan0?)Youjustneededtolookatnumbersintheright(orleft!)waybeforetheymadesense.

Anequationlike

x2+4x=12

isalittlemorecomplicatedtosolvebecauseofthe4xterm,butthereareafewdifferentways togoabout it. Just likewithmentalmathematics, there isoftenmorethanonewaytosolvetheproblem.

The first method that I try on problems like this is called the factoringmethod.Thefirststepistomoveeverythingtotheleftsideoftheequation,soallthatremainsontherightsideis0.Here,theequationbecomes

x2+4x−12=0

Nowwhat?Well,asluckwouldhaveit,inthelastsection,whenpracticingourFOILing,wesawthatx2+4x−12=(x+6)(x−2).Hence,ourproblemcanbetransformedto

(x+6)(x−2)=0

The onlyway that the product of two quantities can be 0 is if at least one ofthosequantitiesis0.Consequently,wemusthaveeitherx+6=0orx−2=0,whichmeansthateither

x=−6orx=2

Page 53: The Magic of Math: Solving for x and Figuring Out Why

which,youshouldverify,solvestheoriginalproblem.According to FOIL, (x + a)(x + b) = x2 + (a + b) x + ab. This makes

factoringaquadraticabitlikesolvingariddle.Forinstance,inthelastproblem,wehadtofindtwonumbersaandbwithasumof4andaproductof−12.Theanswer,a=6andb=−2,givesusourfactorization.Forpractice,trytofactorx2+11x+24.Theriddlebecomes:findtwonumberswithsum11andproduct24.Sincethenumbers3and8dothetrick,wehavex2+11x+24=(x+3)(x+8).

Butnowsupposewehaveanequationlikex2+9x=−13.Thereisnoeasywaytofactorx2+9x+13.Buthavenofear!Incaseslikethis,wearerescuedbythequadraticformula.Thisusefulformulasaysthat

ax2+bx+c=0

hasthesolution

wherethe±symbolmeans“plusorminus.”Here’sanexample.Fortheequation

x2+4x−12=0

wehavea=1,b=4,andc=−12.Hencetheformulatellsus

Sox=−2+4=2orx=−2−4=−6,asdesired.I thinkyou’llagreethat thefactoringmethodwasmorestraightforwardforthisproblem.

Aside

Another interesting method for solving a quadratic equation is called

Page 54: The Magic of Math: Solving for x and Figuring Out Why

completing thesquare.For theequationx2+4x = 12, let’s add4 to bothsidesoftheequation,sothatweget

x2+4x+4=16

Thereasonweadded4tobothsideswassothattheleftsidewouldbecome(x+2)(x+2).Thusourproblembecomes

(x+2)2=16

Inotherwords,(x+2)2=42.Thus,

x+2=4orx+2=−4

whichtellsusthatx=2orx=−6,aspreviouslyobserved.

Butfortheequation

x2+9x+13=0

ourbestoptionistousethequadraticformula.Here,wehavea=1,b=9,andc=13.Therefore,theformulatellsus

whichisnotsomethingwewouldhaveeasilynoticedbefore.Thereareveryfewformulasthatyouneedtomemorizeinmathematics,butthequadraticformulaiscertainlyoneof them.With justa littlepractice,you’llsoonfind thatapplyingthisformulaisaseasyas...a,b,c!

Aside

Sowhydoesthequadraticformulawork?Let’srewritetheequationax2+

Page 55: The Magic of Math: Solving for x and Figuring Out Why

bx+c=0as

ax2+bx=−c

thendividebothsidesbya(whichisnot0)toget

Andsince ,wecancompletethesquarebyaddingtobothsidesoftheaboveequation,givingus

Takingthesquarerootofbothsides,

Thus,

asdesired.

AlgebraMadeVisualThroughGraphsMathematics took a giant step forward in the seventeenth century when theFrench mathematicians Pierre de Fermat and René Descartes independentlydiscovered how algebraic equations can be visualized and, conversely, howgeometricalobjectscanbeexpressedthroughalgebraicequations.

Let’sstartwiththegraphofasimpleequation

y=2x+3

Page 56: The Magic of Math: Solving for x and Figuring Out Why

Thisequationsaysthatforeveryvalueofthevariablex,wedoubleandadd3toobtainy.Hereisatablelistingahandfulofvaluesofx,ypairs.Nextweplotthe points, as below. When drawn on a graph, the points can be labeled asorderedpairs.For instance, theplottedpointsherewouldbe(−3,3), (−2,−1),(−1, 1), and so on.When you connect the dots and extrapolate, the resultingobjectiscalledagraph.Below,weshowthegraphoftheequationy=2x+3.

Thegraphoftheequationy=2x+3

Hereissomeusefulterminology.Thehorizontallineinourpictureiscalledthex-axis;theverticallineisthey-axis.Thegraphinthisexampleisalinewithslope2andy-intercept3.Theslopemeasures thesteepnessof the line.Withaslopeof2, thissays thatasx increasesby1, theny increasesby2(whichyoucan see from the table). The y-intercept is simply the value of y when x = 0.Geometrically,thisiswherethelineintersectsthey-axis.Ingeneral,thegraphoftheequation

y=mx+b

isa linewithslopemandy-interceptb (andviceversa).Weusually identifyalinewithitsequation.Sowecouldsimplysaythatthegraphinthefigureaboveistheliney=2x+3.

Here’sagraphofthelinesy=2x−2andy=−x+7.

Page 57: The Magic of Math: Solving for x and Figuring Out Why

Wheredothegraphsofy=2x−2andy=−x+7intersect?

Theliney=2x−2hasslope2andy-intercept−2.(Thegraphisparalleltoy = 2x + 3,where the entire line has been shifted vertically down by 5.) Thegraphy=−x+7hasslope−1,soasxincreasesby1,ydecreasesby1.Let’susealgebra todetermine thepoint (x,y)where the lines cross.At thepointwheretheycross, theyhave thesamexandy value, sowewant to find avalueofxwherethey-valuesarethesame.Inotherwords,weneedtosolve

2x−2=−x+7

Addingxtobothsidesandadding2tobothsidestellsusthat

3x=9

sox=3.Onceweknowx,wecanuseeitherequationtogiveusy.Sincey=2x−2,theny=2(3)−2=4.(Ory=−x+7givesusy=−3+7=4.)Hencethelinescrossatthepoint(3,4).

Drawingthegraphofalineiseasysinceonceyouknowanytwopointsontheline,youcaneasilydrawtheentireline.Thesituationbecomestrickierwithquadratic functions (when the variable x2 enters the picture). The simplestquadratic tograph isy=x2,picturedbelow.Graphsofquadratic functionsarecalledparabolas.

Page 58: The Magic of Math: Solving for x and Figuring Out Why

Thegraphofy=x2

Here’sthegraphofy=x2+4x−12=(x+6)(x−2).

Thegraphofy=x2+4x−12=(x+6)(x−2).They-axishasbeenrescaled.

Noticethatwhenx=−6orx=2,theny=0.Wecanseethisinthegraphsince theparabola intersects thex-axis at those twopoints.Not coincidentally,theparabolaisatitslowestpointhalfwaybetweenthosetwopointswhenx=−2.Thepoint(−2,−16)iscalledthevertexoftheparabola.

Weencounterparabolaseverydayofourlives.Anytimeanobjectistossed,thecurvecreatedbytheobjectisalmostexactlyaparabola,whethertheobjectisabaseballorwaterstreamingoutofafountain,asillustratedbelow.Propertiesofparabolasarealsoexploitedinthedesignofheadlights,telescopes,andsatellitedishes.

Page 59: The Magic of Math: Solving for x and Figuring Out Why

Atypicalwaterfountain.Thisonecorrespondstotheparabolay=−.03x2+.08x+70.

Timeforsometerminology.Sofar,wehavebeenworkingwithpolynomials,which are combinations of numbers and a single variable (say x), where thevariable x can be raised to a positive integer power. The largest exponent iscalledthedegreeofthepolynomial.Forexample,3x+7isa(linear)polynomialofdegree1.Apolynomialofdegree2,likex2+4x−12,iscalledquadratic.Athird-degree polynomial, like , is called cubic. Polynomials ofdegree4and5arecalledquarticsandquintics,respectively.(Ihaven’theardofnames for polynomials of higher degree,mainly because they don’t arise thatoften in practice, although I wonder if we would call seventh-degreepolynomials septics. Some peoplemight call them that, but I’m skeptical.) Apolynomialwithnovariable in it, like thepolynomial17, hasdegree0 and iscalled aconstant polynomial. Finally, a polynomial is not allowed to have aninfinite number of terms in it. For instance, 1 + x + x2 + x3 + · · · is not apolynomial. (It’s called an infinite series, which we will talk more about inChapter12.)

Note that with polynomials, the exponents of the variables can only bepositiveintegers,soexponentsmaynotbenegativeorfractional.Forinstance,ifour equation includes something like y = 1/x or , then it is not apolynomialsince,aswe’llsee,1/x=x−1and .

Wedefine the roots of the polynomial to be the values ofx forwhich thepolynomialequals0.Forexample,3x+7hasoneroot,namelyx=−7/3.And

Page 60: The Magic of Math: Solving for x and Figuring Out Why

therootsofx2+4x−12arex=2andx=−6.Apolynomiallikex2+9hasno(real) roots.Notice that everypolynomial of degree1 (a line) has exactlyoneroot,sinceitcrossesthex-axisatexactlyonepoint,andaquadraticpolynomial(aparabola)hasatmosttworoots.Thepolynomialsx2+1,x2,andx2−1havezero,one,andtworoots,respectively.

Thegraphsofy=x2+1andy=x2−1have,respectively,zeroandtworoots.Thegraphofy=x2,picturedearlier,hasjustoneroot.

Onthenextpagewehavegraphsofsomecubicpolynomials,andyouwillnoticethattheycontainatmostthreeroots.

Thegraphof hasonerootandhasthreeroots

InChapter10wewillencounterthefundamentaltheoremofalgebra,which

Page 61: The Magic of Math: Solving for x and Figuring Out Why

showsthateverypolynomialofdegreenhasatmostnroots.Moreover,itcanbefactoredintolinearorquadraticparts.Forexample,

hasthreeroots(1,2,and−3).Whereas

x3−8=(x−2)(x2+2x+4)

hasexactlyonerealroot,whenx=2.(Italsohastwocomplexroots,butthatwilldefinitely have to wait for Chapter 10.) By the way, I should point out thatnowadays it is easy to find the graph ofmost functions, simply by typing theequationintoyourfavoritesearchengine.Forinstance,typingsomethinglike″y=(x^3−7x+6)/2″producesagraphliketheoneabove.

In this chapter,wehave seenhow to easily find the roots of any linear orquadratic polynomial. As it turns out, there are also formulas for finding theroots of a cubic or quartic polynomial, but they are extremely complicated.Theseformulaswerediscoveredinthesixteenthcentury,andformorethantwohundred years, mathematicians searched for a formula that would solve anyquinticpolynomial.Thisproblemwasattemptedbymanyof thebestminds inmathematics,allwithoutsuccess,untiltheNorwegianmathematicianNielsAbelproved,intheearlynineteenthcentury,thatsuchaformulawouldbeimpossiblefor polynomials of degree 5 or higher. This leads to a riddle that onlymathematicians find funny:Why didn’t Isaac Newton prove the impossibilitytheorem for quintics? He wasn’t Abel! We’ll see examples of how to provethingsimpossibleinChapter6.

Aside

Why does x−1 = 1/x? For example, why should 5−1 = 1/5? Look at thepatternofnumbersbelow:

53=125,52=25,51=5,50=?,5−1=??,5−2=???

Page 62: The Magic of Math: Solving for x and Figuring Out Why

Noticethateachtimeourexponentdecreasesby1,thenumberisdividedby5,whichmakessenseifyouthinkaboutit.Forthatpatterntocontinue,wewould need 50 = 1 and 5−1 = 1/5, 5−2 = 1/25, and so on. But the realreasonforitisbecauseofthelawofexponents,whichsaysxaxb=xa+b.Now the lawmakesperfect sensewhenaandb are positive integers.Forinstance,x2=x·xandx3=x·x·x.Thus,

x2·x3=(x·x)·(x·x·x)=x5

Sincewewantthelawtoworkfor0,thenthatwouldrequire

xa+0=xa·x0

andsince the leftsideequalsxa, somust therightside.But thatcanonlyhappenifx0=1.

Sincewewant thelawofexponents toworkfornegativeintegers too,thenthisforcesustoaccept

x1·x–1=x1+(–1)=x0=1

Dividing both sides by x implies that x−1 must equal 1/x. By a similarargument,x−2=1/x2,x−3=1/x3,andsoon.

Andsincewewantthelawofexponentstobetrueforallrealnumbersaswell,thatforcesustoaccept

x1/2x1/2=x1/2+1/2=x1=x

Hencewhenwemultiplyx1/2byitself,wegetx,andtherefore(whenxisapositivenumber)wehave .

FiguringOutY(andXToo!)Let’sendthischapteraswebeganit,withanalgebra-basedmagictrick.

Page 63: The Magic of Math: Solving for x and Figuring Out Why

Step1.Thinkoftwonumbersfrom1to10.Step2.Addthosenumberstogether.Step3.Multiplythatnumberby10.Step4.Nowaddthelargeroriginalnumber.Step5.Nowsubtractthesmalleroriginalnumber.Step6.Tellme thenumberyou’re thinkingofand I’ll tellyoubothof the

originalnumbers!Believeitornot,withthatonepieceofinformation,youcandetermineboth

oftheoriginalnumbers.Forexample,ifthefinalansweris126,thenyoumusthavestartedwith9and3.Evenifthistrickisrepeatedafewtimes,it’shardforyouraudiencetofigureouthowyouaredoingit.

Here’s thesecret.Todetermine the largernumber, take the lastdigitof theanswer(6here)andaddittotheprecedingnumber(s)(12here),thendivideby2.Hereweconcludethatthelargerdigitis(12+6)/2=18/2=9.Forthesmallerdigit,takethelargerdigitthatyoujustcomputed(9)andsubtractthelastdigitoftheanswer.Herethatwouldbe9−6=3.

Herearetwomoreexamplesforpractice.Iftheansweris82,thenthelargernumberis(8+2)/2=5andthesmallernumberis5−2=3.Iftheansweris137,thenthelargernumberis(13+7)/2=10andthesmallernumberis10−7=3.

Whydoesitwork?SupposeyoustartwithtwonumbersXandY,whereXisequaltoorlargerthanY.Followingtheoriginal instructionsandthealgebrainthetablebelow,weseethatafterStep5,youendupwiththenumber10(X+Y)+(X−Y).

Howdoesthathelpus?Noticethatanumberoftheform10(X+Y)wouldhavetoendin0,andthedigit(ordigits)precedingthe0wouldbeX+Y.SinceXandYarebetween1and10,andXisgreaterthanorequaltoY,thenX−Yisforced tobeaone-digitnumber (between0and9).Hence the lastdigitof theanswermustbeX−Y.Forexample,ifyoustartedwithdigits9and3,thenX=9

Page 64: The Magic of Math: Solving for x and Figuring Out Why

andY=3.HencetheanswerafterStep5mustbeginwithX+Y=9+3=12andendwithX−Y=9−3=6,resultingin126.OnceweknowX+YandX−Y,wecantaketheiraveragetoget((X+Y)+(X−Y))/2=X.ForY,wecouldcalculate((X+Y) − (X −Y))/2 (here that would be (12 − 6)/2 = 6/2 = 3), but I find itsimpler to just takethelargernumberyoujustcalculatedandthensubtract thelastdigitoftheiranswer(9−6=3)sinceX−(X−Y)=Y.

Aside

If youwould like an additional challenge for yourself (and the spectator,whomightwanttouseacalculator),youcanaskthespectatortopickanytwonumbersbetween1and100,butnowinStep3youhavethemmultiplytheirtotalby100insteadof10,thenproceedasbefore.Forexample,iftheystartedwith42and17,thenafterfivestepstheyendupwithananswerof5925.You can reconstruct the answer by stripping off the last two digitsfrom the restof theanswerandcalculating their average.Here, the largernumberis(59+25)/2=84/2=42.Togetthesmallernumber,subtractthelasttwodigitsoftheiranswerfromthelargernumber.Here,42−25=17,asdesired.Thereasonthisworksisalmostthesameexplanationasbefore,exceptafterstep5,theansweris100(X+Y)−(X−Y),whereX−Yisthelasttwodigitsoftheanswer.

Here’sonemoreexample:iftheansweris15,222(soX+Y=152andX−Y = 22), then the larger number is (152 + 22)/2 = 174/2 = 87 and thesmallernumberis87−22=65.

Page 65: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERTHREE

TheMagicof9

TheMostMagicalNumberWhenIwasakid,myfavoritenumberwas9sinceitseemedtopossesssomanymagical properties. To see an example, please follow the mathemagicalinstructionsbelow.

1. Thinkofanumberfrom1to10(orchoosealargerwholenumberanduseacalculator,ifyou’dlike).

2. Tripleyournumber.

3. Add6toit.

4. Nowtripleyournumberagain.

5. Ifyouwish,doubleyournumberagain.

6. Addthedigitsofyournumber.Iftheresultisaone-digitnumber,thenstop.

7. Ifthesumisatwo-digitnumber,thenaddthetwodigitstogether.

8. Concentrateonyouranswer.

Page 66: The Magic of Math: Solving for x and Figuring Out Why

Igetthedistinctimpressionthatyouarenowthinkingofthenumber9.Isthatright?(Ifnot,thenyoumaywanttorecheckyourarithmetic.)

Whatissomagicalaboutthenumber9?Intherestofthischapter,we’llseesomeofitsmagicalproperties,andwe’llevenconsideraworldwhereitmakessensetosaythat12and3arefunctionallythesame!Thefirstmagicalpropertyofthenumber9canbeseenbylookingatitsmultiples:

9,18,27,36,45,54,63,72,81,90,99,108,117,126,135,144,...

Whatdothesenumbershaveincommon?Ifyouaddthedigitsofeachnumber,itseemsthatyoualwaysget9.Let’scheckafewofthem:18hasdigitsum1+8=9;27has2+7=9;144has1+4+4=9.Butwait,there’sanexception:99hasdigitsum18,but18isitselfamultipleof9.Sohereisthekeyresult,whichyoumayhavebeentaughtinprimaryschool,andwhichwewillexplainlaterinthischapter:

Ifanumberisamultipleof9,thenitsdigitsumisamultipleof9(andviceversa).

Forexample,thenumber123,456,789hasdigitsum45(amultipleof9),soitisamultipleof9.Conversely,314,159hasdigitsum23(notamultipleof9),soitisnotamultipleof9.

To use this rule to understand our earlier magic trick, let’s examine thealgebra.Youstartedbythinkingofanumber,whichwecallN.Aftertriplingit,youget3N,whichbecomes3N+6atthenextstep.Triplingthatresultgivesus3(3N + 6) = 9N + 18, which equals 9(N + 2). If you decide to double thatnumber,youhave18N+36=9(2N+4).Eitherway,yourfinalansweris9timesawholenumber,andthereforeyoumustendupwithamultipleof9.Whenyoutakethesumof thedigitsof thisnumber,youmustagainhaveamultipleof9(probably9or18or27or36),andthesumofthesedigitsmustbe9.

HereisavariationofthepreviousmagictrickthatIalsoliketoperform.Asksomeonewithacalculatortosecretlychooseoneofthesefour-digitnumbers:

3141or2718or2358or9999

Thesenumbersare, respectively, the first fourdigitsofπ (Chapter8), the firstfourdigitsofe (Chapter10), consecutive Fibonacci numbers (Chapter5), andthelargestfour-digitnumber.Thenaskthemtotaketheirfour-digitnumberand

Page 67: The Magic of Math: Solving for x and Figuring Out Why

multiplyitbyanythree-digitnumber.Theendresultisasix-digitorseven-digitnumberthatyoucouldn’tpossiblyknow.Nextaskthemtomentallycircleoneofthedigitsoftheiranswer,butnottocirclea0(sinceitisalreadyshapedlikeacircle!)Askthemtorecitealloftheuncircleddigitsinanyordertheywantandto concentrate on the remaining digit.With just a little concentration on yourpart,yousuccessfullyrevealtheanswer.

Sowhat’sthesecret?Noticethatallofthefournumberstheycouldstartwitharemultiplesof9.Sinceyoustartwithamultipleof9,andyouaremultiplyingitbyawholenumber,theanswerwillstillbeamultipleof9.Thus,itsdigitsmustadduptoamultipleof9.Asthenumbersarecalledouttoyou,simplyaddthemup. Themissing digit is the number you need to add to your total to reach amultipleof9.Forexample,supposethespectatorcallsoutthedigits5,0,2,2,6,and1.Thesumofthesenumbersis16,sotheymusthaveleftoutthenumber2toreachthenearestmultipleof9,namely18.Ifthenumberscalledoutare1,1,2, 3, 5, 8, with a total of 20, then the missing digit must be 7 to reach 27.Suppose thenumberscalledout toyouaddup to18;whatdid they leaveout?Sincewetoldthemnottoconcentrateon0,thenthemissingdigitmustbe9.

Sowhydomultiplesof9alwaysadduptomultiplesof9?Let’slookatanexample.Thenumber3456,whenexpressedintermsofpowersof10,lookslike

3456 =(3×1000)+(4×100)+(5×10)+6 =3(999+1)+4(99+1)+5(9+1)+6 =3(999)+4(99)+5(9)+3+4+5+6 =(amultipleof9)+18 =amultipleof9

Bythesamelogic,anynumberwithadigitsumthatisamultipleof9mustitselfbeamultipleof9(andviceversa:anymultipleof9musthaveadigitsumthatisamultipleof9).

CastingOutNinesWhathappenswhenthesumofthedigitsofyournumberisnotamultipleof9?Forexample, consider thenumber3457.Following theaboveprocess,wecanwrite3457(whosedigitssumto19)as3(999)+4(99)+5(9)+7+12,so3457is7+12=19biggerthanamultipleof9.Andsince19=18+1,thisindicates

Page 68: The Magic of Math: Solving for x and Figuring Out Why

that3457isjust1biggerthanamultipleof9.Wecanreachthesameconclusionbyaddingthedigitsof19,thenaddingthedigitsof10,whichIrepresentas

3457→19→10→1

Theprocessofaddingthedigitsofyournumberandrepeatingthatprocessuntilyouarereducedtoaone-digitnumberiscalledcastingoutnines,sinceateach step of the process, you are subtracting a multiple of 9. The one-digitnumberobtainedattheendoftheprocessiscalledthedigitalrootoftheoriginalnumber.Forexample,thedigitalrootof3457is1.Thenumber3456hasdigitalroot9.Wecan succinctly summarizeourpreviousconclusionsas follows.Foranypositivenumbern:

Ifnhasadigitalrootof9,thennisamultipleof9.Otherwise,thedigitalrootistheremainderobtainedwhennisdividedby9.

Orexpressedmorealgebraically,ifnhasdigitalrootr,then

n=9x+r

forsomeintegerx.Theprocessofcastingoutninescanbeafunwaytocheckyouranswerstoaddition,subtraction,andmultiplicationproblems.Forexample,if an addition problem is solved correctly, then the digital root of the answermust agreewith the sum of the digital roots.Here’s an example. Perform theadditionproblem

Noticethatthenumbersbeingaddedhavedigitalrootsof5and6andtheirsum,11,hasdigitalroot2.Itisnocoincidencethatthedigitalrootoftheanswer,134,651,alsohasadigitalrootof2.Thereasonthisprocessworksingeneralisbasedonthealgebra

(9x+r1)+(9y+r2)=9(x+y)+(r1+r2)

Page 69: The Magic of Math: Solving for x and Figuring Out Why

If the numbers didn’t match, then you have definitely made a mistakesomewhere. Important: if the numbers do match, then your answer is notnecessarily right. But this process will catch most random errors about 90percentofthetime.Notethatitwillnotcatcherrorswhereyou’veaccidentallyswappedtwoofthecorrectdigits,sincetheswappingoftwocorrectdigitsdoesnotalterthedigitsum.Butifasingledigitisinerror,itwilldetectthatmistake,unlesstheerrorturneda0intoa9ora9intoa0.Thisprocesscanbeappliedevenwhenweareaddinglongcolumnsofnumbers.Forexample,supposethatyoupurchasedanumberofitemswiththepricesbelow:

Addingthedigitsofouranswer,weseethatourtotalhasdigitalroot5,andthesumofthedigitalrootsis32,whichisconsistentwithouranswer,since32hasdigitalroot5.Castingoutninesworksforsubtractionaswell.Forinstance,subtractthenumbersfromourearlieradditionproblem:

Theanswer to thesubtractionproblem48,923hasdigital root8.Whenwesubtractthedigitalrootsoftheoriginalnumbersweseethat5−6=−1.Butthisis consistent with our answer, since −1 + 9 = 8, and adding (or subtracting)multiplesof9toouranswerdoesn’tchangethedigitalroot.Bythesamelogic,adifferenceof0isconsistentwithadigitalrootof9.

Let’s take advantage of what we’ve learned to create another magic trick(like the one given in the book’s introduction). Follow these instructions; youmayuseacalculatorifyouwish.

1. Thinkofanytwo-digitorthree-digitnumber.

Page 70: The Magic of Math: Solving for x and Figuring Out Why

2. Addyourdigitstogether.

3. Subtractthatfromyouroriginalnumber.

4. Addthedigitsofyournewnumber.

5. Ifyourtotaliseven,thenmultiplyitby5.

6. Ifyourtotalisodd,thenmultiplyitby10.

7. Nowsubtract15.

Areyouthinkingof75?Forexample,ifyoustartedwiththenumber47,thenyoubeganbyadding4

+7=11,followedby47−11=36.Next3+6=9,whichisanoddnumber.Multiplyingitby10givesyou90,and90−15=75.Ontheotherhand,ifyoustartedwitha3-digitnumberlike831,then8+3+1=12;831−12=819;8+1+9=18,anevennumber.Then18×5=90,andsubtracting15givesus75,asbefore.

ThereasonthistrickworksisthatiftheoriginalnumberhasadigitsumofT,then the numbermust beT greater than amultiple of 9.Whenwe subtractTfromtheoriginalnumber,weareguaranteedtohaveamultipleof9below999,soitstotalwillbeeither9or18.(Forexample,whenwestartedwith47,ithadadigitsumof11.Wesubtracted11togetto36,withdigitsum9.)Afterthenextstep,wewillbeforcedtohave90(as9×10or18×5)followedby75,asintheexamplesabove.

Castingoutninesworksformultiplicationtoo.Let’sseewhathappensaswemultiplythepreviousnumbers:

ThereasonthatcastingoutninesworksformultiplicationisbasedonFOILfromChapter2.For instance, inour lastexample, thedigitalrootsontherighttellusthatthenumbersbeingmultipliedareoftheform9x+5and9y+6,forsomeintegersxandy.Andwhenwemultiplythesetogether,weget

(9x+5)(9y+6) =81xy+54x+45y+30

Page 71: The Magic of Math: Solving for x and Figuring Out Why

=9(9xy+6x+5y)+30 =(amultipleof9)+(27+3) =(amultipleof9)+3

Although casting out nines is not traditionally used to check divisionproblems, I can’t resist showing you an utterly magical method for dividingnumbers by 9. This method is sometimes referred to as the Vedic method.Considertheproblem

12302÷9

Writetheproblemas

NowbringthefirstdigitabovethelineandwritetheletterR(asinremainder)abovethelastdigit,likeso.

Next we add numbers diagonally like in the circled positions below. Thecircled numbers 1 and 2 add to 3, so we put a 3 as the next number in thequotient.

Then3+3=6.

Then6+0=6.

Finally,weadd6+2=8forourremainder.

Page 72: The Magic of Math: Solving for x and Figuring Out Why

And there’s the answer: 12,302 ÷ 9 = 1366 with a remainder of 8. Thatseemedalmosttooeasy!Let’sdoanotherproblemwithfewerdetails.

31415÷9

Here’stheanswer!

Startingwiththe3ontop,wecompute3+1=4,then4+4=8,then8+1=9,then9+5=14.Sotheansweris3489witharemainderof14.Butsince14=9+5,weadd1tothequotienttogetananswerof3490witharemainderof5.

Here’s a simple question with an attractive answer. I’ll leave it to you toverify(onpaperorinyourhead)that

111,111÷9=12,345R6

We saw thatwhen the remainder is 9 or larger,we simply added 1 to ourquotient,andsubtracted9fromtheremainder.Thesamesortof thinghappenswhenwehaveasumthatexceeds9inthemiddleofthedivisionproblem.Weindicate the carry, then subtract9 from the total andcontinue (or should I saycarryon?)asbefore.Forexample,withtheproblem4821÷9,westartofflikethis:

Herewestartwiththe4,butsince4+8=12,weplacea1abovethe4(toindicate a carry), then subtract 9 from 12 towrite 3 in the next spot. This isfollowedby3+2=5,then5+1=6togetananswerof535witharemainderof6,asillustratedonthenextpage.

Page 73: The Magic of Math: Solving for x and Figuring Out Why

Hereisonemoreproblemwithlotsofcarries.Try98,765÷9.

Startingwith9ontop,weadd9+8=17,indicatethecarryandsubtract9,so the second digit of the quotient becomes 8.Next, 8 + 7 = 15; indicate thecarryandwrite15−9=6.Then6+6=12;indicatethecarryandwrite12−9=3.Finally,yourremainderis3+5=8.Takingall thecarriesintoaccount,ouransweris10,973witharemainderof8.

Aside

Ifyou thinkdividingby9 is cool, checkoutdividingby91.Ask foranytwo-digit number and you can instantly divide that number by 91 to asmany decimal places as desired. No pencils, no paper, no kidding! Forexample,

53÷91=0.582417...

More specifically, the answer is ,where thebar above thedigits582417 means that those numbers repeat indefinitely. Where do thesenumbers come from? It’s as easy as multiplying the original two-digitnumberby11.UsingthemethodwelearnedfromChapter1,wecalculate53×11=583.Subtracting1fromthatnumbergivesusthefirsthalfofouranswer,namely0.582.Thesecondhalfisthefirsthalfsubtractedfrom999,whichis999−582=417.Therefore,ouransweris ,aspromised.

Let’sdoonemoreexample.Try78÷91.Here,78×11=858,so theanswerbeginswith857.Then999−857=142,so .Wehave actually seen that number inChapter 1, because 78/91 simplifies to6/7.

Thismethodworksbecause91×11=1001.Thus,inthefirstexample,. And since , we get the

repeatingpartofouranswerfrom583×999=583,000−583=582,417.

Page 74: The Magic of Math: Solving for x and Figuring Out Why

Since91=13×7,thisgivesusanicewaytodividenumbersby13byunsimplifyingittohaveadenominatorof91.Forinstance,1/13=7/91,andsince7×11=077,weget

Likewise, ,since14×11=154.

TheMagicof10,11,12,andModularArithmeticMuchofwhatwehavelearnedaboutthenumber9extendstoallothernumbersas well.When casting out nines, we were essentially replacing numbers withtheir remainders when divided by 9. The idea of replacing a numberwith itsremainder is not new for most people.We have been doing it ever since welearned how to tell time. For example, if a clock indicates that the time is 8o’clock (without distinguishing betweenmorning or evening), thenwhat timewill it indicate in3hours?What about in15hours?Or27hours?Or9hoursago?Althoughyourfirstreactionmightbetosaythatthehourwouldeitherbe11 or 23 or 35 or −1, as far as the clock is concerned, all those times arerepresented by 11 o’clock, since all of those times differ by multiples of 12hours.Thenotationmathematiciansuseis

11≡23≡35≡−1(mod12)

Whattimewilltheclocksayin3hours?In15hours?Or27hours?Or9hoursago?

Ingeneral,wesaythata≡b(mod12)ifaandbdifferbyamultipleof12.Equivalently,a≡b(mod12)ifaandbhavethesameremainderwhendividedby12.Moregenerally,foranypositiveintegerm,wesaythattwonumbersaand

Page 75: The Magic of Math: Solving for x and Figuring Out Why

barecongruentmodm,denoteda≡b(modm),ifaandbdifferbyamultipleofm.Equivalently,

a≡b(modm)ifa=b+qmforsomeintegerq

The nice thing about congruences is that they behave almost exactly thesameas regularequations, andwecanperformmodulararithmetic by adding,subtracting,andmultiplyingthemtogether.Forexample,ifa≡b(modm)andcisanyinteger,thenitisalsotruethat

a+c≡b+candac≡bc(modm)

Differentcongruencescanbeadded,subtracted,andmultiplied.Forinstance,ifa≡b(modm)andc≡d(modm),then

a+c≡b+dandac≡bd(modm)

Forexample,since14≡2and17≡5(mod12),then14×17≡2×5(mod12),andindeed238=10+(12×19).Aconsequenceofthisruleisthatwecanraisecongruencestopowers.Soifa≡b(modm),thenwehavethepowerrule:

a2≡b2 a3≡b3 ··· an≡bn (modm)

foranypositiveintegern.

Aside

Whydoesmodulararithmeticwork?Ifa≡b(modm)andc≡d(modm),thena=b+pmandc=d+qmforsomeintegerspandq.Thusa+c=(b+d)+(p+q)m,andthereforea+c≡b+d(modm).Furthermore,byFOIL,

ac=(b+pm)(d+qm)=bd+(bq+pd+pqm)m

soacandbddifferbyamultipleofmandsoac≡bd(modm).Multiplyingthe congruencea≡ b (modm) by itself gives us a2 ≡b2 (modm), and

Page 76: The Magic of Math: Solving for x and Figuring Out Why

repeatingthisprocessgivesusthepowerrule.

It is the power rule thatmakes 9 such a special numberwhenworking inbase10.Since

10≡1(mod9)

the power rule tells us that 10n ≡ 1n = 1 (mod 9) for any n, and therefore anumberlike3456satisfies

3456 =3(1000)+4(100)+5(10)+6 ≡3(1)+4(1)+5(1)+6=3+4+5+6(mod9)

Since10≡1(mod3),thisexplainswhyyoucanalsodetermineifanumberis a multiple of 3 (or what its remainder will be when divided by 3) just byaddingupitsdigits.Ifweworkedinadifferentbase,sayinbase16(calledthehexadecimalsystem,usedinelectricalengineeringandcomputerscience), thensince16≡1(mod15),youcouldtellifanumberisamultipleof15(or3or5),ordetermineitsremainderwhendividedby15,justbyaddingitsdigits.

Backtobase10.Thereisaneatwaytodetermineifanumberisamultipleof11.Itisbasedonthefactthat

10≡−1(mod11)

andtherefore10n≡ (−1)n (mod11).Therefore102≡1 (mod11),103≡ (−1)(mod11),andsoon.Forexample,anumberlike3456satisfies

3456 =3(1000)+4(100)+5(10)+6 ≡−3+4−5+6=2(mod11)

Thus3456hasaremainderof2whendividedby11.Thegeneralruleisthatanumberisamultipleof11if,andonlyif,weendupwithamultipleof11(suchas0,±11,±22,...)whenwealternatelysubtractandaddthedigits.Forinstance,isthenumber31,415amultipleof11?Bycalculating3−1+4−1+5=10,weconcludethatitisnot,butifweconsidered31,416,thenourtotalwouldbe11,andso31,416wouldbeamultipleof11.

Mod 11 arithmetic is actually used in the creation and verification of an

Page 77: The Magic of Math: Solving for x and Figuring Out Why

ISBNnumber(InternationalStandardBookNumber).Supposeyourbookhasa10-digit ISBN(asmostbooksdo thatwerepublishedprior to2007).The firstfewdigitsencodethebook’scountryoforigin,publisher,andtitle,butthetenthdigit (called the check digit) is chosen so that the numbers satisfy a specialnumerical relationship. Specifically, if the 10-digit number looks like a-bcd-efghi-j,thenjischosentosatisfy

10a+9b+8c+7d+6e+5f+4g+3h+2i+j≡0(mod11)

Forexample,mybookSecretsofMentalMath,publishedin2006,hasISBN0-307-33840-1,andindeed

10(0)+9(3)+8(0)+7(7)+6(3)+5(3)+4(8)+3(4)+2(0)+1=154≡0(mod11)

since 154 = 11 × 14. You might wonder what happens if the check digit isrequired to be 10. In that case, the digit is assigned the letterX, which is theRomannumeral for 10.The ISBN systemhas the nice feature that if a singledigit isenteredincorrectly, thesystemcandetect that.Forinstance,ifthethirddigit is incorrect, then the total at the endwill be off by somemultiple of 8,eitheras±8or±16or...±80.Butnoneofthosenumbersaremultiplesof11(because11isaprimenumber),sotheadjustedtotalcannotbeamultipleof11.Infact,withalittlebitofalgebra,itcanalsobeshownthatthesystemcandetectanerrorwhenevertwodifferentdigitsaretransposed.Forexample,supposethatdigitscandfweretransposedbuteverythingelsewascorrect.Thentheonlypartofthetotalaffectedisthecontributionfromthecandfterm.Theoldtotaluses8c+5fandthenewtotaluses8f+5c.Thedifferenceis(8f+5c)−(8c+5f)=3(f−c),whichisnotamultipleof11.Hencethenewtotalwillnotbeamultipleof11.

In2007, publishers switched to the ISBN-13 system,whichused13digitsandwasbasedonmod10arithmeticinsteadofmod11.Underthisnewsystem,thenumberabc-d-efg-hijkl-mcanonlybevalidwhenitsatisfies

a+3b+c+3d+e+3f+g+3h+i+3j+k+3l+m≡0(mod10)

Forexample,theISBN-13forthisbookis978-0-465-05472-5.Aquickwaytocheck this number is to separate the odd and even positioned numbers tocompute

Page 78: The Magic of Math: Solving for x and Figuring Out Why

(9+8+4+5+5+7+5)+3(7+0+6+0+4+2)=43+3(19)=43+57=100≡0(mod10)

The ISBN-13 system will detect any single-digit error andmost (but not all)transpositionerrorsofconsecutiveterms.Forinstance,inthelastexample,ifthelastthreedigitsarechangedfrom725to275,thentheerrorwillnotbedetected,sincethenewtotalwillbe110,whichisstillamultipleof10.Asimilarsortofmod 10 system is in place for verifying barcode, credit card, and debit cardnumbers.ModulararithmeticalsoplaysamajorroleinthedesignofelectroniccircuitsandInternetfinancialsecurity.

CalendarCalculatingMyfavoritemathematicalparty trickis to tellpeople thedayof theweektheywereborn,given theirbirthday information.Forexample, ifsomeone toldyouthatshewasbornonMay2,2002,youcaninstantlytellherthatshewasbornonaThursday.Anevenmorepracticalskillistheabilitytofigureoutthedayoftheweek for any date of the current or upcoming year. I will teach you an easymethodtodothis,andthemathematicsbehindit,inthissection.

But before we delve into the method, it’s worth reviewing some of thescientific andhistorical backgroundbehind the calendar.Since theEarth takesabout365.25daystotravelaroundtheSun,atypicalyearhas365days,butweaddaleapday,February29,everyfouryears.(Thisway,infouryears,wehave4×365+1=1461days,whichisjustaboutright.)ThiswastheideabehindtheJuliancalendar,establishedbyJuliusCaesarmorethantwothousandyearsago.Forexample,theyear2000isaleapyear,asiseveryfourthyearafterthat:2004,2008,2012,2016,andsoon,upthrough2096.Yet2100willnotbealeapyear.Whyisthat?

The problem is that a year is actually about 365.243 days (about elevenminutes less than 365.25), so leap years are ever so slightly over-represented.With four hundred trips around the Sun,we experience 146,097 days, but theJuliancalendarallocated400×365.25=146,100days for this (which is threedaystoolong).Toavoidthisproblem(andotherdifficultiesassociatedwiththetimingofEaster)theGregoriancalendarwasestablishedbyPopeGregoryXIIIin1582.Inthatyear,theCatholicnationsremovedtendaysfromtheircalendar.For example, in Spain, the Julian date of Thursday, October 4, 1582, was

Page 79: The Magic of Math: Solving for x and Figuring Out Why

followed by the Gregorian date of Friday, October 15, 1582. Under theGregorian calendar, years thatwere divisible by 100would no longer be leapyears, unless they were also divisible by 400 (thus removing three days).Consequently,1600remaineda leapyearon theGregoriancalendar,but1700,1800, and 1900 would not be leap years. Likewise, 2000 and 2400 are leapyears,buttheyears2100,2200,and2300arenotleapyears.Underthissystem,inanyfourhundredyearperiod,thenumberofleapyearsis100−3=97andthereforethenumberofdayswouldbe(400×365)+97=146,097asdesired.

TheGregoriancalendarwasnotacceptedbyallcountriesrightaway,andthenon-Catholiccountrieswereparticularlyslowtoadoptit.Forexample,Englandanditscoloniesdidn’tmaketheswitchuntil1752,whenWednesday,September2, was followed by Thursday, September 14. (Notice that eleven days wereeliminated, since 1700 was a leap year on the Julian calendar but not in theGregoriancalendar.)Itwasnotuntil the1920sthatallcountrieshadconvertedfrom the Julian to the Gregorian calendar. This has been a source ofcomplicationsforhistorians.MyfavoritehistoricalparadoxisthatbothWilliamShakespeareandMigueldeCervantesdiedonthesamedate,April23,1616,andyet they died ten days apart. That’s because when Cervantes died, Spain hadconvertedtotheGregoriancalendar,butEnglandwasstillontheJuliancalendar.SowhenCervantesdiedonGregorianApril23,1616,itwasstillApril13,1616,inEngland,whereShakespearewasliving(ifonlyfortenmoredays).

TheformulatodeterminethedayoftheweekforanydateontheGregoriancalendargoeslikethis:

DayofWeek≡MonthCode+Date+YearCode(mod7)

andwewill explainallof these terms shortly. Itmakes sense that the formulausesmodulararithmetic,workingmod7,sincethereare7daysinaweek.Forexample,ifadateis72daysinthefuture,thenitsdayoftheweekwillbetwodaysfromtoday,since72≡2(mod7).Oradatethatis28daysfromtodaywillhavethesamedayoftheweek,since28isamultipleof7.

Let’s start with the codes for the days of the week, which are easy tomemorize.

Page 80: The Magic of Math: Solving for x and Figuring Out Why

Ihaveprovidedmnemonicstogoalongwitheachnumber-daypair,mostofwhichareself-explanatory.ForWednesday,noticethatifyouraisethreefingerson your hand, you create the letterW. For Thursday, if you pronounce it as“Thor’sDay,”thenitwillrhymewith“Four’sDay.”

Aside

Sowheredothenamesofthedaysoftheweekcomefrom?ThecustomofnamingthedaysoftheweekaftertheSun,theMoon,andthefiveclosestheavenlybodiesdatesbacktoancientBabylonia.FromtheSun,theMoon,and Saturn, we immediately get Sunday, Monday, and Saturday. Othernamesareeasier tosee inFrenchorSpanish.For instance,MarsbecomesMardiorMartes;MercurybecomesMercrediorMiércoles;JupiterbecomesJeudi or Jueves; Venus becomes Vendredi or Viernes. Note that Mars,Mercury, Jupiter, and Venus were also the names of Roman gods andgoddesses. The English language has Germanic origins and the earlyGermansrenamedsomeofthesedaysforNorsegods.SoMarsbecameTiw,Mercury becameWoden, Jupiter became Thor, andVenus became Freya,andthat’showwearrivedatthenamesforTuesday,Wednesday,Thursday,andFriday.

The month codes are given below, along with my mnemonics forrememberingthem.

Page 81: The Magic of Math: Solving for x and Figuring Out Why

I’llexplainhowthesenumbersarederivedlater,butIwantyoutofirstlearnhowtoperformthecalculation.Fornow,theonlyyearcodeyouneedtoknowisthat2000hasyearcode0.Let’susethisinformationtodeterminethedayoftheweekofMarch19(mybirthday)thatyear.SinceMarchhasamonthcodeof2,and2000hasayearcodeof0,thenourformulatellsusthatMarch19,2000,has

DayofWeek=2+19+0=21≡0(mod7)

Therefore,March19,2000,wasaSunday.

Aside

Here isaquickexplanationofwhere themonthcodescome from.Noticethat in a non-leap year, themonth codes for February andMarch are thesame.Thatmakessense,becausewhenFebruaryhas28days,thenMarch1is28daysafterFebruary1,andsobothmonthswillbeginonthesamedayoftheweek.Nowasithappens,March1,2000,wasaWednesday.Soifwe

Page 82: The Magic of Math: Solving for x and Figuring Out Why

wanttogive2000ayearcodeof0andwewanttogiveMondayadaycodeof1,thenthatforcesthemonthcodeforMarchtobe2.Thus,ifit’snotaleapyear,thenFebruarymusthaveacodeof2too!AndsinceMarchhas31days,which is3greater than28, then theAprilcalendar is shifted3daysfurther,whichiswhyithasamonthcodeof2+3=5.Andwhenweaddthe28+2daysofApriltothemonthcodeof5,weseethatMaymusthavemonthcode5+2=7,whichcanbereducedto0sinceweareworkingmod7.Continuingthisprocess,wecandeterminethemonthcodesfortherestoftheyear.

Ontheotherhand,inaleapyear(like2000),Februaryhas29days,sotheMarchcalendarwillbeonedayaheadofFebruary’scalendar,whichiswhythemonthcodeforFebruaryis2−1=1inaleapyear.Januaryhas31days,soitsmonthcodemustbe3belowthemonthcodeforFebruary.Soinanon-leapyear,themonthcodeforJanuarywillbe2−3=−1≡6(mod7).Inaleapyear,themonthcodeforJanuarywillbe1−3=−2≡5(mod7).

What happens to your birthday as you go from one year to the next?Normally, there are 365days betweenyour birthdays, andwhen that happens,yourbirthdayadvancesbyonedaybecause365≡1(mod7),since365=52×7+ 1. But when February 29 appears between your birthdays (assuming youweren’tbornonFebruary29yourself),thenyourbirthdaywilladvancebytwodays instead. In termsof our formula,we simply add1 to the year code eachyear,except in leapyears,whenweadd2 instead.Hereare theyearcodesforyears2000through2031.Don’tworry.Youwillnotneedtomemorizethis!

Noticehowtheyearcodesbegin0,1,2,3,thenat2004weleapoverthe4forayearcodeof5.Then2005hasyearcode6,and2007shouldhaveyearcode7,butsinceweareworkingmod7,wesimplifythisnumberto0.Then2007hasyearcode1,then2008(aleapyear)has

Page 83: The Magic of Math: Solving for x and Figuring Out Why

yearcode3,andsoon.Usingthetable,wecandeterminethatin2025(thenextyearwhichwillbeaperfectsquare),PiDay(March14)willbeon

DayofWeek=2+14+3=19≡5(mod7)=Friday

HowaboutJanuary1,2008?Notethat2008isaleapyear,sothemonthcodeforJanuarywillbe5insteadof6.Consequently,wehave

DayofWeek=5+1+3=9≡2(mod7)=Tuesday

Noticethatwhenyoureadacrosseachrowinthetable,aswegain8years,ouryearcodealwaysincreasesby3(mod7).Forinstance,thefirstrowhas0,3,6,2(where2isthesameas9(mod7)).That’sbecauseinany8-yearperiod,thecalendarwillalwaysexperiencetwoleapyears,sothedateswillshiftby8+2=10≡3(mod7).

Here’s evenbetter news.Between1901 and2099, the calendarwill repeatevery 28 years.Why? In 28 years,we are guaranteed to experience exactly 7leapyears,sothecalendarwillshiftby28+7=35days,whichleavesthedayoftheweekunchanged,since35isamultipleof7.(Thisstatementisnottrueifthe28-yearperiodcrosses1900or2100,sincethoseyearsarenotleapyears.)Thusbyaddingor subtractingmultiplesof28,youcan turnany yearbetween1901and2099intoayearbetween2000and2027.Forexample,1983hasthesameyearcodeas1983+28=2011.Theyear2061hasthesameyearcodeas2061−56=2005.

Page 84: The Magic of Math: Solving for x and Figuring Out Why

Thus, for all practical purposes, you can convert any year into one of theyears on this table, and these year codes can be calculated pretty easily. Forexample,whyshould2017haveayearcodeof0?Well,startingin2000,whichhasayearcodeof0,thecalendarhasshifted17timesplusanadditional4timestoaccountfortheleapyearsof2004,2008,2012,and2016.Hencetheyearcodefor2017is17+4=21≡0(mod7).Howabout2020?Thistimewehave5leap-yearshifts(including2020)sothecalendarshifts20+5=25times,andsince25≡ 4 (mod 7), the year 2020 has a year code of 4. In general, for any yearbetween2000and2027,youcandetermineitsyearcodeasfollows.

Step1:Takethelasttwodigitsoftheyear.Forexample,with2022,thelasttwodigitsare22.

Step2:Dividethatnumberby4,andignoreanyremainder.(Here,22÷4=5witharemainderof2.)

Step3:AddthenumbersinSteps1and2.Here,22+5=27.Step4:Subtractthebiggestmultipleof7belowthenumberinStep3(which

willeitherbe0,7,14,21,or28)toobtaintheyearcode.(Inotherwords,reducethenumberinStep3,mod7.)Since27−21=6,thentheyearcodefor2022is6.

NotethatSteps1through4willworkforanyyearbetween2000and2099,but thementalmath isusually simpler ifyou first subtract amultipleof28 tobringtheyearbetween2000and2027.Forexample,theyear2040canbefirstreducedto2012,thenSteps1through4produceayearcodeof12+3−14=1.Butyoucanalsoworkdirectlyon2040toobtainthesameyearcode:40+10−49=1.

The same steps can be applied to years outside of the 2000s. The monthcodesdonotchange.Thereisjustonelittleadjustmentfortheyearcodes.Theyear code for 1900 is 1.Consequently, the codes from1900 through1999 areexactlyonelargerthantheirrespectivecodesfrom2000through2099.Sosince2040hasayearcodeof1,then1940willhaveayearcodeof2.Since2022hasayearcodeof6,then1922willhaveayearcodeof7(or,equivalently,0).Theyear1800hasayearcodeof3,1700hasayearcodeof5,and1600hasayearcodeof0.(Infact,thecalendarwillcycleevery400years,sincein400yearsitwill have exactly 100 − 3 = 97 leap years and so 400 years from now, thecalendarwillshift400+97=497days,whichisthesameastoday,since497isamultipleof7.)

WhatdayoftheweekwasJuly4,1776?Tofindtheyearcodefor2076,wefirstsubtract56andthencomputetheyearcodefor2020:20+5−21=4.Thus

Page 85: The Magic of Math: Solving for x and Figuring Out Why

theyearcode for1776 is4+5=9≡2 (mod7).Therefore,on theGregoriancalendar,July4,1776,has

DayofWeek=5+4+2=11≡4(mod7)=Thursday

Perhaps the signers of the Declaration of Independence needed to passlegislationquicklybeforethelongholidayweekend?

Aside

Let’sendthischapterwithanothermagicalpropertyofthenumber9.Takeanynumberthathasdifferentdigits,writtenfromsmallesttolargest.Suchnumbers include12345,2358,369,or135789.Multiply thisnumberby9andaddthedigits.Althoughweexpectthesumtobeamultipleof9,itisquite surprising that the sum of the digits will always be exactly 9. Forinstance,

9×12345=11,105 9×2358=21,222 9×369=3321

Itevenworks ifdigitsarerepeated,as longas thenumber iswrittenfromsmallest to largest and the ones digit is not equal to the tens digit. Forexample,

9×12223=110,007 9×33344449=300,100,041

Sowhydoesthiswork?Let’sseewhathappenswhenwemultiply9bythenumberABCDE,whereA≤B≤C≤D<E.Sincemultiplyingby9 isthe same as multiplying by 10 − 1, this is the same as the subtractionproblem

Ifwedothesubtractionfromlefttoright,thensinceB≥AandC≥BandD≥CandE>D,thisbecomesthesubtractionproblem

Page 86: The Magic of Math: Solving for x and Figuring Out Why

andthesumofthedigitsofouransweris

A+(B−A)+(C−B)+(D−C)+(E−D−1)+(10−E)=9

asdesired.

Page 87: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERFOUR

3!−2!=4TheMagicofCounting

MathwithanExclamationPoint!Webeganthisbookwiththeproblemofaddingthenumbersfrom1to100.Wediscoveredthetotalof5050andfoundaniceformulaforthesumofthefirstnnumbers.Nowsupposewewereinterestedinfindingtheproductofthenumbersfrom1to100;whatwouldweget?Areallybignumber!Ifyou’recurious,it’sthe158-digitnumbergivenbelow:

93326215443944152681699238856266700490715968264381621468592963895217599993229915608941463976156518286253697920827223758251185210916864000000000000000000000000In this chapter, we will see how numbers like this are the foundation of

countingproblems.Thesenumberswillenableustodeterminesuchthingsasthenumberofwaystoarrangeadozenbooksonabookshelf(nearlyhalfabillion),yourchanceofbeingdealtatleastonepairinpoker(notbad),andyourchanceofwinningthelottery(notgood).

Whenwemultiplythenumbersfrom1tontogether,wedenotetheproductasn!,whichispronounced“nfactorial.”Inotherwords,

n!=n×(n−1)×(n−2)×···×3×2×1

Page 88: The Magic of Math: Solving for x and Figuring Out Why

Forexample,

5!=5×4×3×2×1=120

I think the exclamation point is the appropriate notation since the number n!grows very quickly and, as we’ll see, it has many exciting and surprisingapplications. For convenience, mathematicians define 0! = 1, and n! is notdefinedwhennisanegativenumber.

Aside

Fromitsdefinition,manypeopleexpectthat0!shouldbeequalto0.Butletmetrytoconvinceyouwhy0!=1makessense.Noticethatforn≥2,n!=n×(n−1)!,andso

Ifwewantthatstatementtoremaintruewhenn=1,thiswouldrequirethat

Asseenbelow,factorialsgrowsurprisinglyquickly:

Page 89: The Magic of Math: Solving for x and Figuring Out Why

Howbig are these numbers? It’s been estimated that there are about 1022

grains of sand in the world and about 1080 atoms in the universe. If youthoroughlymixupadeckof52cards,whichwe’ll seecanbedone52!ways,there is a very good chance that the order you obtained has never been seenbeforeandwillneverbeseenagain,even ifeverypersononearthproducedanewshuffleddeckeveryminuteforthenextmillionyears!

Aside

Atthebeginningofthischapter,youprobablynoticedthat100!endedwithlots of zeros.Where did all the zeros come from?Whenmultiplying thenumbers from 1 to 100 we obtain a 0 every time a multiple of 5 ismultipliedbyamultipleof2.Amongthenumbersfrom1to100thereare20multiplesof5and50evennumbers,whichmightsuggestthatweshouldhave 20 zeros at the end. But the numbers 25, 50, 75, and 100 each

Page 90: The Magic of Math: Solving for x and Figuring Out Why

contributeanadditionalfactorof5,so100!willendwith24zeros.

Just like in Chapter 1, there are many beautiful number patterns usingfactorials.Hereisonemyfavorites.

Afactorialnumberpattern

TheRuleofSumandProductMostcountingproblemsessentiallyboildowntotworules:Theruleofsumandtheruleofproduct.Theruleofsum isusedwhenyouwant tocount the totalnumber of options you have when you have different types of choices. Forexample, if you had 3 short-sleeved shirts and 5 long-sleeved shirts, then youhave8differentchoicesforwhichshirttowear.Ingeneral,ifyouhavetwotypesof objects, where there are a choices for the first type and b choices for thesecondtype,thentherearea+bdifferentobjects(assumingthatnoneofthebchoicesarethesameasanyoftheachoices).

Aside

The ruleof sum,as stated, assumes that the two typesofobjectshavenoobjectsincommon.Butiftherearecobjectsthatbelongtobothtypes,thenthose objects would be counted twice. Hence the number of differentobjectswouldbea+b−c.Forexample,ifaclassofstudentshas12dogowners,19catowners,and7studentswhoownbothdogsandcats,thenthenumberofstudentswhoownacatoradogwouldbe12+19−7=24.Foramoremathematicalexample,amongthenumbersfrom1to100thereare

Page 91: The Magic of Math: Solving for x and Figuring Out Why

50multiplesof2,33multiplesof3,and16numbersthataremultiplesof2and3(namelythemultiplesof6).Hencethenumberofnumbersbetween1and100thataremultiplesof2or3is50+33−16=67.

Theruleofproductsaysthatifanactionconsistsoftwoparts,andthereareawaystodothefirstpartandthenbwaystodothesecondpart,thentheactioncanbecompletedina×bways.Forinstance,ifIown5differentpairsofpantsand 8 different shirts, and if I don’t care about color coordination (which I’mafraidappliestomostmathematicians),thenthenumberofdifferentoutfitsis5×8=40.IfIown10tiesandanoutfitconsistsofshirt,pants,andtie,thentherewouldbe40×10=400outfits.

Inatypicaldeckofcards,eachcardisassignedoneof4suits(spades,hearts,diamonds,orclubs)andoneof13values(A,2,3,4,5,6,7,8,9,10,J,Q,orK).Hencethenumberofcardsinadeckis4×13=52.Ifwewantedto,wecoulddealoutall52cardsina4-by-13rectangle,whichisanotherwayofseeingthatthereare52cards.

Let’sapplytheruleofproducttocountzipcodes.Howmanyfive-digitzipcodes are theoretically possible? Each digit of a zip code can be any numberfrom0 to9,so thesmallestzipcodecouldbe00000and the largestwouldbe99999; hence there are 100,000 possibilities.But you can also see this by therule of product.You have 10 choices for the first digit (0 through 9) then 10choicesfortheseconddigit,10choicesforthethird,10choicesforthefourth,

Page 92: The Magic of Math: Solving for x and Figuring Out Why

and10choicesforthefifth.Hencethereare105=100,000possiblezipcodes.Whencountingzipcodes,numberswereallowed toberepeated.Nowlet’s

look at the situation where objects can’t be repeated, such as when you arearrangingobjects in a row. It’s easy to see that twoobjects canbe arranged2ways.Forinstance,lettersAandBcanbearrangedeitherasABorasBA.Andthree objects can be arranged 6 ways: ABC, ACB, BAC, BCA, CAB, CBA.Nowcanyouseehowfourobjectscanbearrangedin24wayswithoutexplicitlywritingthemdown?Thereare4choicesforwhichlettergoesfirst(eitherAorBorCorD).Oncethatletterhasbeenchosen,therewillbe3choicesforthenextletter,then2choicesforthenextletter,andfinallythereisonly1possibilityforthe last letter. Altogether, there are 4 × 3 × 2 × 1 = 4! = 24 possibilities. Ingeneral,therearen!waystoarrangendifferentobjects.

Wecombine the rulesof sumandproduct in thisnextexample.Supposeastatemanufactureslicenseplatesoftwovarieties.TypeIlicenseplatesconsistof3lettersfollowedby3digits.TypeIIlicenseplatesconsistof2lettersfollowedby4digits.Howmanylicenseplatesarepossible?(Weallowall26lettersandall10digits,ignoringtheconfusionthatcanoccurwithsimilarcharacterslikeOand0.)Fromtheruleofproduct,thenumberofTypeIplatesis:

26×26×26×10×10×10=17,576,000

ThenumberofTypeIIplatesis

26×26×10×10×10×10=6,760,000

SinceeveryplateiseitherTypeIorTypeII(notboth),thentheruleofsumsaysthatthenumberofpossibilitiesistheirtotal:24,336,000.

Oneof thepleasuresofdoingcountingproblems (mathematicians call thisbranchofmathematicscombinatorics)isthatquiteoftenyoucansolvethesameproblem inmore than oneway. (We saw thiswas truewithmental arithmeticproblemstoo.)Thelastproblemcanactuallybedoneinonestep.Thenumberoflicenseplatesis

26×26×36×10×10×10=24,336,000

sincethefirsttwocharactersoftheplatecaneachbechosen26ways,thelast3characters can each be chosen 10ways, and the third character, depending onwhetheritwasaletteroradigit,canbechosen26+10=36ways.

Page 93: The Magic of Math: Solving for x and Figuring Out Why

LotteriesandPokerHandsIn this section,we’llapplyournewcountingskills todetermine thechanceofwinning the lottery or beingdealt various types of poker hands.But first let’srelaxwithalittlebitoficecream.

Supposeanicecreamshopoffers10flavorsoficecream.Howmanywayscan you create a triple cone?When creating a cone, the order of the flavorsmatters(ofcourse!).Iftheflavorsareallowedtoberepeated,thensincewehave10 choices for each of the three scoops, therewould be 103 = 1000 possiblecones.Ifweinsistthatallthreeflavorsbedifferent,thenthenumberofconesis10×9×8=720,asillustratedopposite.

Butnowfor therealquestion.Howmanywayscanyouput threedifferentflavorsinacup,whereorderdoesnotmatter?Sinceorderdoesn’tmatter,therearefewerpossibilities. Infact, thereare1/6thasmanyways.Whyis that?Foranychoiceof threedifferent flavors ina cup (saychocolate,vanilla, andmintchip), thereare3!=6ways that theycanbearrangedonacone.Hence therewouldbe6timesasmanyconesascups.Consequently,thenumberofcupsis

Anotherway towrite10×9×8 is10!/7! (although the firstexpression iseasiertocalculate).Hencethenumberofcupscanbeexpressedas .Wecallthisexpression“10choose3,”anditisdenotedbythesymbol ,whichequals120.Ingeneral,thenumberofwaystochoosedifferentobjectswhereorderdoesnotmatter fromacollectionofn differentobjects is pronounced“n choosek”andhastheformula

Mathematicians refer to these counting problems as combinations, andnumbers of the form are called binomial coefficients. Counting problemswheretheorderdoesmatterarecalledpermutations.It’seasytomixthesetermsup—forexample,weoftenrefertoa“combinationlock”whenwereallyshouldbe saying “permutation lock,” since the order that the numbers are used isimportant.

Page 94: The Magic of Math: Solving for x and Figuring Out Why

Foreverycupwith3flavors,thereare3!=6waystoarrangethemonacone

Iftheicecreamshopoffered20flavorsandyouwishtofillabucketwith5scoops consisting of all different flavors (where order is not important), thentherewouldbe

possibilities.Bytheway,ifyourcalculatordoesnothaveabuttonthatcomputes,youcanjusttypethewords“20choose5”intoyourfavoritesearchengine

anditwillprobablydisplayacalculatorwiththeanswer.Binomial coefficients sometimes appear in problemswhere order seems to

matter.Ifweflipacoin10times,howmanypossiblesequencesarethere(likeHTHTTHHTTTorHHHHHHHHHH)?Sincethereare2possibleoutcomesforeachflip,thentheruleofproducttellsusthatthereare210=1024sequences,eachofwhichhasthesameprobabilityofoccurring.(Somepeopleareinitiallysurprised by this, since the second sequence in our example may seem lessprobablethanthefirstone,buttheyeachhaveprobabilityof .)Ontheotherhand, it iswaymore likely for ten flips of a coin to produce4 heads than10heads.There is justoneway toachieve10heads, so thathasprobability .But how many ways can we get 4 heads out of 10? Such a sequence isdeterminedbypicking4ofthe10flipstobeheads,andtherestareforcedtobetails.Thenumberofwaystodeterminewhich4ofthe10flipsaretobeheadsis

.(It’slikepicking4differentscoopsoficecreamamong10possibleflavors.)Hencewhenafaircoinisflipped10times,theprobabilitythatweget

Page 95: The Magic of Math: Solving for x and Figuring Out Why

exactly4headsis

whichisabout20percentofthetime.

Aside

It’snaturaltoask,from10possibleflavors,howmanycupswith3scoopscanbemade if repetitionof flavors isallowed?(Theanswer isnot103/6,which is not even a whole number!) The direct approach would be toconsider three cases, depending on the number of different flavors in thecup.Naturallythereare10cupsthatusejustoneflavorand,fromtheabovediscussion, there are cups that use three flavors. There are

cups that use two flavors, since we can choose the twoflavors in ways, then decide which of the flavors gets two scoops.Addingallthreecasestogether,thenumberofcupsis10+120+90=220.

There is anotherway to get this answerwithout breaking it into threecases.Anycupcanbe representedusing3 stars and9bars.Forexample,choosingflavors1,2,and2canberepresentedbythestar-bararrangement

|*||||||||

Pickingflavors2,2,and7wouldlooklike

|*||||||||

andthestar-bararrangement

||*|||||||

wouldbeacupwithflavors3,5,and10.Everyarrangementof3starsand9barscorresponds toadifferentcup.Together thestarsandbarsoccupy12spaces,3ofwhichareoccupiedbystars.Hence, thestarsandbarscanbe

Page 96: The Magic of Math: Solving for x and Figuring Out Why

arranged in ways. More generally, the number of ways tochoose k objects out of n where order is not important, but repetition isallowed,isthenumberofwaystoarrangekstarsandn−1bars,whichcanbedonein ways.

Many problems involving games of chance involve combinations. Forexample,intheCaliforniaLottery,youpick5differentnumbersbetween1and47. Additionally, you choose a MEGA number between 1 and 27 (which isallowedtobearepeatofoneofyour5chosennumbers).Thereare27choicesfortheMEGAnumberandtheother5numberscanbechosen ways.Hencethenumberofpossibilitiesis

Thusyourchanceofwinningthelotterygrandprizeisabout1in40million.Nowlet’sswitchgearsandconsiderthegameofpoker.Atypicalpokerhand

consistsof5differentcardschosenfrom52differentcards,wheretheorderofthe5cardsisunimportant.Hencethenumberofpokerhandsis

Inpoker,fivecardsofthesamesuit,suchas

Page 97: The Magic of Math: Solving for x and Figuring Out Why

iscalledaflush.Howmanyflushesarethere?Tocreateaflush,firstchooseyoursuit, which can be done in 4 ways. (Mentally, I like to commit to a definitechoice,sayspades.)Nowhowmanywayscanyouchoose5cardsofthatsuit?Fromthe13spadesinadeck,5ofthemcanbechosenin ways.Hencethenumberofflushesis

Hence the chance of being dealt a flush in poker is 5148/2,598,960,which isapproximately1in500.Forpokerpurists,youcansubtract4×10=40handsfromthe5148forstraightflushes,whentheflushusesfiveconsecutivecards.

Astraightinpokerconsistsof5cardsofconsecutivevalues,suchasA2345or23456or...or10JQKA,liketheonebelow.

Thereare10different typesofstraights(definedbythelowestcard),andoncewechooseitstype(say34567)theneachofthe5cardscanbeassignedoneof4suits.Hencethenumberofstraightsis

10×45=10,240

which is nearly twice asmany as flushes. So the probability of being dealt astraightisabout1in250.That’sthereasonflushesareworthmorethanstraightsinpoker:theyarehardertoget.

Anevenmorevaluablehand is the fullhouse,consistingof3cardsofonevalueand2cardsofadifferentvalue.Atypicalhandmightlooklikethis:

Page 98: The Magic of Math: Solving for x and Figuring Out Why

Toconstructafullhouse,wefirstneedtochooseavaluetobetripled(13ways),thenavaluetobedoubled(12ways).(Saywe’vedecidedonusingthreequeensandtwo7s.)Thenweneedtoassignsuits.Wecandecidewhichthreequeenstousein waysandwhichtwo7sin ways.Altogetherthenumberoffullhousesis

13×12×4×6=3744

Sotheprobabilityofbeingdealtafullhouseis3744/2,598,960,whichisabout1in700.

Let’scontrastthefullhousewithgettingexactlytwopair.Suchhandshavetwocardsofonevalue,twocardsofadifferentvalue,andanothercardofathirdvalue,like

Manypeoplemistakenlystartcountingthepairedvalueswith13×12,butthisdouble-counts, since first picking queens followed by 7s is the same as firstpicking 7s followed by queens. The correct way to start is (say pickingqueensand7s together), thenchoosinganewvaluefor theunpairedcard(like5),thenassignsuits.Thenumberoftwo-pairhandsis

Page 99: The Magic of Math: Solving for x and Figuring Out Why

whichoccursabout5percentofthetime.Wewon’tgo throughallof the restof thepokerhands indetail,butsee if

youcanverifythefollowing.Thenumberofpokerhandsthatarefourofakind,like ,is

A poker hand like is called three of a kind. The number oftheseis

Thenumberofpokerhandswithexactlyonepair,like ,is

about42percentofallhands.

Aside

So howmany handsmight be classified as junk, containing no pairs, nostraight, and no flush? You could carefully add up the cases above andsubtractfrom ,buthereisadirectanswer:

Thefirsttermcountsthewaystochooseany5differentvalues(preventingtwoormorecardsofthesamevalue)withtheexceptionofthe10waysofpicking five consecutive values like 34567. Then the next term assigns asuittoeachofthesefivedifferentvalues;thereare4choicesforeachvalue,butwehavetothrowawaythe4possibilitiesthattheywereallassignedthesamesuit.Theupshotisthatabout50.1percentofallhandsareworthless

Page 100: The Magic of Math: Solving for x and Figuring Out Why

thanonepair.Butthatmeans49.9percentareworthonepairorbetter.

Here’s a question that has three interesting answers, two of which areactuallycorrect!Howmanyfive-cardhandscontainatleastoneace?Atemptingwronganswerissimply .The(faulty)reasoningisthatyoupickanace4ways,andthentheother4cardscanbechosenfreelyamongtheremaining51cards(includingotheraces).Theproblemwiththisreasoningisthatsomehands(thosewithmore than one ace) get countedmore than once. For instance, thehand would get countedwhenwe first choose (then theother4cards)aswellaswhenwefirstchoosethe (thentheother4cards).Acorrect way to handle this problem is to break the problem into four cases,dependingonthenumberofacesinthehand.Forinstance,thenumberofhandswithexactlyoneaceis (bypickingoneace, thenfournon-aces).Ifwecontinue this way, and count hands with two, three, or four aces, the totalnumberofhandswithatleastoneaceis

Butaquickercalculationcanbedonebyaddressing theoppositequestion.Thenumberofhandswithnoaces issimply .Hence thenumberofhandswithatleastoneaceis

Wenotedearlierthatpokerhandsarerankedaccordingtohowraretheyare.Forexample,sincetherearemorewaystobeasinglepairthantwopair,onepairisworthlessthantwopair.Theorderofpokerhands,fromlowesttohighest,is:

OnepairTwopair

ThreeofakindStraightFlush

FullhouseFourofakind

Page 101: The Magic of Math: Solving for x and Figuring Out Why

Straightflush

A simpleway to remember this is “One, two, three, straight, flush; two-three,four,straight-flush.”(“Two-three”isthefullhouse.)

Nowsupposeweplaypokerwith jokers (cards,notpeople).Herewehave54cardswherethetwojokersarewildandcanbeassignedanyvaluethatgivesyou thebest hand.So, for example, if you endupwith andjoker,youwouldchoosetomakethejokeranacetogiveyourselfthreeaces.Ifyou turn the joker intoaking, thenyourhandwouldbe twopair,which is aninferiorhand.

Whatcardshouldweassignthejokertoachievethebesthand?

But here’s where things get interesting. Under the traditional ordering ofhands,ifyouarepresentedwithhandsliketheoneabovethatcouldbeassignedtwopairorthreeofakind,thenyouwouldcountitasthreeofakindinsteadoftwopair.Buttheconsequenceofthisisthattherewillbemorehandsthatwouldcount as threeof akind thanas twopair, so twopairwouldbecome the rarerhand. But if we try to fix that problem by making the two-pair hand morevaluable, then thesameproblemoccursandwewindupwithmorehands thatwould count as two pair than as three of a kind. The surprising conclusion,discovered in 1996 by mathematician Steve Gadbois, is that when you playpoker with jokers, there is no consistent way to rank the hands in order offrequency.

PatternsinPascal’sTriangleBeholdPascal’striangle:

Page 102: The Magic of Math: Solving for x and Figuring Out Why

Pascal’strianglewithsymbols

In Chapter 1, we saw interesting patterns arise when we put numbers intriangles. The numbers that we’ve just been studying contain their ownbeautiful patterns when viewed in a triangle, called Pascal’s triangle, asdisplayedabove.Usingourformula ,let’sturnthesesymbolsintonumbers and look for patterns (see next page).Wewill explainmost of thesepatternsinthischapter,butfeelfreetoskiptheexplanationsonfirstreadingandjustenjoythepatterns.

Thetoprow(calledrow0)hasjustoneterm,namely .(Remember0!=1.)Everyrowwillbeginandendwith1since

Havealookatrow5.

Row5:15101051

Noticethatthesecondentryis5,andingeneral,thesecondentryofrownisn.Thismakessensebecause ,thenumberofwaystochooseoneobjectfromnobjects,isequalton.Noticealsothateachrowis

Page 103: The Magic of Math: Solving for x and Figuring Out Why

Pascal’strianglewithnumbers

symmetric:itreadsthesamebackwardasitdoesforward.Forexample,inrow5,wehave

Ingeneral,thepatternsaysthat

Aside

This symmetry relationship can be justified twoways. From the formula,wecanalgebraicallyshowthat

Butyoudon’t reallyneed the formula to seewhy it is true.For example,

Page 104: The Magic of Math: Solving for x and Figuring Out Why

whyshould Thenumber countsthewaystochoose3icecreamflavors(from10possibilities)toputinacup.Butthisisthesameaschoosing7flavorstonotputinthecup.

The next pattern that you might notice is that, except for the 1s at thebeginning and end of the row, every number is the sum of the two numbersabove it. This relationship is so striking that we call itPascal’s identity. Forexample,lookatrows9and10inPascal’striangle.

Eachnumberisthesumofthetwonumbersaboveit

Now why should that be? When we see that 120 = 36 + 84, this is astatementaboutthecountingnumbers

To see why this is true, let’s ask the question: If an ice cream store sells 10flavorsoficecream,howmanywayscanyouchoose3differentflavorsoficecream for a cup (where order is not important)?The first answer, aswe havealreadynoted,is .Butthereisanotherwaytoanswerthequestion.Assumingthatoneofthepossibleflavorsisvanilla,howmanyofthecupsdonotcontainvanilla? That would be , since we can choose any 3 flavors from theremaining9flavors.Howmanycupsdocontainvanilla?Ifvanillaisrequiredtobeoneof theflavors, thentherearejust waystochoosetheremainingtwoflavors in the cup. Hence the number of possible cups is . Whichanswer is right?Our logicwas correct both times, so they are both right, andhencethetwoquantitiesareequal.Bythesamelogic(oralgebra,ifyouprefer),itfollowsthatforanynumberkbetween0andn,

Page 105: The Magic of Math: Solving for x and Figuring Out Why

Nowlet’sseewhathappenswhenweaddallofthenumbersineachrowofPascal’striangle,asseenontheoppositepage.

The pattern suggests that the sumof the numbers in each row is always apowerof2.Specificallyrownwilladdupto2n.Whyshouldthatbe?Anotherway to describe the pattern is that the first row sums to 1, and then the sumdoubleswitheachnewrow.ThismakessenseifyouthinkofPascal’s identity,whichwe just proved. For instance,whenwe add the numbers in row 5, andrewritethemintermsofthenumbersinrow4,weget

1+5+10+10+5+1

InPascal’striangle,therowsumsarepowersof2

=1+(1+4)+(4+6)+(6+4)+(4+1)+1=(1+1)+(4+4)+(6+6)+(4+4)+(1+1)

which is literally twice the sum of the numbers in row 4. And by the samereasoning,thisdoublingpatternwillcontinueforever.

Intermsofthebinomialcoefficients,thisidentitysaysthatwhenwesumthenumbersinrown:

which is somewhat surprising, since the individual terms are evaluated withfactorials,andareoftendivisiblebymanydifferentnumbers.Andyetthegrand

Page 106: The Magic of Math: Solving for x and Figuring Out Why

totalhas2asitsonlyprimefactor.Another way to explain this pattern is through counting.We call such an

explanationacombinatorialproof.Toexplainthesumofthenumbersinrow5,let’sgo toan icecreamstore thatoffers5 flavors. (Theargument for rown issimilar.)Howmanywayscanweputdifferent scoopsof icecream inourcupwiththerestrictionthatnoflavorisallowedtoberepeated?Ourcupisallowedtohave0or1or2or3or4or5differentflavors,andtheorderofthescoopsinthe cup is not important. Howmany ways can it have exactly 2 scoops? Aswe’ve seen before, this can be done different ways. Altogether,depending

Howmanywayscanweputdifferentscoopsoficecreaminourcup?

onthenumberofscoopsinthecup,theruleofsumtellsusthatthereare

ways,whichsimplifiesto1+5+10+10+5+1.Ontheotherhand,wecanalsoanswerourquestionwiththeruleofproduct.Insteadofdecidinginadvancehowmanyscoopswillbeinourcup,wecanlookateachflavoranddecide,yesor no, whether it will be in the cup. For instance, we have 2 choices forchocolate(yesorno),then2choicesforvanilla(yesorno),andsoondowntothefifthflavor.(Noticethatifwedecide“no”oneachflavor, thenwehaveanemptycup,whichispermissible.)Hencethenumberofwayswecanmakeourdecisionis

Page 107: The Magic of Math: Solving for x and Figuring Out Why

2×2×2×2×2=25

Sinceourreasoningwascorrectbothtimes,itfollowsthat

aspredicted.

Aside

Asimilarcombinatorialargumentshowsthatifwesumeveryothernumberinrown,wegetatotalof2n–1.Thisisnosurpriseinodd-numberedrowslikerow5,sincethenumbersweareadding,1+10+5,arethesameasthenumbersweareexcluding,5+10+1,sowegethalfofthe2ngrandtotal.Butitalsoworksineven-numberedrowsaswell.Forinstance,inrow4,1+6+1=4+4=23.Ingeneral,foranyrown≥1,wehave

Why?Theleftsidecountsthoseicecreamcupsthathaveanevennumberofscoops(whentherearenpossibleflavorsandallscoopsmustbedifferentflavors). But we can also create such a cup by freely choosing flavors 1throughn−1.Wehave2choicesforthefirstflavor(yesorno),2choicesforthesecondflavor,...,and2choicesforthe(n−1)stflavor.Butthereisjustonechoiceforthelastflavorifwewantthetotalnumberofflavorstobeeven.Hencethenumberofeven-sizedcupsis2n−1.

WhenwewritePascal’s triangle as a right triangle,morepatterns emerge.Thefirstcolumn(column0)consistsofall1s,thesecondcolumn(column1)arethepositiveintegers1,2,3,4,andsoon.Column2,beginning1,3,6,10,15..., should also look familiar. These are the triangular numbers that we saw in

Page 108: The Magic of Math: Solving for x and Figuring Out Why

Chapter1.Ingeneral,thenumbersincolumn2canalsobeexpressedas

andcolumnkconsistsofthenumbers ,andsoon.Nowlookatwhathappenswhenyouaddthefirstfew(ormany)numbersof

anycolumn.For instance, ifweadd thefirst5numbersofcolumn2(seenextpage), we get 1 + 3 + 6 + 10 + 15 = 35, which happens to be the numberdiagonallydownfromit.Inotherwords:

This is an example of thehockey stick identity because the pattern formed inPascal’striangleresemblesahockeystick,withalongcolumnofnumbers,nextto another number jutting out from it. To understandwhy this pattern works,imaginewehaveahockeyteamwith7players,eachwithadifferentnumberontheirjersey:1,2,3,4,5,6,7.How

Pascal’srighttriangledisplaysa“hockeystick”pattern

manywayscanIchoose3oftheseplayersforapracticesession?Sinceorderisnotimportant,thereare waysthiscanbedone.Nowlet’sanswerthatsamequestionbybreaking it intocases.Howmanyof theseways includeplayer7?Equivalently,thisasks:Howmanyhave7asthelargestjerseynumber?Since7

Page 109: The Magic of Math: Solving for x and Figuring Out Why

isincluded,thereare waystopicktheothertwoplayers.Next,howmanyofthesewayshave6asthelargestjerseynumber?Here,6mustbechosen,and7must not be chosen, so there are ways to pick the other two players.Likewise,thereare waysfor5tobethelargestnumber, waysfor4tobethe largestnumber,and way for3 tobe the largestnumber.Since thelargestofthethreenumbersmustbe3,4,5,6,or7,wehavecountedallofthepossibilities,sothethreememberscanbechosenin ways,asdescribedbytheleftsideofthepreviousequation.Moregenerally,thisargumentshowsthat

Let’sapplythisformulatoresolveanimportantproblemthatyouprobablythinkabouteveryyearduringtheholidayseason.Accordingtothepopularsong“TheTwelveDaysofChristmas,”onthefirstdayyourtruelovegivesyou1gift(apartridge).Ontheseconddayyouget3gifts(1partridgeand2turtledoves).Onthethirddayyouget6gifts(1partridge,2turtledoves,3Frenchhens),andso on. The question is:After the 12th day, howmany gifts do you receive intotal?

Page 110: The Magic of Math: Solving for x and Figuring Out Why

Afterthe12thdayofChristmas,howmanygiftsdidmytruelovegivetome?

OnthenthdayofChristmas,thenumberofgiftsyoureceiveis

(Thiscomesfromourhandyformulafortriangularnumbersorfromthehockeystick identity when k = 1.) So on the first day you get gift; on theseconddayyouget gifts,andsoonupthroughthe12thday,whenyoureceive gifts.Applyingthehockeystickidentity,itfollowsthatthetotalnumberofgiftswillbe

Thus,ifyouspreadthesegiftsoutoverthenextyear,youcouldenjoyanewgiftpracticallyeveryday(perhapstakingonedayoffforyourbirthday)!

Let’scelebrateouranswertothelastproblemwithafestivesongIcall“The

Page 111: The Magic of Math: Solving for x and Figuring Out Why

nthDayofChristmas.”

OnthenthdayofChristmas,mytruelovegavetomennovelknick-knacksn−1thingorothern−2etcetera

5(plus10)otherthings!CountingallthegiftsThroughdayn,What’sthetotalsum?It’sprecisely .

NowhereisoneoftheoddestpatternsinPascal’striangle.Ifyoulookatthetriangle,wherewehavecircledeachoftheoddnumbers,youwillseetriangleswithinthetriangle.

OddnumbersinPascal’striangle

Nowlet’stakealongerviewofthetrianglewith16rows,wherewereplaceeachoddnumberwith1andeachevennumberwith0.Notice thatunderneatheachpairof0sandeachpairof1s,youget0.Thisreflectsthefactthatyougetan even total when you add two even numbers together or two odd numbers

Page 112: The Magic of Math: Solving for x and Figuring Out Why

together.

Alongerviewoftheoddnumbers

Wehaveanevenlongerviewofthetriangleonthenextpage,consistingofthefirst256rows,wherewehavereplacedeachoddnumberwithablacksquareandeachevennumberwithawhitesquare.

ThisfigureisanapproximationofthefractalimageknownastheSierpinskitriangle. It’s just one of the many hidden treasures inside Pascal’s triangle.Here’s another surprise. Howmany odd numbers are in each row of Pascal’striangle?Lookingatrows1through8(excludingrow0),wecount2,2,4,2,4,4, 8, 2, and so on.Noobvious pattern jumps out, although it appears that theanswerisalwaysapowerof2.Infact,powersof2playanimportantrolehere.Forexample,noticethattherowswithexactly2oddnumbersarerows1,2,4,and8,whicharepowersof2.For thegeneralpattern,weexploit the fact thatevery

Page 113: The Magic of Math: Solving for x and Figuring Out Why

PascalmeetsSierpinski

wholenumbergreaterthanorequaltozerocanbeobtainedinauniquewaybysummingdistinctpowersof2.Forexample:

1 =12 =23 =2+14 =45 =4+16 =4+27 =4+2+18 =8

Wehave2oddnumbersinrows1,2,4,and8(whicharepowersof2).Wehave4oddnumbersinrows3,5,and6(whicharethesumof2powersof2),andwehave8oddnumbersinrow7(whichisthesumof3powersof2).Hereisthesurprisingandbeautifulrule.Ifnisthesumofpdifferentpowersof2,thenthenumberofoddnumbersinrownis2p.So,forexample,howmanyoddnumbersareinrow83?Since83=64+16+2+1,thesumof4powersof2,thenrow83willhave24=16oddnumbers!

Page 114: The Magic of Math: Solving for x and Figuring Out Why

Aside

We won’t prove the fact here, but in case you’re curious, is oddwhenever

k=64a+16b+2c+d

wherea,b,c,dcanbe0or1.Specifically,kmustbeequaltooneofthesenumbers:

0,1,2,3,16,17,18,19,64,65,66,69,80,81,82,83

Weendthischapterwithonelastpattern.Wehaveseenwhathappenswhenwe add along the rows of Pascal’s triangle (powers of 2) and the columns ofPascal’striangle(hockeystick).Butwhathappenswhenweaddthediagonals?

PascalmeetsFibonacci

Whenweaddthediagonals,asillustratedabove,wegetthefollowingtotals:

1,1,2,3,5,8,13,21,34

Page 115: The Magic of Math: Solving for x and Figuring Out Why

Theseare the fabulousFibonaccinumbers, and theywillbe the subjectofournextchapter.

Page 116: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERFIVE

1,1,2,3,5,8,13,21…TheMagicofFibonacciNumbers

Nature’sNumbersBeholdoneofthemostmagicalsequencesofnumbers,theFibonaccinumbers!

1,1,2,3,5,8,13,21,34,55,89,144,233,...

TheFibonaccisequencestartswithnumbers1and1.Thethirdnumberis1+1(thesumofthetwopreviousnumbers),whichis2.Thefourthnumberis1+2=3,thefifthnumberis2+3=5,andthenumberscontinuetogrowinleapfrogfashion:3+5=8,5+8=13,8+13=21,andsoon.Thesenumbersappearedin the book Liber Abaci in 1202 by Leonardo of Pisa (later nicknamed“Fibonacci”).Liber Abaci, which literally means “The Book of Calculation,”introduced to the Western world the Indo-Arabic numerals and methods ofarithmeticthatwecurrentlyusetoday.

One of the book’s many arithmetic problems involved immortal rabbits.Suppose thatbabyrabbits takeonemonth tomature,andeachpairproducesanewpairofbabyrabbitseverymonththereafterfortherestoftheirnever-endinglives.Thequestionis,ifwestartwithonepairofbabyrabbits,howmanypairsofrabbitswilltherebetwelvemonthslater?

Page 117: The Magic of Math: Solving for x and Figuring Out Why

Theproblemcanbeillustratedthroughpicturesorsymbols.Weletalower-case letter “r” denote a baby pair of rabbits and an upper-case “R” denote anadult pair of rabbits. As we go from one month to the next, every little “r”becomes a big “R,” and each “R” is replaced by “R r.” (That is, little rabbitsbecomebigrabbitsandbigrabbitsproducelittlerabbits.)

The situation canbemodeled as in the following table.We see that in thefirstsixmonths,thenumberofrabbitpairsis,respectively,1,1,2,3,5,and8.

Let’s try to convinceourselves that therewill be13pairsof rabbits in theseventhmonth,withoutexplicitlylistingthepopulation.Howmanyadultrabbitpairswill be alive in the seventhmonth? Since every rabbit thatwas alive inmonth six is now an adult rabbit, then therewill be 8 adult rabbits inmonthseven.

Page 118: The Magic of Math: Solving for x and Figuring Out Why

Howmanybabyrabbitpairswillbealiveintheseventhmonth?That’sequaltothenumberofadultrabbitpairsfromthesixthmonth,namely5,whichis(notcoincidentally)thesameasthetotalpopulationofthefifthmonth.Consequently,thenumberofrabbitpairsintheseventhmonthwillbe8+5=13.

IfwecallthefirsttwoFibonaccinumbersF1=1andF2=1,thendefinethenextFibonacci number as the sumof theprevious twoFibonacci numbers, sothatforn≥3,

Fn=Fn-1+Fn-2

ThenF3=2,F4=3,F5=5,F6=8,andsoon,asinthetablebelow.

Thefirst13Fibonaccinumbers

Consequently, theanswer toFibonacci’s “immortal rabbits”problemwouldbe

Page 119: The Magic of Math: Solving for x and Figuring Out Why

F13=233rabbitpairs(consistingofF12=144adultpairsandF11=89babypairs).

Fibonacci numbers have numerous applications beyond populationdynamics,andtheyappearinnaturesurprisinglyoften.Forexample,thenumberofpetalsonaflowerisoftenaFibonaccinumber,andthenumberofspiralsonasunflower,pineapple,andpineconetendstobeaFibonaccinumberaswell.Butwhat inspires me most about Fibonacci numbers are the beautiful numberpatternsthattheydisplay.

For example, let’s look at what happens when we add the first severalFibonaccinumberstogether:

The numbers on the right side of the equation are not quite Fibonaccinumbers, but they are close. In fact, each of those numbers is just one shy ofbeing Fibonacci. Let’s see why that pattern makes sense. Consider the lastequation, and seewhathappenswhenwe replaceeachFibonaccinumberwiththedifferenceofthenexttwoFibonaccinumbers.Thatis,

1+1+2+3+5+8+13=(2−1)+(3−2)+(5−3)+(8−5)+(13−8)+(21−13)+(34−21)

=34−1

Noticehowthe2from(2−1)iscanceledbythe2from(3−2).Thenthe3

Page 120: The Magic of Math: Solving for x and Figuring Out Why

from(3−2) is canceledby the3 from(5−3).Eventuallyeverythingcancelsexceptforthelargestterm,34,andtheinitial−1.Ingeneral,thisshowsthatsumofthefirstnFibonaccinumbershasasimpleformula:

F1+F2+F3+···+Fn=Fn+2−1

Here’sa relatedquestionwithasimilarlyelegantanswer.Whatdoyougetwhenyousumthefirstneven-positionedFibonaccinumbers?Thatis,canyousimplifythefollowingsum?

F2+F4+F6+···+F2n

Let’slookatsomenumbersfirst:

Wait. These numbers look familiar. In fact, we saw these numbers in ourprevious sums. They are one less than Fibonacci numbers. In fact, we cantransform these numbers into our last problem by using the fact that eachFibonaccinumberisthesumoftwobeforeit,andreplacing,afterthefirstterm,each even-positioned Fibonacci number with the sum of the two previousFibonaccinumbers,asbelow.

The last line follows from the fact that the sum of the first seven Fibonaccinumbersisonelessthantheninth.

In general, if we exploit the fact that F2 = F1 = 1 and replace eachsubsequentFibonaccinumberwiththesumoftwopreviousFibonaccinumbers,weseethatoursumreducestothesumofthefirst2n−1Fibonaccinumbers.

Page 121: The Magic of Math: Solving for x and Figuring Out Why

Let’s see what we get when we add the first n odd-positioned Fibonaccinumbers.

Oddly, the pattern is even clearer. The sum of the first n odd-positionedFibonacci numbers is simply the next Fibonacci number. We can exploit theprevioustrick,asfollows:

Aside

We could also have arrived at the answer in anotherway, usingwhatwehave already shown. If we subtract the first n even-positioned Fibonaccinumbersfromthefirst2nFibonaccinumbers,we’llbeleftwiththefirstnodd-positionedFibonaccinumber:

Page 122: The Magic of Math: Solving for x and Figuring Out Why

CountingonFibonacciWehaveonlyscratchedthesurfaceofthebeautifulnumberpatternssatisfiedbytheFibonaccinumbers.Youmaybetemptedtoguessthatthesenumbersmustbecountingsomethingotherthanpairsofrabbits.Indeed,Fibonaccinumbersariseas the solution tomany counting problems. In 1150 (beforeLeonardo of Pisawroteaboutrabbits),theIndianpoetHemachandraaskedhowmanycadencesoflengthnwerepossibleifacadencecouldcontainshortsyllablesoflengthoneorlong syllables of length two. We state the question in simpler mathematicalterms.

Question:Howmanywayscanwewritethenumbernasasumof1sand2s?Answer:Let’scalltheanswerfnandexaminefnforsomesmallvaluesofn.

Thereisonesumthataddsto1,twosumsthataddto2(1+1and2),and3sumsthataddto3(1+1+1,1+2,2+1).Notethatweareonlyallowedtousethenumbers1and2 inour sums.Also, theorderof thenumbersbeingaddedmatters.So,forexample,1+2isdifferentfrom2+1.Thereare5sumsthataddto4(1+1+1+1,1+1+2,1+2+1,2+1+1,2+2).Thenumbersinourtable seem tosuggest that thenumberswillbeFibonaccinumbers,and indeedthatisthecase.

Let’sseewhy thereare f5=8sums thatadd to thenumber5.Suchasummustbeginwitha1or2.Howmanyofthembeginwith1?Well,afterthe1,wemusthaveasequenceof1sand2sthatsumto4,andweknowtherearef4=5ofthem.Likewise,howmanyofthesumsthataddto5beginwiththenumber2?After the initial 2, the remaining termsmust add to3, and there are f3=3ofthose.Hencethetotalnumberofsequencesthataddto5mustbe5+3=8.Bythesamelogic,thenumberofsequencesthataddto6is13,sincef5=8beginwith1andf4=5beginwith2.Ingeneral,therearefnsequencesthataddton.

Page 123: The Magic of Math: Solving for x and Figuring Out Why

Ofthese,fn−1beginwith1andfn−2beginwith2.Consequently,

fn=fn−1+fn−2

Thus, the numbers fn begin like the Fibonacci numbers and will continue togrowliketheFibonaccinumbers.ThereforetheyaretheFibonaccinumbers,butwithatwist,orperhapsIshouldsayashift.Noticethatf1=1=F2,f2=2=F3,f3=3=F4,andsoon.(Forconvenience,wedefinef0=F1=1andf−1=F0=0.)Ingeneral,wehave,forn≥1,

fn=Fn+1

Once we know what the Fibonacci numbers count, we can exploit thatknowledgetoprovemanyoftheirbeautifulnumberpatterns.RecallthepatternthatwesawattheendofChapter4whenwesummedthediagonalsofPascal’striangle.

Forexample,summingtheeighthdiagonalgaveus

1+7+15+10+1=34=F9

Intermsofthe“choosenumbers,”thissays

Page 124: The Magic of Math: Solving for x and Figuring Out Why

Let’s try to understand this pattern by answering a counting question in twoways.

Question:Howmanysequencesof1sand2saddto8?Answer1:Bydefinition,therearef8=F9suchsequences.Answer2:Let’sbreakthisanswerinto5cases,dependingonthenumberof

2sthatareused.Howmanyuseno2s?There’sjustonewaytodothis,namely11111111—andnotcoincidentally, .

Howmanyuseexactlyone2?Thiscanbedone7ways:2111111,1211111,1121111,1112111,1111211,1111121,1111112.Suchsequenceshave7numbers,andthereare waystochoosethelocationofthe2.

Howmanyuseexactlytwo2s?Atypicalexamplewouldbe221111.Insteadoflistingall15ofthem,notethatanysuchsequencewouldhavetwo2sandfour1s, and therefore six digits altogether.There are ways to choose thelocations of the two 2s. By the same logic, a sequence with exactly three 2swould have to have two 1s and therefore have five digits altogether; suchsequencescouldbecreatedin ways.Andfinally,asequencewithfour2scanonlybecreated way,namely2222.

Comparinganswers1and2givesusthedesiredexplanation.Ingeneral,thesameargumentcanbeappliedtoprovethatwheneverwesumthenthdiagonalofPascal’striangle,wegetaFibonaccinumber.Specifically,foralln≥0,whenwesumthenthdiagonal(untilwefalloffthetriangleafteraboutn/2terms),weget

AnequivalentandmorevisualwaytothinkabouttheFibonaccinumbersisthroughtilings.Forexample,f4=5countsthefivewaystotileastripoflength4usingsquares(oflength1)anddominos(oflength2).Forexample,thesum1+1+2isrepresentedbythetilingsquare-square-domino.

Page 125: The Magic of Math: Solving for x and Figuring Out Why

Thereare5tilingsoflength4,usingsquaresanddominos,illustratingf4=5

We can use tilings to understand another remarkable Fibonacci numberpattern.Let’slookatwhathappenswhenwesquaretheFibonaccinumbers.

ThesquaresofFibonaccinumbers,fromf0tof10

Now,it’snosurprisethatwhenyouaddconsecutiveFibonaccinumbers,youget thenextFibonaccinumber. (That’showthey’recreated,afterall.)Butyouwouldn’t expect anything interesting to happen with the squares. However,checkoutwhathappenswhenweaddconsecutivesquarestogether:

Let’strytoexplainthispatternintermsofcounting.Thelastequationsaysthat

Page 126: The Magic of Math: Solving for x and Figuring Out Why

Whyshouldthatbe?Wecanexplainthisbyaskingasimplecountingquestion.Question:Howmanywayscanyoutileastripoflength10usingsquaresand

dominos?Answer1:Bydefinition, thereare f10such tilings.Here isa typical tiling,

whichrepresentsthesum2+1+1+2+1+2+1.

We say that this tiling is breakable at cells 2, 3, 4, 6, 7, 9, and 10.(Equivalently,thetilingisbreakableeverywhereexceptthemiddleofadomino.Inthisexample,itisunbreakableatcells1,5,and8.)

Answer 2: Let’s break the answer into two cases: those tilings that arebreakableatcell5,andthosetilingsthatarenot.Howmanywayscanwecreatealength-10tilingthatisbreakableatcell5?Suchatilingcanbesplitintotwohalves,wherethelefthalfcanbetiledinf5=8waysandtherighthalfcanalsobetiledinf5=8ways.HencebytheruleofproductinChapter4,wecancreatesuchasumin ways,asillustratedbelow.

Thereare tilingsoflength10thatarebreakableatcell5

Howmany length-10 tilings arenot breakable at cell 5?Such tilingsmustnecessarilyhaveadominocoveringcells5and6,asillustratedbelow.Nowthelefthalfandrighthalfcaneachbe tiled f4=5waysandso thereareunbreakable tilings. Putting these two cases together, it follows that

,asdesired.

Page 127: The Magic of Math: Solving for x and Figuring Out Why

Thereare tilingsoflength10thatarenotbreakableatcell5

Ingeneral,byconsideringwhethera tilingof length2n isbreakable in themiddleornot,wearriveatthebeautifulpattern

Aside

Afterseeingthepreviousidentity,wemighttrytoextendittosimilarcases.Forexample,consider thenumberof tilingsof lengthm+n.Howmanyofthesetilingsarebreakableatcellm?Theleftsidecanbetiledfmwaysandtherightsidecanbetiledfnways,sotherearefmfnsuchtilings.Howmanyarenotbreakableatm?Suchatilingmusthaveadominocoveringcellsmandm+1,andtherestofthetilingcanbetiledfm−1fn−1ways.Altogether,wegetthefollowingusefulidentity.Form,n≥0,

fm+n=fmfn+fm−1fn−1

Time for a new pattern. Let’s see what happens when we add all of thesquaresofFibonaccinumberstogether.

Page 128: The Magic of Math: Solving for x and Figuring Out Why

Wow, this is so cool!The sumof the squares ofFibonacci numbers is theproductofthelasttwo!Butwhyshouldthesumofthesquaresof1,1,2,3,5,and8addto8×13?Onewayto“see”thiswithgeometricfiguresistotakesixsquareswithsidelengths1,1,2,3,5,and8andassemblethemasinthefigurebelow.

Start with a 1-by-1 square, then put the other 1-by-1 square next to it,creatinga1-by-2rectangle.Beneaththatrectangle,putthe2-by-2square,whichcreatesa3-by-2rectangle.Nexttothelongedgeofthatrectangle,placethe3-by-3 square (creating a 3-by-5 rectangle), then place the 5-by-5 squareunderneath that (creatingan8-by-5rectangle).Finally,place the8-by-8squarenext to that, creating one giant 8-by-13 rectangle. Now let’s ask a simplequestion.

Question:Whatistheareaofthegiantrectangle?Answer1:Ontheonehand,theareaoftherectangleisthesumoftheareas

ofthesquaresthatcomposeit.Inotherwords,theareaofthisrectanglemustbe12+12+22+32+52+82.

Answer2:On theotherhand,wehaveabig rectanglewithheight8andabaselengthof5+8=13,hencetheareaofthisrectanglemustbe8×13.

Sincebothanswersarecorrect,theymustgivethesamearea,whichexplainsthelastidentity.Infact,ifyoureadagainhowtherectanglewasconstructed,youseethatitexplainsalloftherelationshipslistedaboutthispattern(like12+12+22+32+52=5×8).Andifyoucontinuethislogic,youwillcreaterectanglesof size13×21, 21×34, and soon, so thepatternwill continue forever.Thegeneralformulasaysthat

Page 129: The Magic of Math: Solving for x and Figuring Out Why

Nowlet’sseewhathappenswhenwemultiplyFibonaccineighborstogether.For example, theneighborsof5 are3 and8, and their product is 3×8=24,whichisonelessthan52.Theneighborsof8are5and13,andtheirproductis5×13=65,whichisjustonemorethan82.Examiningthetablebelow,it’shardto resist the conclusion that the product of the neighbors is always one awayfromthesquareoftheoriginalFibonaccinumber.Inotherwords,

TheproductoftheneighborsofaFibonaccinumberisoneawayfromitssquare

Using a proof technique (called induction) that we will learn in the nextchapter,itcanbeprovedthatforn≥1,

Let’spushthispatternevenfurtherbylookingatdistantneighbors.Lookatthe Fibonacci numberF5 = 5.We saw that when we multiply its immediate

neighbors,weget3×8=24,which isoneawayfrom52.But thesame thinghappenswhenwemultiplytheFibonaccinumbersthataretwoawayfromit:2×13=26,which isalsooneawayfrom52.Howabout theneighbors thatare3away,4away,or5away?Theirproductsare1×21=21,1×34=34,and0×55=0.Howfarawayarethesenumbersfrom25?Theyare4away,9away,and25away,whichareallperfectsquares.Butthey’renotjustanyperfectsquares;theyaresquaresofFibonaccinumbers!Seethetablebelowformoreevidenceofthispattern.Thegeneralpatternis:

Page 130: The Magic of Math: Solving for x and Figuring Out Why

TheproductofdistantneighborsofaFibonaccinumberisalwaysclosetoitssquare.TheirdistanceapartisalwaysthesquareofaFibonaccinumber.

MoreFibonacciPatternsIn Pascal’s triangle, we saw that the even and odd numbers displayed astartlingly complex pattern. With Fibonacci numbers, the situation is muchsimpler.WhichFibonaccinumbersareeven?

1,1,2,3,5,8,13,21,34,55,89,144...

TheevennumbersareF3=2,F6=8,F9=34,F12=144,andsoon.(Inthissection, we switch back to the capital-F Fibonacci numbers, since they willproduceprettierpatterns.)Theevennumbersfirstappearinpositions3,6,9,12,which suggests that they occur precisely every 3 terms.We can prove this bynoticingthatthepatternbegins

odd,odd,even

andisthenforcedtorepeatitself,

odd,odd,even,odd,odd,even,odd,odd,even...

sinceafterany“odd,odd,even”block, thenextblockmustbeginwith“odd+even=odd,”then“even+odd=odd,”followedby“odd+odd=even,”sothepatterngoesonforever.

In the language of congruences from Chapter 3, every even number iscongruentto0(mod2),everyoddnumberiscongruentto1(mod2),and1+1≡

Page 131: The Magic of Math: Solving for x and Figuring Out Why

0(mod2).Thusthemod2versionoftheFibonaccinumberslookslike

1,1,0,1,1,0,1,1,0,1,1,0...

Whataboutmultiplesof3?Thefirstmultiplesof3areF4=3,F8=21,F12=144, so it’s tempting tobelieve that themultiplesof3occurat every fourthFibonaccinumber.Toverifythis,let’sreducetheFibonaccinumbersto0,1,or2andusemod3arithmetic,where

1+2≡0and2+2≡1 (mod3)

Themod3versionoftheFibonaccinumbersis

1,1,2,0,2,2,1,0, 1,1,2,0,2,2,1,0, 1,1...

Aftereightterms,wearebacktothebeginningwith1and1,sothepatternwillrepeatinblocksofsizeeight,with0ineveryfourthposition.ThuseveryfourthFibonaccinumberisamultipleof3,andviceversa.Usingarithmeticmod5or8or13,youcanverifythat

EveryfifthFibonaccinumberisamultipleof5EverysixthFibonaccinumberisamultipleof8

EveryseventhFibonaccinumberisamultipleof13

andthepatterncontinues.What about consecutive Fibonacci numbers? Do they have anything in

common?What’s interestinghere is thatwe can show that, inone sense, theyhave nothing in common. We say that the consecutive pairs of Fibonaccinumbers

(1,1),(1,2),(2,3),(3,5),(5,8),(8,13),(13,21),(21,34),...

are relatively prime, which means that there is no number bigger than 1 thatdividesbothnumbers.Forexample,ifwelookatthelastpair,weseethat21isdivisibleby1,3,7,and21.Thedivisorsof34are1,2,17,and34.Thus21and34havenocommondivisors,exceptfor1.Howcanwebesurethatthispatternwillcontinueforever?Howdoweknowthatthenextpair(34,55)isguaranteedto be relatively prime? We can prove this without finding the factors of 55.

Page 132: The Magic of Math: Solving for x and Figuring Out Why

Suppose,tothecontrary,thattherewasanumberd>1thatdividedboth34and55.But then suchanumberwouldhave todivide theirdifference55−34=21(sinceif55and34aremultiplesofdthensoistheirdifference).However,thisisimpossible, sincewe alreadyknow that there is nonumberd> 1 that dividesboth21and34.RepeatingthisargumentguaranteesthatallconsecutivepairsofFibonaccinumberswillberelativelyprime.

AndnowformyfavoriteFibonaccifact!Thegreatestcommondivisoroftwonumbersisthelargestnumberthatdividesbothofthenumbers.Forexample,thegreatestcommondivisorof20and90is10,denoted

gcd(20,90)=10

Whatdoyouthinkisthegreatestcommondivisorofthe20thFibonaccinumberandthe90thFibonaccinumber?Theanswerisabsolutelypoetic.Theansweris55, which is also a Fibonacci number. Moreover, it happens to be the 10thFibonaccinumber!Inequations,

gcd(F20,F90)=F10

Andingeneral,wehaveforintegersmandn,

gcd(Fm,Fn)=Fgcd(m,n)

In otherwords, “the gcd of the Fs is the F of the gcd”!Wewon’t prove thisbeautifulfacthere,butIcouldn’tresistshowingittoyou.

Sometimesapatterncanbedeceptive.Forinstance,whichoftheFibonaccinumbersareprimenumbers?(Aswe’lldiscussinthenextchapter,aprimeisanumberbiggerthan1thatisdivisibleonlyby1anditself.)Numbersbiggerthan1thatarenotprimearecalledcompositesincetheycanbedecomposedintotheproductofsmallernumbers.Thefirstfewprimenumbersare

2,3,5,7,11,13,17,19...

NowlookattheFibonaccinumbersthatareinprimelocations:

F2=1,F3=2,F5=5,F7=13,F11=89,F13=233,F17=1597

Thenumbers2,5,13,89,233,and1597areprime.Thepatternsuggeststhatifp

Page 133: The Magic of Math: Solving for x and Figuring Out Why

>2isprime,thensoisFp,butthepatternfailswiththenextdatapoint.F19=4181isnotprime,since4181=37×113.However, itis truethateveryprimeFibonacci number bigger than 3 will occur in a prime position. This followsfrom our earlier pattern. F14 must be composite, since every 7th FibonaccinumberisamultipleofF7=13(andindeed,F14=377=13×29).

In fact, Fibonacci primes seem to be pretty rare. As of this writing, therehave only been 33 confirmed discoveries of prime Fibonacci numbers, thelargestonebeingF81839,anditisstillanopenquestioninmathematicswhetherthereisaninfinitenumberofFibonacciprimes.

WeinterruptthisseriousdiscussiontobringyouafunlittlemagictrickbasedonFibonaccinumbers.

AFibonaccimagictrick:Startwithanytwopositivenumbersinrows1and2.FillouttherestofthetableinFibonaccifashion(3+7=10,7+10=17,andsoon),thendividerow10byrow9.Theansweris

guaranteedtobeginwith1.61.

On the table above, write any numbers between 1 and 10 in the first andsecond row.Add those numbers together and put the total in row 3. Add thenumbersinrow2androw3,andputtheirtotalinrow4.Continuefillingoutthetable inFibonacci fashion (row3+ row4= row5,andsoon)untilyouhavenumbersinall10rows.Nowdividethenumberinrow10bythenumberinrow9andreadoffthefirstthreedigits,includingthedecimalpoint.Inthisexample,we see so its first three digits are 1.61. Believe it or not,startingwithany twopositivenumbers in rows1and2(theydon’thave tobewhole numbers or be between 1 and 10), the ratio of row 10 and row 9 isguaranteedtobe1.61.Tryanexampleortwoyourself.

Page 134: The Magic of Math: Solving for x and Figuring Out Why

Toseewhythistrickworks, let’s letxandydenote thenumbers inrows1and 2, respectively.Then by theFibonacci rules, row3must be x +y, row 4mustbey+(x+y)=x+2y,andsoon,asillustratedinthetablebelow.

Thequestionamountstolookingattheratiooftheentriesinrows10and9:

Sowhy should that ratio alwaysbeginwith1.61?The answer is basedon theidea of adding fractions incorrectly. Suppose you have two fractions andwherebanddarepositive.Whathappenswhenyouaddthenumeratorstogetherand add the denominators together? Believe it or not, the resulting number,called the mediant, will always be somewhere in between the original twonumbers.Thatis,foranydistinctfractionsa/b<c/d,wherebanddarepositive,wehave

For example, starting with the fractions 1/3 and 1/2, their mediant is 2/5,whichliesbetweenthem:1/3<2/5<1/2.

Aside

Page 135: The Magic of Math: Solving for x and Figuring Out Why

Whydoes themediant lie between theoriginal numbers? Ifwe startwithfractions withbandd positive, then itmustbe true thatad<bc.Addingabtobothsidesofthisgivesusab+ad<ab+bcor,equivalently,a(b+d)<(a+c)b,whichimplies .Bysimilarlogic,wecanalsoshowthat .

Nownoticethatforx,y>0,

Hencetheirmediantmustlieinbetweenthem.Inotherwords,

Thustheratioofrow10androw9mustbeginwiththedigits1.61,aspredicted!

Aside

Before revealing the 1.61 prediction, you can impress your audience byinstantlyaddingallthenumbersinyourtable.Forinstance,inourexamplestartingwith3and7,aquickglanceat the table immediately reveals thatthetotalwillbe781.Howdoyouknowthat?Algebragivesustheanswer.Ifyousumthevaluesinthesecondtable,yougetagrandtotalof55x+88y.Howisthathelpful?Well,thatjusthappenstobe11(5x+8y)=11×row7.So if you look at the number in row 7 (that’s 71 in our example) andmultiply it by 11 (perhaps using the trick we learned in Chapter 1 formultiplyingby11s),yougetagrandtotalof781.

Whatisthesignificanceofthenumber1.61?Ifyouweretoextendthetable

Page 136: The Magic of Math: Solving for x and Figuring Out Why

further and further, you would find that the ratio of consecutive terms willgraduallygetcloserandclosertothegoldenratio

Mathematicianssometimesdenote thisnumberwith theGreek letterφ, spelledphi,andpronounced“phie”(rhymeswithpie)or“fee”asin“phi-bonacci.”

Aside

Using algebra, we can prove that the ratio of consecutive Fibonaccinumbersgetscloserandclosertog.SupposethatFn+1/Fngetscloserandcloser to some ratiorasn gets larger and larger.Butby thedefinitionofFibonaccinumbers,Fn+1=Fn+Fn−1,so

Nowasngetslargerandlarger,theleftsideapproachesrandtherightsideapproaches .Thus,

Whenwemultiplybothsidesofthisequationbyr,weget

r2=r+1

In other words, r2 − r − 1 = 0, and by the quadratic formula, the onlypositivesolutionis ,whichisg.

There’s an intriguing formula for the nth Fibonacci number that uses g,calledBinet’sformula.Itsaysthat

Page 137: The Magic of Math: Solving for x and Figuring Out Why

Ifinditamazingandamusingthatthisformula,withallofthe termsrunningaround,produceswholenumbers!

WecansimplifyBinet’sformulasomewhat,sincethequantity

isbetween−1and0,andwhenweraiseit tohigherandhigherpowers,itgetscloser and closer to 0. In fact, it can be shown that for any n ≥ 0, you cancalculateFnbytaking androundingittothenearestinteger.Goaheadandtakeoutyourcalculatorandtrythis.Ifyouapproximategwith1.618,thenraise1.618tothe10thpower,youget122.966...(whichissuspiciouslycloseto123).Thendividethatnumberby ,andyouget54.992.RoundingthisnumbertellsusthatF10=55,whichwealreadyknew.Ifwetakeg20weget15126.99993,andifwedivideitby weget6765.00003,soF20=6765.

Usingourcalculatortocompute tellsusthatF100isabout3.54×1020.

In the calculations we just did, it seemed that g10 and g20 were alsopractically whole numbers. What’s going on there? Behold the Lucas(pronounced“loo-kah”)numbers,

1,3,4,7,11,18,29,47,76,123,199,322,521...

named in honor of French mathematician Édouard Lucas (1842–1891) whodiscoveredmanybeautifulpropertiesofthesenumbersandFibonaccinumbers,including the greatest common divisor propertywe saw earlier. Indeed, Lucaswas the first person to name the sequence 1, 1, 2, 3, 5, 8 . . . the Fibonaccinumbers.TheLucasnumbers satisfy their own (somewhat simpler) versionofBinet’sformula,namely

Putanotherway,forn≥1,Lnistheintegerclosesttogn.(Thisisconsistentwith

Page 138: The Magic of Math: Solving for x and Figuring Out Why

whatwesawearliersinceg10≈123=L10.)WecanseemoreconnectionswithFibonacciandLucasnumbersinthetablebelow.

Fibonaccinumbers,Lucasnumbers,andsomeoftheirinteractions

It’shardtomisssomeofthepatterns.Forexample,whenweaddFibonaccineighbors,wegetLucasnumbers:

Fn−1+Fn+1=Ln

andwhenweaddLucasneighborsweget5timesthecorrespondingFibonaccinumber,

Ln−1+Ln+1=5Fn

WhenwemultiplycorrespondingFibonacciandLucasnumberstogether,wegetanotherFibonaccinumber!

FnLn=F2n

Aside

Let’sprovethislastrelationshipusingtheBinetformulasandalittlebitofalgebra(specifically (x −y)(x +y)=x2−y2).Letting , theBinetformulasforFibonacciandLucasnumberscanbestatedas

Page 139: The Magic of Math: Solving for x and Figuring Out Why

Whenwemultiplytheseexpressionstogether,weget

So where does the name “golden ratio” come from? It comes from thegolden rectangle below, where the ratio of the long side to the short side isexactlyg=1.61803....

Thegoldenrectangleproducesasmallerrectanglethatalsohasgoldenproportions

If we label the short side as 1 unit and remove a 1-by-1 square from therectangle,thentheresultingrectanglehasdimensions1-by-(g−1)andtheratioofitslongsidetoshortsideis

Thusthesmallerrectanglehasthesameproportionsastheoriginalrectangle.Bytheway, g is the only number that has this nice property, since the equation

implies thatg2 − g − 1 = 0, and by the quadratic formula, the onlypositivenumberthatsatisfiesthisis .

Becauseof thisproperty, thegolden rectangle is consideredby some tobethemost aestheticallybeautiful rectangle, and it hasbeenuseddeliberatelybyvarious artists, architects, and photographers in their work. Luca Pacioli, a

Page 140: The Magic of Math: Solving for x and Figuring Out Why

longtimefriendandcollaboratorofLeonardodaVinci,gavethegoldenrectanglethename“thedivineproportion.”

TheFibonaccinumbersandthegoldenratiohaveinspiredmanyartists,architects,andphotographers.(PhotocourtesyofNatalyaSt.Clair)

Because there are somanymarvelousmathematical properties satisfied bythegoldenratio,thereissometimesatendencytoseeiteveninplaceswhereitdoesn’texist.Forexample,inthebookTheDaVinciCode,authorDanBrownasserts that thenumber1.618appearseverywhere,and that thehumanbody ispracticallyatestamenttothatnumber.Forinstance,itisclaimedthattheratioofaperson’sheighttotheheightofhisorherbellybuttonisalways1.618.Now,Ipersonally have not conducted this experiment, but according to theCollegeMathematics Journal article “Misconceptions About the Golden Ratio,” byGeorge Markowski, this is simply not true. But to some people, anytime anumber appears to be close to 1.6, they assume itmust be the golden ratio atwork.

I have often said thatmany of the number patterns satisfied by Fibonaccinumbers are pure poetry in motion. Well, here’s an example of where theFibonacci numbers actually arise in poetry.Most limerickshave the followingmeter.(Youmightcallita“dum”limerick!)

Page 141: The Magic of Math: Solving for x and Figuring Out Why

ThepoetryofFibonaccinumbers

If you count the syllables in each row, we see Fibonacci numberseverywhere!Inspiredbythis,IdecidedtowriteaFibonaccilimerickofmyown.

IthinkFibonacciisfun.Itstartswitha1anda1.Then2,3,5,8.Butdon’tstopthere,mate.Thefunhasjustbarelybegun!

Page 142: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERSIX

1+2+3=1×2×3=6TheMagicofProofs

TheValueofProofsOne of the great joys of doing mathematics, and indeed what separatesmathematicsfromallothersciences,istheabilitytoprovethingstruebeyondashadow of a doubt. In other sciences, we accept certain laws because theyconformtotherealworld,butthoselawscanbecontradictedormodifiedifnewevidencepresentsitself.Butinmathematics,ifastatementisprovedtobetrue,thenitistrueforever.Forexample,itwasprovedbyEuclidovertwothousandyearsagothatthereareinfinitelymanyprimenumbers,andthereisnothingthatwecansayordothatwillevercontradictthetruthofthatstatement.Technologycomes and goes, but a theorem is forever. As the great mathematician G. H.Hardysaid,“Amathematician, likeapainterorpoet, isamakerofpatterns. Ifhis patterns aremore permanent than theirs, it is because they aremadewithideas.”Tome,itoftenseemslikethebestroutetoacademicimmortalitywouldbetoproveanewmathematicaltheorem.

Not only canmathematics prove thingswith absolute certainty, it can alsoprovethatsomethingsareimpossible.Sometimespeoplesay,“Youcan’tproveanegative,”whichIsupposemeansthatyoucan’tprovethattherearenopurple

Page 143: The Magic of Math: Solving for x and Figuring Out Why

cows, since onemight show up someday.But inmathematics, you can provenegatives.Forexample,nomatterhowhardyou try,youwillneverbeable tofindtwoevennumbersthatadduptoanoddnumbernorfindaprimenumberthatislargerthanallotherprimes.Proofscanbealittlescarythefirst(orsecondorthird)timethatyouencounterthem,andtheyaredefinitelyanacquiredtaste.Butonceyougetthehangofthem,proofscanbequitefuntoreadandwrite.Agoodproofislikeawell-toldjokeorstory—itleavesyoufeelingverysatisfiedattheend.

Let me tell you about one of my first experiences of proving somethingimpossible.When I was a kid, I loved games and puzzles. One day, a friendchallengedmewithapuzzleaboutagame,andsoofcourseIwasinterested.Heshowedme an empty 8-by-8 checkerboard and brought out 32 regular 1-by-2dominos.Heasked,“Canyoucoverthecheckerboardusingall32dominos?”Isaid,“Ofcourse,justlay4dominosacrosseachrow,likethis.”

Coveringan8-by-8checkerboardwithdominos

“Verygood,”hesaid.“Nowsuppose I remove thesquares fromthe lower-rightandupper-leftcorners.”HeplacedacoinonthosetwosquaressoIcouldn’tusethem.Nowcanyoucovertheremaining62squaresusing31dominos?”

Page 144: The Magic of Math: Solving for x and Figuring Out Why

Canthecheckerboardbecoveredwithdominoswhentwooppositecornersareremoved?

“Probably,” I said.Butnomatterhowhard I tried, Iwasunable todo it. Iwasstartingtothinkthatthetaskwasimpossible.

“Ifyouthinkit’simpossible,canyouprovethatit’simpossible?”myfriendasked.ButhowcouldIprovethatitwasimpossiblewithoutexhaustivelygoingthroughthezillionsofpossiblefailedattempts?Hethensuggested,“Lookatthecolorsonthecheckerboard.”

Thecolors?Whatdidthathavetodowithanything?ButthenIsawit.Sincebothoftheremovedcornersquareswerelight-colored,thentheremainingboardconsistedof32darksquaresandjust30lightsquares.Andsinceeverydominocoversexactlyonelightsquareandonedarksquare,itwouldbeimpossiblefor31dominostotilesuchaboard.Cool!

Aside

Ifyoulikedthelastproof,youwillenjoythisoneaswell.ThevideogameTetrisusessevenpiecesofdifferentshapes,sometimesgiventhenamesI,J,L,O,Z,T,andS.

Page 145: The Magic of Math: Solving for x and Figuring Out Why

Canthese7piecesbearrangedtoforma4-by-7rectangle?

Eachpieceoccupiesexactlyfoursquares,soitisnaturaltowonderwhetheritwouldbepossibletoarrangetheminsuchawaythattheyforma4-by-7rectangle,whereweareallowedtofliporrotatethetiles.Thisturnsouttobean impossiblechallenge.Howdoyouprove that it’s impossible?Colorthe rectangle with fourteen light squares and fourteen dark squares, asshown.

Notice that,with the exception of the T tile, every piecemust cover twolightsquaresandtwodarksquares,nomatterwhereitislocated.ButtheTtilemustcoverthreesquaresofonecolorandonesquareoftheothercolor.Consequently, no matter where the other six tiles are located, they mustcoverexactlytwelvelightsquaresandtwelvedarksquares.Thisleavestwolight squares and two dark squares to be covered by the T tile, which isimpossible.

So ifwe have amathematical statement thatwe think is true, how doweactually go about convincing ourselves? Typically, we start by describing themathematicalobjectsthatweareworkingwith,likethecollectionofintegers

...,−2,−1,0,1,2,3,...

Page 146: The Magic of Math: Solving for x and Figuring Out Why

consistingofallwholenumbers:positivenumbers,negativenumbers,andzero.Once we have described our objects, we make assumptions about these

objects that we consider to be self-evident, like “The sum or product of twointegers isalwaysan integer.” (In thenextchapter,ongeometry,we’ll assumestatements like“Forany twopoints there isa line thatgoes through those twopoints.”) These self-evident statements are called axioms. And from theseaxioms,andalittlelogicandalgebra,wecanoftenderiveothertruestatements(calledtheorems)thataresometimesfarfromobvious.Inthischapter,youwilllearnthebasictoolsofprovingmathematicalstatements.

Let’sstartbyprovingsometheoremsthatareeasytobelieve.Thefirsttimewe hear a statement like “The sum of two even numbers is even” or “Theproduct of two odd numbers is odd,” ourmind typically checks the statementwith a few examples, then concludes that it’s probably true or that it makessense.Youmighteventhinkthat thestatement issoself-evidentthatwecouldmake it an axiom. But we don’t need to do that, since we can prove thisstatement using the axiomswe already know.To prove something about evenandoddnumbers,weneedtobeclearaboutwhatoddandevenmean.

Anevennumberisamultipleof2.Toexpressthisalgebraically,wesaynisevenifn=2kwherekisaninteger.Is0anevennumber?Yes,since0=2×0.Wearenowreadytoprovethatthesumoftwoevennumbersiseven.

Theorem:Ifmandnareevennumbers,thenm+nisalsoanevennumber.This isanexampleofan“if-then” theorem.Toprovesuchastatement,we

typicallyassumethe“if”partand,throughamixtureoflogicandalgebra,showthatthe“then”partfollowsfromourassumptions.Hereweassumethatmandnareevenandwanttoconcludethatm+nisalsoeven.

Proof:Supposemandnareevennumbers.Thus,m=2jandn=2kwherejandkareintegers.Butthen

m+n=2j+2k=2(j+k)

andsincej+kisaninteger,m+nisalsoamultipleof2,som+nmustbeeven.

Noticethattheproofreliedontheaxiomthatthesumoftwointegers(here,j+k)mustalsobeaninteger.Asyouprovemorecomplicatedstatements,youaremore likely to rely on previously proved theorems than the basic axioms.Mathematiciansoftendenotetheendofaproofwithadesignationlike ororQ.E.Dontherightmarginofthelastlineoftheproof,asseenabove.Q.E.D.is the abbreviation for the Latin phrase “quod erat demonstrandum,”meaning

Page 147: The Magic of Math: Solving for x and Figuring Out Why

“thatwhichwastobedemonstrated.”(It’salsotheabbreviationfortheEnglishphrase“quiteeasilydone,” ifyouprefer.) If I think thataproof isparticularlyelegant,Iwillenditwithasmileylike

.After proving an if-then theorem, mathematicians can’t resist wondering

aboutthetruthoftheconversestatement,obtainedbyreversingthe“if”partandthe “then” part. Here, the converse statement would be “Ifm + n is an evennumber,thenmandnareevennumbers.”It’seasytoseethat thisstatement isfalse, simply by providing a counterexample. For this statement, thecounterexampleisliterallyaseasyas

1+1=2

sincethisexampleshowsthatit’spossibletohaveanevensumevenwhenbothnumbersarenoteven.

Ournexttheoremisaboutoddnumbers.Anoddnumberisanumberthatisnot amultiple of 2.Consequently,whenyoudivide anoddnumberby2, youalwaysgetaremainderof1.Algebraically,nisoddifn=2k+1,wherekisaninteger. This allows us to prove, by simple algebra, that the product of oddnumbersisodd.

Theorem:Ifmandnareodd,thenmnisodd.Proof:Supposemandnareoddnumbers.Thenm=2j+1andn=2k+1

forsomeintegersjandk.Thus,accordingtoFOIL,

mn=(2j+1)(2k+1)=4jk+2j+2k+1=2(2jk+j+k)+1

andsince2jk+j+kisaninteger,thismeansthatthenumbermnisoftheform“twiceaninteger+1.”Hencemnisodd.

Whatabout theconversestatement:“Ifmn isodd, thenmandn are odd”?Thisstatementisalsotrue,andwecanproveitusingaproofbycontradiction.Ina proof by contradiction, we show that rejecting the conclusion (here, theconclusionisthatmandnareodd)leadstoaproblem.Inparticular,ifwerejecttheconclusion,therewouldalsobeaproblemwithourassumptions,sologicallytheconclusionmustbetrue.

Theorem:Ifmnisodd,thenmandnareodd.Proof: Suppose, to the contrary, thatm orn (or both)were even. It really

doesn’tmatterwhichoneiseven,solet’ssaythatmisevenandthereforem=2j

Page 148: The Magic of Math: Solving for x and Figuring Out Why

for some integer j. Then the productmn = 2jn is also even, contradicting ourinitialassumptionthatmnisodd.

Whenastatementanditsconverseareboth true,mathematiciansoftencallthisan“ifandonlyiftheorem.”Wehavejustshownthefollowing:

Theorem:mandnareoddifandonlyifmnisodd.

RationalandIrrationalNumbersThetheoremsjustpresentedwereprobablynotsurprisingtoyouandtheirproofswere pretty straightforward. The fun beginswhenwe prove theorems that areless intuitive. So far,we havemostly been dealingwith integers, but now it’stimetograduate tofractions.Therationalnumbersare thosenumbers thatcanbeexpressedasa fraction.Tobemoreprecise,wesayr is rational ifr =a/b,whereaandbareintegers(andb≠0).Rationalnumbersinclude,forexample,23/58, −22/7, and 42 (which equals 42/1). Numbers that are not rational arecalled irrational. (You may have heard that the number π = 3.14159 . . . isirrational,andwewillhavemoretosayaboutthatinChapter8.)

Forthenext theorem,itmaybehelpful torecallhowtoaddfractions.It iseasiesttoaddfractionswhentheyhaveacommondenominator.Forexample,

Otherwise,toaddthefractions,werewritethemtohavethesamedenominators.Forexample,

Ingeneral,wecanaddanytwofractionsa/bandc/dbygivingthemacommondenominator,asfollows:

Wearenowreadytoproveasimplefactaboutrationalnumbers.Theorem:Theaverageoftworationalnumbersisalsorational.

Page 149: The Magic of Math: Solving for x and Figuring Out Why

Proof:Letxandybe rationalnumbers.Then thereexist integersa,b,c,dwherex=a/bandy=c/d.Noticexandyhaveaverage

andthataverageisafractionwherethenumeratoranddenominatorareintegers.Consequently,theaverageofxandyisrational.

Let’sthinkaboutwhatthistheoremissaying.Itsaysthatforanytworationalnumbers, even if they are really, really close together, we can always findanotherrationalnumberinbetweenthem.Youmightbetemptedtoconcludethatall numbers are rational (as the ancient Greeks believed for a while). But,surprisingly, that’s not the case. Let’s consider the number , which hasdecimalexpansion1.4142 . . . .Now, therearemanyways toapproximatewithafraction.Forexample, isapproximately10/7or1414/1000,butneitherof these fractions has a square that is exactly 2. But maybe we just haven’tlookedhardenough?The following theoremsays that sucha searchwouldbefutile.Theproof,asisusuallythecasefortheoremsaboutirrationalnumbers,isbycontradiction.Intheproofbelow,wewillexploitthefactthateveryfractioncanbereduceduntilitisinlowestterms,wherethenumeratoranddenominatorsharenocommondivisorsbiggerthan1.

Theorem: isirrational.Proof: Suppose, to the contrary, that is rational.Then theremust exist

positiveintegersaandbforwhich

wherea/bisafractioninlowestterms.Ifwesquarebothsidesofthisequation,wehave

2=a2/b2

orequivalently,

a2=2b2

Butthisimpliesthata2mustbeaneveninteger.Andifa2iseven,thenamustalsobeeven(sincewepreviouslyshowedthatifawereodd,thenatimesitself

Page 150: The Magic of Math: Solving for x and Figuring Out Why

wouldbeodd).Thusa = 2k, for some integerk. Substituting that informationintotheequationabovetellsusthat

(2k)2=2b2

So

4k2=2b2

whichmeansthat

b2=2k2

andthereforeb2isanevennumber.Andsinceb2iseven,thenbmustbeeventoo.Butwaitasecond!We’ve justshownthataandb arebotheven,and thiscontradictstheassumptionthata/bisinlowestterms.Hencetheassumptionthat

isrationalleadstotrouble,soweareforcedtoconcludethat isirrational.

I really love thisproof (asevidencedby the smiley) since itprovesaverysurprisingresultthroughthepowerofpurelogic.AswewillseeinChapter12,irrationalnumbersarehardlyrare.Infact,inaveryrealsense,virtuallyallrealnumbers are irrational, even thoughwemostlyworkwith rational numbers inourdailylives.

Here is a fun corollary to the previous theorem. (Acorollary is a theoremthatcomesasaconsequenceofanearliertheorem.)Ittakesadvantageofthelawofexponentiation,whichsaysthatforanypositivenumbersa,b,c,

Forexample,thissaysthat ,whichmakessense,since

Corollary:Thereexistirrationalnumbersaandbsuchthatabisrational.It’s pretty cool thatwe can prove this theorem right now, even thoughwe

currently knowonly one irrational number, namely .We call the following

Page 151: The Magic of Math: Solving for x and Figuring Out Why

proofanexistenceproof,sinceitwillshowyouthatsuchvaluesofaandbexist,withouttellingyouwhataandbactuallyare.

Proof:Weknowthat isirrational,soconsiderthenumber .Isthisnumberrational?Iftheanswerisyes,thentheproofisdone,bylettingand . If theanswer isno, thenwenowhaveanewirrationalnumber toplaywith,namely .Soifwelet and ,then,usingthelawofexponentiation,weget

whichisrational.Thus,regardlessofwhether isrationalorirrational,we

canfindaandbsuchthatabisrational.

Existenceproofs like theoneaboveareoftenclever,butsometimesa littleunsatisfying, since they might not tell you all the information that you areseeking. (By the way, if you are curious, the number is irrational, butthat’sbeyondthescopeofthischapter.)

Moresatisfyingareconstructiveproofs,whichshowyouexactlyhowtofindtheinformationyouwant.Forexample,onecanshowthateveryrationalnumbera/bmusteitherterminateorrepeat(sinceinthelongdivisionprocess,eventuallyb must divide a number that it has previously divided). But is the reversestatementtrue?Certainlyaterminatingdecimalmustbearationalnumber.Forexample, 0.12358 = 12,358/100,000. But what about repeating decimals? Forexample,must thenumber0.123123123 . . .necessarilybea rationalnumber?Theanswerisyes,andhereisacleverwaytofindexactlywhatrationalnumberitis.Let’sgiveourmysterynumberaname,likew(asinwaltz),sothat

w=0.123123123...

Multiplyingbothsidesby1000givesus

1000w=123.123123123...

Subtractingthefirstequationfromthesecond,weget

999w=123

Page 152: The Magic of Math: Solving for x and Figuring Out Why

andtherefore

Let’strythiswithanotherrepeatingdecimal,wherewedon’tstartrepeatingfromtheveryfirstdigit.Whatfractionisrepresentedbythedecimalexpansion0.83333...?Herewelet

x=0.83333...

Therefore

100x=83.3333...

and

10x=8.3333...

When we subtract 10x from 100x everything after the decimal point cancels,leavinguswith

90x=(83.3333...)−(8.3333...)=75

Therefore

Usingthisprocedure,wecanconstructivelyprovethatanumberisrationalifand only if its decimal expansion is either terminating or repeating. If thenumberhasaninfinitedecimalexpansionthatdoesn’trepeat,like

v=.123456789101112131415...

thenthatnumberisirrational.

ProofsbyInduction

Page 153: The Magic of Math: Solving for x and Figuring Out Why

Let’s go back to proving theorems about positive integers. InChapter1, afterobservingthat

wesuspected,andlaterproved,thatthesumofthefirstnoddnumbersisn2.Weaccomplishedthisbyaclevercombinatorialproofwherewecountedthesquaresofacheckerboard in twodifferentways.But let’s tryadifferentapproach thatdoesn’trequireasmuchcleverness.SupposeItoldyou,oryouacceptedonfaith,thatthesumofthefirst10oddnumbers1+3+···+19hasatotalof102=100.Ifyouacceptedthatstatement,thenitwouldautomaticallyfollowthatwhenweaddedthe11thoddnumber,21,thetotalwouldbe121,whichis112.Inotherwords,thetruthofthestatementfor10termsautomaticallyimpliesthetruthofthestatementfor11terms.That’stheideaofaproofbyinduction.Weshowthatsomestatementinvolvingnistrueatthebeginning(usuallythestatementwhenn = 1), then we show that if the theorem is true when n = k, then it willautomaticallycontinuetobetruewhenn=k+1.Thisforcesthestatementtobetrueforallvaluesofn.Proofsbyinductionareanalogoustoclimbingaladder:supposeweshowthatyoucanstepontotheladderandthat,ifyouhavealreadymadeittoonestep,youcanalwaysmakeittothenext.Abitofthoughtshouldconvinceyouthatyoucouldgettoanystepontheladder.

Forexample,with thesumof the firstnoddnumbers,ourgoal is toshowthatforalln≥1,

1+3+5+···+(2n−1)=n2

Weseethatthesumofjustthefirstoddnumber,1,isindeed12,sothestatementis certainly truewhenn= 1.Nextwenotice that if the sumof the firstkoddnumbersisk2,namely,

1+3+5+···+(2k−1)=k2

thenwhenweaddthenextoddnumber(namely2k+1),weseethat

Page 154: The Magic of Math: Solving for x and Figuring Out Why

Inotherwords,ifthesumofthefirstkoddnumbersisk2,thenthesumofthefirstk+1oddnumbersisguaranteedtoequal(k+1)2.Thus,sincethetheoremistrueforn=1,itwillcontinuetobetrueforallvaluesofn.

Inductionisapowerfultool.Theveryfirstproblemwelookedatinthisbookwastoconsiderthesumofthefirstnnumbers.Weshowed,byvariousmeans,that

Thatstatementiscertainlytruewhenn=1(since1=1(2)/2).Andifweassumethatthestatementistrueforsomenumberk:

thenwhenweaddthe(k+1)stnumbertothatsum,weget

Thisisourformulawithnreplacedbyk+1.Thusiftheformulaisvalidwhenn=k(wherekcanbeanypositivenumber),thenitwillcontinuetobevalidwhenn=k+1.Hencetheidentityholdsforallpositivevaluesofn.

Wewillseemoreexamplesofinductioninthischapterandlaterinthisbook.Buttohelpreinforceitfurther,here’sasongwrittenby“mathemusicians”DaneCampandLarryLesser.It’ssungtothetuneof“Blowin’intheWind”byBobDylan.

Howcanyoutellthatastatementistrue

Page 155: The Magic of Math: Solving for x and Figuring Out Why

Foreveryvalueofn?Wellthere’sjustnowayyoucantrythemall.Whyyoucouldjustbarelybegin!IsthereatoolthatcanhelpusresolveThisinfinitequand’rywe’rein?

Theanswer,myfriend,isknowin’induction.Theanswerisknowin’induction!

FirstyoumustfindaninitialcaseForwhichthestatementistrue,Thenyoumustshowifit’strueforkThenk+1mustworktoo!Thenallstatementsfalljustlikedominosdo.Tellmehowdidwescoresuchacoup?

Theanswer,myfriend,isknowin’induction.Theanswerisknowin’induction!

IfItoldyountimes,Itoldyoun+1,Theanswerisknowin’induction!

Aside

InChapter5,wediscoveredseveralrelationshipswithFibonaccinumbers.Let’sseehowtoprovesomeofthoseidentitiesusinginduction.

Theorem:Forn≥1,

F1+F2+···+Fn=Fn+2−1

Proof(byinduction):Whenn=1,thissaysF1=F3−1,whichisthesameas1=2−1,whichiscertainlytrue.Nowassumethattheoremistruewhenn=k.Thatis,

F1+F2+···+Fk=Fk+2−1

Page 156: The Magic of Math: Solving for x and Figuring Out Why

NowwhenweaddthenextFibonaccinumberFk+1tobothsides,weget

asdesired.

Theproof for the sumof the squaresofFibonaccinumbers is equallysimple.

Theorem:Forn≥1,

Proof(byinduction):Whenn=1,thissays ,whichistrue,sinceF2=F1=1.Assumingthetheoremwhenn=k,wehave

Adding tobothsidesgivesus

asdesired.

InChapter1,wenoticedthat“thesumofthecubesisthesquareofthesum.”Thatis,

butweweren’treadytoproveit.Wecannowdoitprettyquicklybyinduction.Thegeneralpatternsaysthatforn≥1,

Page 157: The Magic of Math: Solving for x and Figuring Out Why

13+23+33+···+n3=(1+2+3+···+n)2

and since we already know that , we prove theequivalenttheorem,shownbelow.

Theorem:Forn≥1,

Proof(byinduction):Whenn=1,thetheoremgivesusthetruestatement13=12(22)/4.Inductively,ifthetheoremistruewhenn=ksothat

thenwhenweadd(k+1)3tobothsides,weget

asdesired.

Aside

Hereisageometricalproofofthesumofthecubesidentity.

Page 158: The Magic of Math: Solving for x and Figuring Out Why

Let’s compute theareaof this figure in twodifferentways, thencompareanswers.Ontheonehand,sincethefigureisasquarewhereeachsidehaslength1+2+3+4+5,itsareais(1+2+3+4+5)2.

On the other hand, if we start in the upper left corner and movediagonally downward, we can see one 1-by-1 square, then two 2-by-2squares (with one square cut into two halves), then three 3-by-3 squares,thenfour4-by-4squares(withonesquarecutintotwohalves),thenfive5-by-5squares.Consequently,theareaofthisfigureisequalto

Sincebothareasmustbeequal,itfollowsthat

13+23+33+43+53=(1+2+3+4+5)2

Thesamesortofpicturecanbecreatedforthesquarewithsidelengths1+2+···+ntoestablish

13+23+33+···+n3=(1+2+3+···+n)2

Proofsbyinductioncanhandlemorethanjustsums.Inductionisoftenusefulwheneverthesolutiontoyour“larger”problem(ofsizek+1)canbeexpressed

Page 159: The Magic of Math: Solving for x and Figuring Out Why

intermsofasmallerproblem(ofsizek).Hereismyfavoriteproofbyinduction,anditrelatestothecheckerboardtilingproblematthebeginningofthechapter.But instead of proving that something is impossible, we use it to show thatsomethingisalwayspossible.Andinsteadoftilingtheboardwithdominos,wetiletheboardwithtrominos,whicharelittleL-shapedtilesthatcover3squares.

Since64isnotamultipleof3,wecan’tcoveran8-by-8checkerboardwithtrominosalone.Butifyouplacea1-by-1squareontheboard,thenweclaimthatthe rest of the board can be tiled with trominos regardless of the square’slocation. In fact, not only is this statement true for 8-by-8 checkerboards, it’salsotrueforboardsofsize2-by-2,4-by-4,16-by-16,andsoon.

Theorem:Foralln≥1,acheckerboardofsize2n-by-2ncanbe tiledwithnon-overlapping trominosandasingle1-by-1square,where thesquarecanbelocatedanywhereontheboard.

Proof (by induction): The theorem is truewhen n = 1, since any 2-by-2boardcanbecoveredwithasingletrominoandsquare,wherethesquarecanbeanywhereontheboard.Nowsupposethetheoremholdswhenn=k,thatis,forboardsofsize2k-by-2k.Ourgoal is to show that it remains true forboardsofsize2k+1-by-2k+1.Placethe1-by-1squareanywhereontheboard,thendividetheboardintofourquadrants,asillustratedbelow.

Page 160: The Magic of Math: Solving for x and Figuring Out Why

Coveringacheckerboardwithtrominos

Nowthequadrantcontainingthesquarehassize2k-by-2k,soitcanbetiledwithtrominos(bytheassumptionthatthetheoremistruewhenn=k).Nextweplace a tromino in the center of the board, which intersects the other threequadrants.Thesequadrantshavesize2k-by-2kwithonesquarespecified,sotheytoo can be coveredwith non-overlapping trominos. This provides uswith thedesiredtilingoftheoriginal2k+1-by-2k+1board.

The final identity we prove in this section has many useful applications.We’ll prove it by induction, as well as a few other ways. The motivatingquestionis:Whatdoyougetwhenyouaddupthefirstnpowersof2,beginningwith20=1?Herearethefirstfewpowersof2:

1,2,4,8,16,32,64,128,256,512,1024,...

Aswestarttoaddthesenumberstogether,wesee:

Doyouseethepattern?Eachsumis1lessthanthenexthigherpowerof2.Thegeneralformulaisasfollows:

Theorem:Forn≥1,

1+2+4+8+···+2n−1=2n−1

Proof(byinduction):Asnotedabove,thetheoremistruewhenn=1(and2,3,4,and5,forthatmatter!).Assumingthetheoremholdsforn=k,wecansaythat

1+2+4+8+···+2k−1=2k−1

Whenweaddthenextpowerof2,whichis2k,tobothsides,weget

Page 161: The Magic of Math: Solving for x and Figuring Out Why

InChapters4and5,weprovedmanyrelationshipsbyansweringacountingquestionintwodifferentways.Youmightsaythatthefollowingcombinatorialproofcountsthemost!

Question:Howmanywayscanahockeyteamwithnplayers (with jerseysnumbered1throughn)chooseadelegationtoattendaconferencewhereatleastoneplayermustbeonthedelegation?

Answer 1: Each player has 2 choices, either attend or not, so the answerwouldseemtobe2n,butweneedtosubtract1toexcludethepossibilitythatallplayerschoosenottoattend.Thusthereare2n−1possibilities.

Answer2:Consider the largest jerseynumberwho attends the conference.There is only 1 delegation where 1 is the largest jersey number. There are 2delegationswhere2 is the largest jerseynumber (sinceplayer 2 either attendsalone orwith player 1). There are 4 delegationswhere 3 is the largest jerseynumber(sinceplayer3mustattendandplayers1and2eachhavetwochoices).Continuing in this manner, there are 2n−1 delegations where player n is thelargestjerseynumber,sincethatplayermustattend,butplayers1throughn−1eachhave2choices(toattendornot).Altogether,thereare1+2+4+···+2n−1possibilites.

Since answer 1 and answer 2 are both correct, then they must be equal.Therefore1+2+4+···+2n−1=2n−1.

Butperhapsthesimplestproofreliesonlyonalgebra.Itisreminiscentofthemethodweusedforexpressingarepeateddecimalasafraction.

ProofbyAlgebra:

LetS=1+2+4+8+···+2n−1

Multiplyingbothsidesby2givesus

2S=2+4+8+···+2n−1+2n

Page 162: The Magic of Math: Solving for x and Figuring Out Why

Subtracting the first equation from the second, we have massive cancellationexceptforthefirsttermofSandthelasttermof2S.Therefore,

S=2S−S=2n−1

The theorem we just proved is actually the key to the important binaryrepresentation of numbers, which is how computers store and manipulatenumbers.The ideabehindbinary is thateverynumbercanbe representedasauniquesumofdistinctpowersof2.Forexample,

83=64+16+2+1

Weexpressthisinbinarybyreplacingeachpowerof2withthenumber1andeachmissingpowerof2with0.Inourexample,83=(1·64)+(0·32)+(1·16)+(0·8)+(0·4)+(1·2)+(1·1).Thus83hasbinaryrepresentation

83=(1010011)2

Howdoweknowthateverypositivenumbercanberepresented thisway?Let’s suppose that we were able to represent all numbers from 1 to 99 withpowersof2inauniqueway.Howdoweknowthatwecanrepresent100inauniqueway?Let’sstartbytakingthelargestpowerof2below100,whichwouldbe64.(Mustweinclude64?Yes,becauseevenifwechose1,2,4,8,16,and32,theirsumwouldbe63,whichfallsshortof100.)Onceweuse64,weneedtouse powers of 2 to reach a total of 36. And since, by assumption, we canrepresent 36 in a unique way using powers of 2, this gives us our uniquerepresentationof100.(Howdowerepresent36?Byrepeatingthislogic,wetakethelargestpowerof2thatwecan,andcontinueinthismanner.Thus36=32+4, and so 100 = 64 + 32 + 4 has binary representation (1100100)2.)We cangeneralizethisargument(usingwhat’scalledastronginductionproof) toshowthateverypositivenumberhasauniquebinaryrepresentation.

PrimeNumbersIn the last section, we established that every positive integer can be uniquelyexpressedas a sumofdistinctpowersof2. In a sense,youcould say that the

Page 163: The Magic of Math: Solving for x and Figuring Out Why

powersof2arethebuildingblocksofthepositiveintegersundertheoperationofaddition.Inthissection,we’llseethattheprimenumbersplayasimilarrolewith regard tomultiplication:everypositive integercanbeuniquelyexpressedasaproductofprimes.Yetunlikethepowersof2,whichcanbeeasilyidentifiedandholdfewmathematicalsurprises,theprimenumbersaremuchtrickier,andtherearestillmanythingswedon’tknowaboutthem.

A prime number is a positive integer with exactly two positive divisors,namely1anditself.Herearethefirstfewprimes.

2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53...

Thenumber1isnotconsideredaprimenumberbecauseithasonlyonedivisor,namely 1. (There is amore significant reasonwhy 1 is not considered prime,which we will mention shortly.) Notice that 2 is the only even prime. Somemightsaythatmakesittheoddestofallprimenumbers!

Apositiveintegerwiththreeormoredivisorsiscalledcompositesinceitcanbecomposedintosmallerfactors.Thefirstfewcompositesare

4,6,8,9,10,12,14,15,16,18,20,21,22,24,25,26,27,28,30...

For example, the number 4 has exactly three divisors: 1, 2, and 4. Thenumber6hasfourdivisors:1,2,3,and6.Notethenumber1isnotcompositeeither.Mathematicianscallthenumber1aunit,andithasthepropertythatitisadivisorofeveryinteger.

Every composite number can be expressed as the product of primes. Let’sfactor120intoprimes.Wemightstartbywriting120=6×20.Now,6and20arecomposite,buttheycanbefactoredintoprimes,namely6=2×3and20=2×2×5.Thus,

120=2×2×2×3×5=233151

Interestingly,nomatterhowweinitiallyfactorournumber,westillwindupwiththesameprimefactorization.Thisisaconsequenceoftheunique factorizationtheorem,alsoknownasthefundamental theoremofarithmetic,whichstatesthateverypositiveintegergreaterthan1hasauniqueprimefactorization.

Bytheway,therealreasonthenumber1isnotconsideredtobeprimeisthatif it were, then this theoremwould not be true. For example, the number 12couldbefactoredas2×2×3,butitcouldalsobefactoredas1×1×2×2×3,

Page 164: The Magic of Math: Solving for x and Figuring Out Why

sothefactorizationintoprimeswouldnolongerbeunique.Once you know how a number factors, you know an awful lot about that

number.WhenIwasakid,myfavoritenumberwas9,butasIgrewolder,myfavoritenumbersbecamelarger,thengraduallymorecomplex(forexample,π=3.14159 . . . ,φ=1.618 . . . ,e=2.71828 . . . , and i,whichhas nodecimalrepresentation, but we will discuss that in Chapter 10). For a while, before Istarted experimentingwith irrational numbers,my favorite numberwas 2520,since itwas the smallestnumber thatwasdivisiblebyall thenumbers from1through10.Ithasprimefactorization

2520=23325171

Onceyouknowanumber’sprimefactorization,youcaninstantlydeterminehowmanypositivedivisorsithas.Forexample,anydivisorof2520mustbeoftheform2a3b5c7dwhereais0,1,2,or3(4choices),bis0,1,or2(3choices),cis0or1(2choices),anddis0or1(2choices).Thusbytheruleofproduct,2520has4×3×2×2=48positivedivisors.

Aside

Theproofofthefundamentaltheoremofarithmeticexploitsthefollowingfactaboutprimenumbers(provedinthefirstchapterofanynumbertheorytextbook). Ifp isaprimenumberandpdividesaproductof twoormorenumbers,thenpmustbeadivisorofatleastoneofthetermsintheproduct.Forexample,

999,999=333×3003

isamultipleof11, so11mustdivide333or3003. (In fact,3003=11×273.) This property is not always true with composite numbers. Forexample,60=6×10isamultipleof4,eventhough4doesnotdivide6or10.

Toproveuniquefactorization,suppose thecontrary, thatsomenumberhad more than one prime factorization. Suppose thatN was the smallest

Page 165: The Magic of Math: Solving for x and Figuring Out Why

numberthathadtwodifferentprimefactorizations.Say

p1p2···pr=N=q1q2···qs

whereallofthepiandqjtermsareprime.SinceNiscertainlyamultipleoftheprimep1,thenp1mustbeadivisorofoneoftheqjterms.Let’ssay,foreaseofnotation,thatp1dividesq1.Thus,sinceq1isprime,wemusthaveq1=p1.Soifwedividetheentireequationabovebyp1,weget

But now the number has two different prime factorizations, whichcontradictsourassumptionthatNwasthesmallestsuchnumber.

Aside

Incidentally, there are number systems where not everything factors in auniqueway.Forexample,onMars,whereallMartianshavetwoheads,theyonlyuseevennumbers

2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,...

InthisMartiannumbersystem,anumberlike6or10isconsideredprimebecauseitcannotbefactoredintosmallerevennumbers.Inthissystem,theprimes and composite numbers simply alternate. Every multiple of 4 iscomposite(since4k=2×2k)andalltheotherevennumbers(like6,10,14,18,andsoon),areprime,sincetheycan’tbefactoredintotwosmallerevennumbers.Butnowconsiderthenumber180:

6×30=180=10×18

Under theMartian number system, the number 180 can be factored into

Page 166: The Magic of Math: Solving for x and Figuring Out Why

primes in two different ways, so prime factorization is not unique in thenumbersystemusedonthisplanet.

Amongthenumbersfrom1to100,thereareexactly25primes.Amongthenexthundrednumbers,thereare21primes,then16primesamongthehundrednumbers after that. As we look at larger and larger numbers, primes tend tobecomerarer(butnotinapredictableway—forexampletherearestill16primesbetween 300 and 400 and 17 primes between 400 and 500). The number ofprimesbetween1,000,000and1,000,100isonly6.Thefactthatprimesbecomemorescarcemakessensebecausealargenumberhassomanynumbersbelowitthatcouldpotentiallydivideit.

Wecanprovethattherearestretchesof100numberswithnoprimes.Thereare even primeless collections of consecutive numbers of length 1000, or 1million, or as long as you’d like. Let me try to convince you of this fact byinstantlyprovidingyouwith99consecutivecompositenumbers (although thisisn’tthefirsttimethatthishappens).Considerthe99consecutivenumbers

100!+2,100!+3,100!+4,...,100!+100

Since100!=100×99×98×···×3×2×1,itmustbedivisiblebyallthenumbersfrom2to100.Nowconsideranumberlike100!+53.Since53dividesinto100!,thenitmustalsodivideinto100!+53.Thesameargumentshowsthatforall2≤k≤100,100!+kmustbeamultipleofk,soitmustbecomposite.

Page 167: The Magic of Math: Solving for x and Figuring Out Why

Aside

Notethatourargumentdoesn’tsayanythingabouttheprimenessof100!+1, butwe can determine that aswell. There is a beautiful theorem calledWilson’stheorem,whichsaysthatnisaprimenumberifandonlyif(n−1)!+1isamultipleofn.Tryitonafewsmallnumberstoseeitinaction:1!+1=2 isamultipleof2;2!+1=3 isamultipleof3;3!+1=7 isnotamultipleof4;4!+1=25isamultipleof5;5!+1=121isnotamultipleof6;6!+1=721 is amultipleof7; and soon.Consequently, since101 isprime,Wilson’s theorem says that 100! + 1 is a multiple of 101, and isthereforecomposite.Thus thenumbers100! through100!+100comprise101consecutivecompositenumbers.

With prime numbers becoming scarcer and scarcer among the very largenumbers,itisnaturaltowonderifatsomepointwesimplyrunoutofprimes.AsEuclidtoldusovertwothousandyearsago,thiswillnotbethecase.Butdon’tjusttakehiswordforit;enjoytheproofforyourself.

Theorem:Thereareinfinitelymanyprimes.Proof:Suppose, to thecontrary, that therewereonlyfinitelymanyprimes.

Hence theremustbesome largestprimenumber,whichweshalldenotebyP.NowconsiderthenumberP!+1.SinceP!isdivisiblebyallnumbersbetween2andP,noneofthosenumberscandivideP!+1.ThusP!+1musthaveaprimefactor that is larger thanP, contradicting theassumption thatPwas the largestprime.

Although we will never find a largest prime number, that doesn’t stopmathematicians and computer scientists from searching for larger and largerprimes.Asofthiswriting,thelargestknownprimehas17,425,170digits.Justtowritethatnumberdownwouldrequirenearlyahundredbooksofthissize.Yetwecandescribethatnumberononeline:

257,885,161−1

Thereasonithasthatsimpleformisthatthereareespeciallyefficientmethods

Page 168: The Magic of Math: Solving for x and Figuring Out Why

fordeterminingwhetherornotnumbersoftheform2n−1or2n+1areprime.

Aside

ThegreatmathematicianPierredeFermatprovedthatifpisanoddprimenumber,thenthenumber2p−1−1mustbeamultipleofp.Checkthisoutwiththefirstfewoddprimes.Fortheprimes3,5,7,11,wesee22−1=3isamultipleof3;24−1=15isamultipleof5;26−1=63isamultipleof7;and210−1=1023isamultipleof11.Asforcompositenumbers,itisclearthatifniseven,then2n−1−1mustbeodd,soitcan’tbeamultipleofn.Checkingthefirstfewoddcomposites9,15,and21,weseethat28−1=255isnotamultipleof9;214−1=16,383isnotamultipleof15;and220− 1 = 1,048,575 is not amultiple of 21 (nor even amultiple of 3).As aresultofFermat’stheorem,ifalargenumberNhasthepropertythat2N−1−1 is not amultiple ofN, thenwe can be 100 percent sure thatN is notprime, even without knowing what the factors of N are! However, theconverse of Fermat’s theorem is not true. There do exist some compositenumbers (called pseudoprimes) that behave like primes. The smallestexampleis341=11×31,whichhasthepropertythat2340−1isamultipleof 341. Although it’s been shown that pseudoprimes are relatively rare,thereareaninfinitenumberofthem,butthereareteststoweedthemout.

Prime numbers have many applications, particularly within computerscience.Primesareattheheartofnearlyeveryencryptionalgorithm,includingpublic key cryptography,which allows for secure financial transactions acrossthe Internet. Many of these algorithms are based on the fact that there arerelatively fastways todetermine if anumber isprimeornot,but therearenoknown fastways of factoring large numbers. For example, if Imultiplied tworandom1000-digit primes together andgaveyou their 2000-digit answer, it ishighlyunlikelythatanyhumanorcomputer(unlessaquantumcomputerisbuiltsomeday)coulddeterminetheoriginalprimenumbers.Codesthatarebasedon

Page 169: The Magic of Math: Solving for x and Figuring Out Why

ourinabilitytofactorlargenumbers(suchastheRSAmethod)arebelievedtobequitesecure.

Peoplehavebeenfascinatedwithprimenumbersforthousandsofyears.TheancientGreekssaidthatanumberisperfectifitisequaltothesumofallofitsproperdivisors(everydivisorexceptitself).Forexample,6isperfectsinceithasproper divisors 1, 2, and 3, which sum to 6. The next perfect number is 28,which has proper divisors 1, 2, 4, 7, and 14,which sum to 28. The next twoperfectnumbersare496and8128.Isthereanypatternhere?Let’slookattheirprimefactorizations.

Doyouseethepattern?Thefirstnumberisapowerof2.Thesecondnumberisonelessthantwicethatpowerof2,andit’sprime.(That’swhyyoudon’tsee8×15or32×63onthelist,since15and63arenotprime.)Wecansummarizethispatterninthefollowingtheorem.

Theorem:If2n−1isprime,then2n−1×(2n−1)isperfect.

Aside

Proof:Letp=2n−1beaprimenumber.Ourgoalistoshowthat2n−1pisperfect.Whataretheproperdivisorsof2n−1p?Thedivisorsthatdonotusethefactorparesimply1,2,4,8,...,2n−1,whichhassum2n−1=p.Theotherproperdivisors(whichexcludes2n−1p)utilizethefactorp,sothesedivisorssumtop(1+2+4+8+· · ·+2n−2)=p(2n−1−1).Hence thegrandtotalofproperdivisorsis

p+p(2n−1−1)=p(1+(2n−1−1))=2n−1p

asdesired.

Page 170: The Magic of Math: Solving for x and Figuring Out Why

The great mathematician Leonhard Euler (1707–1783) proved that everyevenperfectnumber isof this form.Asof thiswriting, therehavebeenforty-eight discovered perfect numbers, all of which are even. Are there any oddperfect numbers? Presently, nobody knows the answer to that question. It hasbeenshownthat ifanoddperfectnumberexists, thenitwouldhavetocontainoverthreehundreddigits,butnobodyhasyetprovedthattheyareimpossible.

There are many easily stated unsolved problems pertaining to primenumbers.Wehavealreadystatedthatitisunknownwhetherthereareinfinitelymany prime Fibonacci numbers. (It has been shown that there are only twoperfectsquaresamongtheFibonaccinumbers(1and144)andonlytwoperfectcubes(1and8).)AnotherunsolvedproblemisknownasGoldbach’sconjecture,which speculates that every even number greater than 2 is the sum of twoprimes.Here,too,nobodyhasbeenabletoprovethisconjecture,butithasbeenproved that if acounterexampleexists, then itmusthaveat least19digits. (Abreakthroughwasrecentlymadeonasimilar-soundingproblem.In2013,HaraldHelfgottprovedthateveryoddnumberbiggerthan7isthesumofatmostthreeoddprimes.)Finally,wedefine twinprimes tobeany twoprimenumbers thatdifferby2.Thefirstexamplesoftwinprimesare3and5,5and7,11and13,17and19,29and31,andsoon.Canyouseewhy3,5,and7aretheonly“primetriplets”?Andeventhoughithasbeenproved(asaspecialcaseofatheoremduetoGustavDirichlet)thatthereareinfinitelymanyprimesthatendin1(orendin3orendin7orendin9),thequestionofwhetherthereexistsaninfinitenumberoftwinprimesremainsopen.

Let’sendthischapterwithaproofthat’salittlefishy,butIhopeyouagreewiththestatementanyway.

Claim:Allpositiveintegersareinteresting!Proof?: You’ll agree that the first few positive numbers are all very

interesting.Forinstance,1isthefirstnumber,2isthefirstevennumber,3isthefirstoddprime,4istheonlynumberthatspellsitselfF-O-U-R,andsoon.Nowsuppose, tothecontrary, thatnotallnumbersareinteresting.Thentherewouldhavetobeafirstnumber,callitN,thatwasnotinteresting.ButthenthatwouldmakeNinteresting!Hencenouninterestingnumbersexist!

Page 171: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERSEVEN

TheMagicofGeometry

SomeGeometrySurprisesLet’sbeginwithageometryproblem thatcouldbepresentedasamagic trick.Onaseparatesheetofpaper,followthestepsbelow.

Step1.Drawafour-sidedfigurewherethesidesdon’tcrosseachother.(Thisis calledaquadrilateral.)Label the fourcornersA,B,C, andD, in clockwiseorder.(Seesomeexamplesbelow.)

Page 172: The Magic of Math: Solving for x and Figuring Out Why

Threerandomquadrilaterals

Step2.Labelthemidpointsofthefoursides and asE,F,G,andH,respectively.

Step3.ConnectthemidpointstoformaquadrilateralEFGH,asshownintheexamplesbelow.

Connectingthemidpointsofaquadrilateralalwaysproducesaparallelogram

Believeitornot,EFGHisguaranteedtobeaparallelogram.Inotherwords,willbeparallelto ; willbeparallel to . (Also, and will

havethesamelength,aswill and .)Thisisillustratedinthefigureabove,butyoushouldtrysomeexamplesofyourown.

Geometry is filled with surprises like this. Applying simple logicalarguments to the simplest of assumptions, one often winds up with beautifulresults. Let’s take a short quiz to test your geometric intuition. Some of thesequestionshaveveryintuitiveanswers,butsomeofthesequestionshaveanswersthatwillsurpriseyou,evenafteryouhavelearnedtheappropriategeometry.

Question1.Afarmerwishestobuildarectangularfencewithaperimeterof52 feet. What should the dimensions of the rectangle be to maximize therectangle’sarea?

A)Asquare(13feetperside).B)Closetotheproportionsofthegoldenratio1.618(sayaround16feetby

10feet).C)Makethewidthaslongaspossible(closeto26feetby0feet).D)Allanswersabovegivethesamearea.

Question2.Consider the parallel lines below,withX andYon the lower

Page 173: The Magic of Math: Solving for x and Figuring Out Why

line.WewishtochooseathirdpointontheupperlinesothatthetriangleformedbyX,Y,andtheupperpointhasthesmallestperimeter.Whatupperpointshouldbechosen?

A)PointA(abovethepointthatishalfwaybetweenXandY).B)PointB(sothetriangleformedbyB,X,andYisarighttriangle).C)AsfarawayfromXandYaspossible(likepointC).D)Itdoesn’tmatter.Alltriangleswillhavethesameperimeter.

Whichpointontheupperlineresultsinatriangle(withpointsXandY)withthesmallestperimeter?Whichpointresultsinthegreatestarea?

Question3.Usingthesamefigureasabove,whatpointPontheupperlineshouldbechosensothatthetriangleformedbyX,Y,andPhasthegreatestarea?

A)PointA.B)PointB.C)AsfarawayfromXandYaspossible.D)Itdoesn’tmatter.Alltriangleswillhavethesamearea.

Question4.Thedistancebetween twogoalpostsona football field is360feet(120yards).Aropeoflength360feetisabouttobetiedtightlybetweenthebottomofthetwogoalposts,whenanextrafootofropeisadded.Howhighcantheropebeliftedinthemiddleofthefield?

A)Lessthanoneinchofftheground.B)Justhighenoughtocrawlunder.C)Justhighenoughtowalkunder.D)Highenoughtodriveatruckunder.

Page 174: The Magic of Math: Solving for x and Figuring Out Why

Aropeoflength361feetistiedbetweengoalposts360feetapart.Howhighcanwelifttheropeinthemiddleofthefield?

Theanswerstothesequestionsaregivenbelow.Ithinkthefirsttwoanswersareprettyintuitive,but theothertwoanswerswillsurprisemostpeople.Alloftheanswerswillbeexplainedlaterinthechapter.

Answer1.A.Foranygivenperimeter,tomaximizetheareaoftherectangle,you should let all sides have equal length. Thus, the optimal shapewill be asquare.

Answer 2. A. Choosing the point A above themidpoint of X andYwillcreatethetriangleXAYthathassmallestperimeter.

Answer3.D.Alltriangleswillhavethesamearea.Answer4.D.Atthemidpointofthefield,theropecanbeliftedmorethan

13feetintheair—highenoughformosttruckstofitunder.Wecanexplain the first answerusing simplealgebra.For a rectanglewith

top and bottom lengths b (b as in base) and left and right lengths h (h as inheight),theperimeteroftherectangleis2b+2h,whichisthesumofthelengthsof all four sides.Theareameasureswhat can fit into the rectangle and is theproductbh.(We’llsaymoreaboutarealater.)Sincetheperimeterisrequiredtobe52feet,wehave2b+2h=52,orequivalently

b+h=26

Andsinceh=26−b,theareabhthatwewishtomaximizeisequalto

b(26−b)=26b−b2

Whatvalueofbmaximizesthisquantity?We’llseeaneasywaytodothiswithcalculus in Chapter 11. But we can also find b by using the technique ofcompletingthesquare,presentedinChapter2.Noticethat

26b−b2=169−(b2−26b+169)=169−(b−13)2

Page 175: The Magic of Math: Solving for x and Figuring Out Why

is theareaofourrectanglewhenbaseb ischosen.Whenb=13our rectanglehasarea169−02=169.Whenb≠13,ourareais

169−(somethingnotequalto0)2

Sinceweare subtractingapositivequantity from169, thiswillalwaysbe lessthan169.Consequently,theareaoftherectangleismaximizedwhenb=13andh=26−b=13.Oneoftheamazingthingsaboutgeometryisthatthefactthatthefarmerhas52feetoffenceisirrelevant.Tomaximizetheareaofarectanglewith any given perimeterp, the same technique can be used to show that theoptimalshapewillbeasquare,whereallsidesareoflengthp/4.

In order to explain the other problems, we need to first look at someseemingly paradoxical results and explore some classics of geometry. Whyshouldatrianglehave180degrees?WhatisthePythagoreantheoremallabout?Howcanyoutellwhentwotriangleswillhavethesameshape,andwhyshouldwecare?

GeometryClassicsThesubjectofgeometrygoesback to theancientGreeks.ThenamegeometrycomesfromtheGreekwordsfor“earth”(geo)and“measurement”(metria),andindeedgeometry’soriginaluseswere for the studyofearthlymeasurements insurveying and construction, and for heavenly applications such as astronomy.ButtheancientGreeksweremastersofdeductivereasoninganddevelopedthesubjectintotheartformthatitistoday.Alloftheresultsofgeometrythatwereknownatthetime(around300BC)werecompiledbyEuclidintoTheElements,which became one of the most successful textbooks of all time. This bookintroduced the ideas of mathematical rigor, logical deduction, the axiomaticmethod,andproofs,whicharestillutilizedbymathematicians.

Euclid began with five axioms (also known as postulates), which arestatements that we are supposed to accept as common sense. And once youaccept these axioms, then you can, in principle, derive all geometrical truthsfromthem.HereareEuclid’sfiveaxioms.(Actually,hestatedthefifthaxiomalittledifferently,butouraxiomisequivalenttoit.)

Axiom 1. Given any two points,we can connect themwith a unique linesegment.

Page 176: The Magic of Math: Solving for x and Figuring Out Why

Axiom2.Line segments canbeextended indefinitely inbothdirections tocreatelines.

Axiom3.GivenanypointsOandP,wecandrawauniquecircle,centeredatO,wherePisonthecircle.

Axiom4.Allrightanglesmeasure90degrees.Axiom5.GivenalinelandapointPnotontheline,thereexistsexactlyone

linethroughPthatisparalleltol.

Aside

I should clarify that in this chapterwe areworkingwith plane geometry(also referred to asEuclideangeometry),where it is assumed thatwe areworkingonaflatsurface,suchasthex-yplane.Butifwechangesomeofthe axioms,we can still get interesting and usefulmathematical systems,like spherical geometry, which looks at points on a sphere. In sphericalgeometry, the “lines” are circles ofmaximumcircumference (calledgreatcircles), and as a consequence, all lines must intersect somewhere, soparallellinesdon’texist.Ifaxiom5ischangedsothattherearealwaysatleast two different lines through P that are parallel to l, then we getsomethingcalledhyperbolicgeometry,whichhasbeautifultheoremsallitsown.Manyof the brilliant prints created by the artistM.C.Escherwerebasedon this typeofgeometry.The imagebelowwascreatedbyDouglasDunham using the rules of hyperbolic geometry, and was used withpermission.

Page 177: The Magic of Math: Solving for x and Figuring Out Why

Asithappens,thereareotheraxiomsthatEuclidleftout,andsomeofthemwill bementioned as needed. Since this chapter is not intended to replace anentiregeometrytextbook,wewon’ttrytodefineandproveeverythingfromthegroundup. Iwillassume thatyouhavean intuitive ideaabout themeaningofpoints,lines,angles,circles,perimeters,andareas,andIwilltrytokeepjargonand notation to aminimum, sowe can concentrate on the interesting ideas ofgeometry.

Forexample,Iwillassumethatyoualreadyknow,orarewillingtoaccept,that a circle has 360degrees, denoted360°.Themeasureof an angle is somenumberbetween0°and360°.Thinkofthehandsofaclock,joinedatthecenterofacircle.At1o’clock,thehandsindicate1/12thofthecircle,sotheyformanangleof30°.At3o’clock,thehandsindicateone-quarterofthecircle,sotheyforma90°angle.Anglesof90degreesarecalledrightangles,andthelinesor

Page 178: The Magic of Math: Solving for x and Figuring Out Why

segments that formthemarecalledperpendicular.Astraight line, suchasat6o’clock,hasanangleof180degrees.

Theanglesabovehavemeasures30°,90°,and180°

Here’s one piece of useful notation.The line segment connecting pointsAandBisdenotedby ,anditslengthhasthebaromitted,sothelengthofisAB.

When two lines cross they create four angles, as in the figure on thefollowingpage.Whatcanwesayabouttheseangles?Noticethatadjacentangles(likeaandb)togetherformastraightline,whichhas180°.Thus,anglesaandbmustaddupto180°.Suchanglesarecalledsupplementary.

Whentwolinescross,theadjacentanglessumto180°.Thenon-adjacentangles(calledverticalangles)areequal.Hereanglesaandcformaverticalanglepair,asdoanglesbandd.

Thispropertyholdsforeveryotheradjacentpairofangles.Thatis,

a+b=180°b+c=180°c+d=180°d+a=180°

Subtractingthesecondequationfromthefirstequationtellsusthata−c=0.Thatis,

Page 179: The Magic of Math: Solving for x and Figuring Out Why

a=c

Andsubtractingthethirdequationfromthesecondequationgivesus

b=d

When two lines cross, the non-adjacent angles are called vertical angles. Wehavejustprovedtheverticalangletheorem:verticalanglesareequal.

Ournextgoal is toprove that the sumof theangles inany triangle is180degrees.Todothis,weneedtofirstsayafewthingsaboutparallellines.Wesaythat two different lines areparallel if they never cross. (Remember that linesextend infinitely in both directions.) The figure opposite shows two parallellines, l1 and l2, and a third line l3 that is not parallel to them, and thereforecrosses the lines at pointsP andQ respectively. If you look at the picture, itappears that line l3cuts through lines l1and l2at the sameangle.That is,webelievethata=e.Wecallanglesaandecorrespondingangles.(Otherexamplesofcorrespondinganglesareanglesbandf,anglescandg,andanglesdandh.)Itsure seems that corresponding angles should always be equal, yet this can’tactuallybeprovedasaconsequenceoftheoriginalfiveaxioms.Thus,weneedanewaxiom.

Correspondinganglesareequal.Herea=e,b=f,c=g,andd=h.

Correspondingangleaxiom:Correspondinganglesareequal.WhencombinedwiththeVerticalAngleTheorem,thissaysthatinthefigure

above,wemusthave

a=c=g=e

Page 180: The Magic of Math: Solving for x and Figuring Out Why

b=d=h=f

Mathbooksgivespecialnamesforsomeoftheequalanglepairsabove.Forexample, angles a and g, forming a Z pattern, are called alternate interiorangles. Thus, we’ve shown that any angle is equal to its vertical angle,correspondingangle,andalternateinteriorangle.Wenowusethisresulttoproveafundamentaltheoremofgeometry.

Theorem:Foranytriangle,thesumofitsanglesis180degrees.Proof:ConsideratriangleABCliketheoneonthenextpage,withanglesa,

bandc.Nowdrawa line through thepointB that isparallel to the linegoingthroughAandC.

Anglesd,b,andeformastraightline,sod+b+e=180°.Butnoticethatanglesaanddarealternateinteriorangles,asareanglescande.Thusd=aande=c,soa+b+c=180°,asdesired.

Whydoesa+b+c=180°?

Aside

The180°theoremfortrianglesisanessentialfactofplanegeometry,butitneed not hold for other geometries. For example, consider drawing atriangle on a globe, starting at the north pole, going down to the equatoralong any longitudinal line, turning right at the equator, going around aquarter of the earth, then turning right again until you return to the northpole. This triangle would actually contain three right angles and sum to270°. In spherical geometry, the sum of the angles of triangles is not

Page 181: The Magic of Math: Solving for x and Figuring Out Why

constant, and the extent to which the sum of the angles exceeds 180° isdirectlyproportionaltotheareaofthetriangle.

Ingeometry classes,much attention is paid toproving that variousobjectsarecongruent,whichmeansthatbysliding,rotating,orflippingoneobject,wecanobtain theotherobject.For example, the trianglesABCandDEF picturedbelow are congruent, since we can slide triangle DEF so that it perfectlyoverlapstriangleABC.Inourfigures,whentwosides(orangles)havethesamenumberofhashmarks,thisindicatesthattheyhavesamelength(ormeasure).

Congruenttriangles

We indicate this with the ≅ symbol by writing ABC≅ DEF. This isequivalenttosayingthatthelengthsandanglesmatchupperfectly.Specifically,thesidelengthsAB,BC,andCAarerespectivelyequaltoDE,EF,andFD,andtheanglesassociatedwithA,B,andCarerespectivelyequaltotheanglesD,E,andF.Wehavemarkedthisinthefigurebyputtingthesamesymbolinanglesthatareequal,andsimilarlymarkedsidesofthetrianglethatareequal.

Onceyouknowthatsomeofthesidesandanglesareequal,thentherestcanfollowautomatically.Forinstance,ifyouknowthatallthreesidesareequal,andthattwopairsofanglesareequal(say∠A=∠Dand∠B=∠E),thenthethirdpair of angles must also be equal, and so the triangles must be congruent.However,wedon’tevenneedallofthisinformation.Onceyouknowthattwoofthesidelengthsareequal,sayAB=DEandAC=DF,andyouknowthat theanglesbetween themareequal,here∠A=∠D, theneverythingelse is forced:BC=EF,∠B=∠E,and∠C=∠F.Wecall this theSASaxiom, where SASstandsfor“side-angle-side.”

TheSASaxiomisnotatheorem,sinceitcannotbeprovedbytheprecedingaxioms.Butonceweaccept it,wecan rigorouslyproveotheruseful theoremslikeSSS(side-side-side),ASA(angle-side-angle),andAAS(angle-angle-side).There is not an analogous theorem called SSA (or its embarrassing backward

Page 182: The Magic of Math: Solving for x and Figuring Out Why

namesake) since the common angle must be between the two equal sides toensurecongruence.ThetheoremSSSismostintriguing,sinceitsaysthatiftwotriangleshaveequalsidelengthsthentheymusthaveequalanglesaswell.

Let’sapplySAStoprovetheimportantisoscelestriangletheorem.Atriangleis isosceles if two of its sides have the same length. While we’re at it, let’smention a few more types of triangles. An equilateral triangle is a trianglewhereallthreesideshavethesamelength.Atrianglewitha90°angleiscalledaright triangle. If all angles of the triangle are less than 90°, thenwe have anacutetriangle.Ifthetrianglehasananglethatismorethan90°,thenitiscalledanobtusetriangle.

Equilateraltriangle,acutetriangle,righttriangle,andobtusetriangle

Isoscelestriangletheorem: IfABC isan isosceles trianglewithequalsidelengthsAB=AC,thentheanglesoppositethesesidesmustalsobeequal.

Isoscelestriangletheorem:IfAB=AC,then∠B=∠C

Proof:BeginbydrawingalinefromAthatsplits∠Aintotwoequalangles,as in the figure below. (This is called the angle bisector of A.) Let’s say itintersectssegment atpointX.

Page 183: The Magic of Math: Solving for x and Figuring Out Why

Theisoscelestriangletheoremcanbeprovedbydrawingananglebisectorandthenapplyingtheside-angle-sideaxiomtothenewlycreatedtriangles

WeclaimthattrianglesBAXandCAXarecongruent.ThisisaconsequenceofSASsinceBA=CA (byisoscelesassumption),∠BAX=∠CAX (becauseoftheanglebisector),andAX=AX.(No,that’snotatypo— appearsinthetwotriangleswe are comparing and it has the same length in both of them!)AndsinceBAX≅CAX, theother sidesandanglesmustbeequal too.Specifically,∠B=∠C,whichwasourgoal.

Aside

The isosceles triangle theoremcanalsobeprovedusing theSSStheorem.For this proof, letM denote themidpoint of , whereBM =MC. Thendrawthelinesegment .Likeinthepreviousproof,trianglesBAMandCAMarecongruent,sinceBA=CA(isosceles),AM=AM,andMB=MC(midpoint).Thus,bySSS,BAM≅CAM,sotheirrespectiveanglesarealsoequal.Inparticular,∠B=∠C,asdesired.

As a result of congruence, it follows that∠BAM =∠CAM, so thesegment is also the angle bisector.Moreover, since∠BMA =∠CMAandsincetheseequalanglessumto180°,theymustbothbe90°.Soinanisoscelestriangle,theanglebisectorofAisalsotheperpendicularbisectorofBC.

Bytheway,theconverseof theisoscelestriangletheoremisalsotrue.That is, if∠B =∠C, thenAB =AC. This can be proved by drawing theanglebisectorfromAtopointX,asintheoriginalproof.NowweclaimthatBAX≅CAX byAAS since∠B =∠C (byassumption),∠BAX =∠CAX(anglebisector),andAX=AX.Thus,AB=AC,sothetriangleisisosceles.

Page 184: The Magic of Math: Solving for x and Figuring Out Why

In an equilateral triangle, where all sides are equal, we can apply theprevious theoremtoall threepairsofsides tosee thatall threeanglesarealsoequal.Thus,sincethethreeanglesmustsumto180°,wehavethefollowing:

Corollary:Inanequilateraltriangle,allanglesmustbe60°.AccordingtotheSSStheorem,iftwotrianglesABCandDEFhavematching

sides(AB=DE,BC=EF,CA=FD),thentheymustalsohavematchingangles(∠A=∠D,∠B=∠E,∠C=∠F).Istheconversestatementtrue?IfABCandDEFhavematchingangles, thenmust theyhaveequalsides?Certainlynot,asseeninthepicturebelow.

Similartriangleshavematchinganglesandproportionalsides

Two triangleswith the sameanglemeasurements are called similar. If twotriangles ABC andDEF are similar (denoted ΔABC ~ ΔDEF or just ABC ~DEF), then∠A=∠D,∠B=∠E,∠C=∠F.Essentially,similar triangles arejust scaledversionsof one another.So ifABC ~DEF, then the sidesmustbescaledbysomepositivefactork.Thatis,DE=kAB,EF=kBC,andFD=kCA.

Let’s apply what we have learned so far to answer question 2 from thebeginning of the chapter. Recall that we started with two parallel lines withsegment onthelowerline.OurgoalwastofindapointPontheupperlineso that triangleXYP has the smallest possible perimeter.We claimed that thefollowingwastrue:

Theorem:ThepointPontheupperlinethatminimizestheperimeterofXYPisdirectlyabovethemidpointof .

Although this problem could be solved using tricky calculus, we will seehowgeometryallowsustosolvetheproblemwithjustalittlebitof“reflection.”(Theproofthatfollowsisinteresting,butsomewhatlong,sofeelfreetoskimorskipit.)

Proof:LetPbeanypointontheupperline,andletZdenotethepointontheupperlinethatisdirectlyaboveY.(Moreprecisely,thepointZisplacedsothat

Page 185: The Magic of Math: Solving for x and Figuring Out Why

it is on the line containingY, and is perpendicular to both the upper andlowerlines.Seethefigurebelow.)LetY′bethepointontheperpendicularlinesuchthatY′Z=ZY. Inotherwords, if theupper linewereabigmirror, thenY′wouldbethereflectionofYthroughthepointZ.

IclaimthattrianglesPZYandPZY′arecongruent.That’sbecausePZ=PZ,∠PZY = 90º∠PZY′, and ZY = ZY′, so the triangles are congruent by SAS.Consequently,PY=PY′,whichwecanexploit.

SincetrianglesPZYandPZY′arecongruent(bySAS),wemusthavePY=PY′

TheperimeteroftriangleYXPisthesumofthethreelengths

YX+XP+PY

andsincewehaveshownthatPY=PY′,theperimeteralsoequals

YX+XP+PY′

Now,thelengthYXdoesnotdependonP,soourproblemreducestofindingthepointPthatwillminimizeXP+PY′.

Noticethatthelinesegments and formacrookedpathfromXtoY′.Since the shortest distance between two points is a straight line, the optimalpointP*canbefoundbydrawingastraight linefromX toY′;P* is thepointwherethislineintersectstheupperline.Seethefigurebelow.Sowhyaren’twedone? To complete the proof we need to show that P* is directly above themidpontof .

Page 186: The Magic of Math: Solving for x and Figuring Out Why

TrianglesMXP*andYXY′aresimilarwithscalefactor2

LetMdenotethepointdirectlybelowP*(sothat isperpendicularto).Sincetheupperandlowerlinesareparallel,thelengthsP*MandZYmust

beequal.(Thismakesintuitivesensesinceparallellineshaveaconstantdistancebetween them, but it can also be proved by drawing the segment andverifyingthattrianglesMYZandZP*MarecongruentbyAAS.)

ToprovethatM is themidpointof ,wefirstprovethat trianglesMXP*and YXY′ are similar. Notice that ∠MXP* and∠YXY′ are the same angle,∠P*MX =∠Y’YX since they are both right angles, and once we have twomatchingangles, thenthethirdanglemustmatchaswell,sincethesumof theangles is 180°. What is the scale factor between these similar triangles? Byconstruction,thelength

YY′=YZ+ZY′=2YZ=2MP*

sothescalefactoris2.Consequently,thelengthXMishalfthelengthofXY,andisthereforethemidpointof .

Summarizing, we have shown that the point P* on the upper line thatminimizestheperimeteroftriangleXYPliesdirectlyabovethemidpointof .

Sometimes geometry problems can be solved using algebra. For example,supposethelinesegment isdrawnontheplanewhereAhascoordinates(a1,a2) andB has coordinates (b1,b2). Then the midpointM, which is halfwaybetweenAandB,hascoordinates

Page 187: The Magic of Math: Solving for x and Figuring Out Why

asillustratedbelow.Forexample,ifA=(1,2)andB=(3,4),thenthemidpointof isM=((1+3)/2,(2+4)/2)=(2,3).

Themidpointofalinesegmentcanbefoundbytakingtheaverageofitsendpoints

Let’susethisideatoproveausefulfactabouttriangles.Drawatriangle,thenconnect the midpoints of any two sides with a line segment. Do you noticeanythinginteresting?Theanswerisgiveninthefollowingtheorem.

Trianglemidpoint theorem: Given any triangle ABC, if we draw a linesegmentconnectingthemidpointof withthemidpointof ,thenthatlinesegmentwillbeparalleltothethirdside .Moreover,ifthelengthof isb,thenthesegmentconnectingthemidpointswillhavelengthb/2.

Proof:PlacethetriangleABContheplaneinsuchawaythatpointA isattheorigin(0,0)andsideACishorizontalsothatpointCisatthepoint(b,0),asshownbelow.SupposethatpointBislocatedat(x,y).Thenthemidpointofhas coordinates (x/2,y/2) and themidpoint of will have coordinates ((x +b)/2,y/2). Since bothmidpoints have the same y-coordinate, the line segmentconnectingthemmustbehorizontal,soitwillbeparalleltoside .Moreoverthelengthofthislinesegmentis(x+b)/2−x/2=b/2,asdesired.

Page 188: The Magic of Math: Solving for x and Figuring Out Why

Whenthemidpointsoftwosidesofatriangleareconnectedbyalinesegment,thenthatsegmentisparalleltothethirdsideandhashalfofitslength

The trianglemidpoint theorem reveals the secret to themagic trick at thebeginningof this chapter. Startingwith quadrilateralABCD,we connected themidpointstoformasecondquadrilateralEFGH,whichalwaysturnedouttobeaparallelogram.Let’s seewhy thisworks. Ifwe imagine a diagonal line drawnfrom vertexA to vertexC, then this creates two trianglesABC andADC, asshownonthenextpage.

Bythetrianglemidpointtheorem, and arebothparallelto

ApplyingthetrianglemidpointtheoremtotrianglesABCandADC,wefindthat will be parallel to , and will be parallel to . Thus isparallel to . (Moreover, and have the same length, since they arebothhalfthelengthof .)Bythesamelogic,byimaginingthediagonallinefromBtoD,wegetthat and areparallelandhavethesamelength.ThusEFGHisaparallelogram.

Page 189: The Magic of Math: Solving for x and Figuring Out Why

Manyoftheprevioustheoremsdealtwithtriangles,andindeedingeometrya great deal of time is spent studying triangles. Triangles are the simplest ofpolygons, followed by quadrilaterals (4-sided polygons), pentagons (5-sidedpolygons),andsoon.Apolygonwithnsidesissometimescalledann-gon.Wehaveprovedthatthesumoftheanglesofanytriangleis180°.Whatcanbesaidof polygons with more than three sides? A quadrilateral, such as a square,rectangle, or parallelogram, has 4 sides. In a rectangle, all four angles have ameasureof90°,sothesumoftheanglesmustbe360°.Thenexttheoremshowsthatistrueforanyquadrilateral.Youmightcallthisa4-gonconclusion.(Sorry,Icouldn’tresist!)

Theorem:Thesumoftheanglesofaquadrilateralis360°.Proof:TakeanyquadrilateralwithverticesA,B,C,D like the one on the

nextpage.Bydrawinga linesegment fromA toC, thequadrilateral isbrokenintotwotriangles,eachofwhichhasananglesumof180°.Hencetheanglesofthequadrilateralsumto2×180°=360°.

Thesumoftheanglesofaquadrilateralis360°

Onemoretheoremshouldrevealthegeneralpattern.Theorem:Thesumoftheanglesofapentagonis540°.Proof:ConsideranypentagonwithverticesA,B,C,D,Eliketheonebelow.

Bydrawinga linesegmentfromAtoC, thepentagon isbroken intoa triangleandaquadrilateral.WeknowthattheanglesoftriangleABCsumto180°andbyour 4-gon conclusion, the sum of the angles of quadrilateral ACDE is 360°.Hencethesumoftheanglesofapentagonis180°+360°=540°.

Page 190: The Magic of Math: Solving for x and Figuring Out Why

Thesumoftheanglesofapentagonis540°

Weobtainthefollowingtheorembyrepeatingthisargumentforann-gonbydoing a proof by induction or by creating n − 2 triangles by drawing linesegmentsfromAtoallothervertices.

Theorem:Thesumoftheanglesofann-gonis180(n−2)degrees.Here’samagicalapplicationof this theorem.Drawanoctagon (an8-sided

polygon) and put 5 points anywhere inside it. Then connect the vertices andpointsinsuchawaythattheonlyshapesinsidetheoctagonaretriangles.(Thisis called a triangulation.) Below are two examples of different triangulations,withoneemptyforyoutotryyourself.

Inbothofmyexamples,weendedupwithexactly16triangles.Inthethirdoctagon,nomatterwhereyouplacethe5pointsinsideit,youshouldalsohaveexactly 16 triangles, if everything was done properly. (If you didn’t get 16triangles, look closely at every interior region andmake sure that it has onlythree points. If a triangular-looking region has four points, then you need toinsert another line segment to properly split it into two triangles.) Theexplanationforthiscomesfromthefollowingtheorem.

Theorem:Anytriangulationofapolygonwithnsidesandpinteriorpointswillcontainexactly2p+n−2triangles.

Inthepreviousexample,n=8andp=5,sothetheorempredictsexactly10

Page 191: The Magic of Math: Solving for x and Figuring Out Why

+8−2=16triangles.Proof:SupposethetriangulationhasexactlyTtriangles.WeprovethatT=

2p+n−2byansweringthefollowingcountingquestionintwoways.Question:Whatisthesumoftheanglesofallofthetriangles?Answer1:SincethereareT triangles,eachwithananglesumof180°, the

summustbe180Tdegrees.Answer 2: Let’s break the answer into two cases. The angles surrounding

each of thep interior pointsmust go all around the circle, so they contribute360p tothetotal.Ontheotherhand,fromourprevioustheorem,weknowthatthesumoftheanglesonthen-gonitselfis180(n−2)degrees.Hencethesumofalltheanglesis360p+180(n−2)degrees.

Equatingourtwoanswersgivesus

180T=360p+180(n−2)

Dividingbothsidesby180givesus

T=2p+n−2

aspredicted.

PerimetersandAreasTheperimeterofapolygonisthesumofthelengthsofitssides.Forexample,inarectanglewithabaseoflengthbandaheightoflengthh,itsperimeterwouldbe2b+2h, since ithas twosidesof lengthband twosidesof lengthh.Whatabouttheareaoftherectangle?Wedefinetheareaofa1-by-1square(theunitsquare) to have area 1.Whenb andh are positive integers, like in the figurebelow,wecanbreakup theregion intobh1-by-1squares,so itsarea isbh. Ingeneral,foranyrectanglewithbasebandheighth(wherebandharepositive,butnotnecessarilyintegers),wedefineitsareatobebh.

Page 192: The Magic of Math: Solving for x and Figuring Out Why

Arectanglewithbasebandheighthhasperimeter2b+2handareabh

Aside

Throughoutthischapter,wehaveusedalgebratohelpusexplaingeometry.But sometimes geometry can help us explain algebra too. Consider thefollowingalgebraproblem.Howsmallcanthequantity be,wherexisallowedtobeanypositivenumber?Whenx=1,weget2;whenx=1.25,weget1.25+0.8=2.05;whenx=2,weget2.5.Thedataseemtosuggestthatthesmallestanswerwecangetis2,andthat’strue,buthowcanwebesure?We’llfindastraightforwardwaytoanswerthisquestionwithcalculusinChapter11,butwitha little clevernesswecan solve thisproblemwithsimplegeometry.

Consider the geometric object belowmade up of four dominos, eachwithdimensionsxby1/x,strungtogethertoformasquarewithaholeinthemiddleofit.Whatistheareaofthewholeregion,includingthehole?

Page 193: The Magic of Math: Solving for x and Figuring Out Why

Ontheonehand,since the region isasquarewithside lengthx+1/x, itsareamustbe(x+1/x)2.Ontheotherhand,theareaofeachdominois1,sotheareaoftheregionmustbeatleast4.Consequently

(x+1/x)2≥4

whichimpliesthatx+1/x≥2,asdesired.

Startingwiththeareaofarectangle, it ispossibletoderivetheareaofjustaboutanygeometricalfigure.Firstandforemost,wederivetheareaofatriangle.

Theorem:Atrianglewithbaselengthbandheighthhasarea .Toillustrate,allthreetrianglesshownbelowhavethesamebaselengthband

thesameheighth,andthereforetheyallhavethesamearea.Thiswasessentiallythe content of question 3 at the beginning of the chapter, and it comes as asurprisetomany.

Theareaofatrianglewithbasebandheighthis .Thisistrue,regardlessofwhetherthetriangleis

Page 194: The Magic of Math: Solving for x and Figuring Out Why

right-angled,acute,orobtuse.

Thereare threecases toconsider,dependingon thesizeof thebaseangles∠Aand∠C.If∠Aor∠Cisarightangle,thenwecanmakeacopyoftriangleABC and put the two triangles together to form a rectangle of area bh, as isshownbelow.SincetriangleABCoccupieshalfoftherectangle’sarea,thenthetrianglemusthavearea ,asclaimed.

Tworighttrianglesofbasebandheighthcanformarectangleofareabh

When∠A and ∠C are acute angles, we offer a cute proof. Draw theperpendicularlinesegmentfromB to (calledanaltitudeof triangleABC),whichhaslengthh,intersectingatthepointwecallX,asshownbelow.

can be split into two segments and , which have respectivelengths b1 and b2, where b1 + b2 = b. And since BXA and BXC are righttriangles,thenthepreviouscasetellsusthattheyhaverespectiveareas and

.HencetriangleABChasarea

asdesired.WhenangleAorCisobtuse,wegetapicturethatlookslikethis.

Page 195: The Magic of Math: Solving for x and Figuring Out Why

In the acute case, we expressed triangle ABC as the sum of two righttriangles.HereweexpressABCasthedifferenceoftworighttriangles,ABYandCBY.ThebigrighttriangleABYhasbaselengthb+c,soithasarea .ThesmallerrighttriangleCBYhasarea .HencetriangleABChasarea

asdesired.

ThePythagoreanTheoremThePythagorean theorem, perhaps themost famous theoremof geometry andindeedoneofthemostfamousformulasinmathematics,deservesasectionofitsown.Inarighttriangle,thesideoppositetherightangleiscalledthehypotenuse.Theothertwosidesarecalledlegs.Therighttrianglebelowhaslegs andandhypotenuse ,withrespectivelengthsa,b,andc.

Pythagorean theorem: For a right triangle with leg lengths a and b andhypotenuselengthc,

a2+b2=c2

Page 196: The Magic of Math: Solving for x and Figuring Out Why

TherearereportedlyoverthreehundredproofsofthePythagoreantheorem,butwe’llpresentthesimplestoneshere.Feelfreetoskipsomeoftheproofs.Mygoal is that at least one of the proofsmakes you smile or say, “That’s prettycool!”

Proof 1: In the picture on the next page, we have assembled four righttrianglestocreateagiantsquare.

Question:Whatistheareaofthegiantsquare?Answer1:Eachsideofthesquarehaslengtha+b,sotheareais(a+b)2=

a2+2ab+b2.Answer2:Ontheotherhand,thegiantsquareconsistsoffourtriangles,each

withareaab/2,alongwithatiltedsquareinthemiddlewithareac2.(Whyisthemiddleobjecta square?Weknow thatall foursidesareequalandwecanusesymmetry to see that all four angles are equal: if we rotated the figure 90degrees,itwouldbeidentical,andsoeachofthemiddlesquare’sanglesmustbethesame.Sincethesumoftheanglesinaquadrilateralis360degrees,weknowthateachanglemustbe90degrees.)Thereforetheareais4(ab)/2+c2=2ab+c2.

Equatinganswers1and2givesus

a2+2ab+b2=2ab+c2

Computetheareaofthebigsquareintwodifferentways.Whenyoucompareyourtwoanswers,thePythagoreantheorempopsout.

Subtracting2abfrombothsidesgivesus

Page 197: The Magic of Math: Solving for x and Figuring Out Why

a2+b2=c2

asdesired.

Proof2:Using thesamepictureasabove,we rearrange the trianglesas inthefigurebelow.Inthefirstpicturetheareanotoccupiedbytrianglesisc2. Inthenewpicture,theareanotoccupiedbytrianglesisseentobea2+b2.Thusc2

=a2+b2,asdesired.

Comparetheareaofthewhitespaceinthisfigureandthepreviousone:a2+b2=c2

Proof3:Thistime,let’srearrangethefourtrianglestoformamorecompactsquareontheoppositepagewithareac2.(Onereasonthisobjectisasquareisthateachcorneriscomposedof∠Aand∠B,whichsumto90°.)Asbefore,thefourtrianglescontributeanareaof4(ab/2)=2ab.Thetiltedsquareinthemiddlehasarea(a−b)2=a2−2ab+b2.Hencethecombinedareaequals2ab+(a2−2ab+b2)=a2+b2,asdesired.

Page 198: The Magic of Math: Solving for x and Figuring Out Why

Theareaofthisfigureisbothc2anda2+b2

Proof4:Here’s a similar proof, and by that Imean, let’s exploitwhatweknowaboutsimilar triangles.Inright triangleABC,drawthelinesegmentperpendiculartothehypotenuse,asshownbelow.Notice

Bothofthetwosmallertrianglesaresimilartothelargeone

thatthetriangleADCcontainsbotharightangleand∠A,soitsthirdanglemustbecongruent to∠B.Likewise, triangleCDB has a right angle and∠B, so itsthird angle must be congruent to ∠A. Consequently, all three triangles aresimilar:

ΔACB~ΔADC~ΔCDB

Notethattheorderofthelettersmatters.Wehave∠ACB=∠ADC=∠CDB=90º are all right angles; likewise,∠A =∠BAC =∠CAD =∠BCDand∠B =∠CBA=∠DCA=∠DBC.Comparingsidelengthsfromthefirst twotrianglesgivesus

Page 199: The Magic of Math: Solving for x and Figuring Out Why

Comparingsidelengthsfromthefirstandthirdtrianglesgivesus

Addingtheseequations,wehave

AC2+BC2=AB×(AD+DB)

AndsinceAD+DB=AB=c,wehaveourdesiredconclusion:

b2+a2=c2

Thenextproofispurelygeometrical.Itusesnoalgebra,butitdoesrequiresomevisualizationskills.

Proof5:Thistimewestartwithtwosquares,withareasa2andb2,placedsidebyside,asbelow.Theircombinedareaisa2+b2.Wecandissectthisobjectintotworighttriangles(withsidelengthsaandbandhypotenuselengthc)andathird strange-looking shape. Note that the angle at the bottom of the strangeshapemustbe90°sinceitissurroundedby∠Aand∠B.Imagineahingeplacedintheupperleftcornerofthebigsquareandtheupperrightcornerofthesmallersquare.

Thesetwosquareswithareaa2+b2canbetransformedinto...

Now imagine that the bottom left triangle is “swiveled” 90° in a counter-clockwisedirectionsoitrestsontheoutsideofthetopofthelargesquare.Thenswiveltheothertriangleclockwise90°sothattherightanglesmatchupanditsitscomfortablyinthecornermadebythetwosquares,asshowninthefigure

Page 200: The Magic of Math: Solving for x and Figuring Out Why

above. The end result is a tilted square of area c2. Thus a2 + b2 = c2, aspromised.

...asquareofareac2!

We can apply the Pythagorean theorem to explain question 4 about thefootball field at the beginning of the chapter with a rope of length 361 feetconnectingtwogoalpoststhatare360feetapart.

BythePythagoreantheorem,h2+1802=180.52

Thedistancefromeithergoalposttothemiddleofthefieldis180feet.Afterthe rope is raised to its highest point, h, we create a right triangle, as shownbelow, with leg length 180 and hypotenuse 180.5. Thus by the Pythagoreantheorem,andafewlinesofalgebra,weget

Page 201: The Magic of Math: Solving for x and Figuring Out Why

Hencetheropewouldbehighenoughthatmosttruckscoulddriveunderit!

GeometricalMagicLet’sendthischapter,asitbegan,withamagictrickbasedongeometry.Mostproofs of the Pythagorean theorem involve rearranging the pieces of onegeometrical object to obtain another with the same area. But consider thefollowing paradox. Startingwith an 8-by-8 square, as pictured below, it lookslikewecancutitintofourpieces(allofwhichhaveFibonaccinumberlengthsof3,5,or8!), thenreassemblethosepiecestocreatea5-by-13rectangle.(Trythisyourself!)Butthisshouldbeimpossible,sincethefirstfigurehasarea8×8=64,whilethesecondfigurehasarea5×13=65.What’sgoingon?

Canasquareofarea64bereassembledtocreatearectangleofarea65?

Thesecrettothisparadoxisthatthediagonal“line”ofthe5-by-13rectangleisnotreallyastraightline.Forexample,thetrianglelabeledChasahypotenusewithslope3/8=0.375(sinceitsy-coordinateincreasesby3asitsx-coordinateincreasesby8),whereas,thetopofthefigurelabeledD(atrapezoid)hasaslopeof2/5=0.4(sinceitsy-coordinateincreasesby2asitsx-coordinateincreasesby5).Since the slopes are different, it doesn’t forma straight line, and the samephenomenonoccurswiththebottomsoftheuppertrapezoidandtriangleaswell.Hence, ifwe actually looked closely at the rectangle, like in the figureon theopposite page, we’d see a little bit of extra space between the two “almostdiagonallines.”Andinthatspace,spreadoutoveralargeregion,isexactlyoneextraunitofarea.

Page 202: The Magic of Math: Solving for x and Figuring Out Why

Therectanglecontainsoneunitofextraareaspreadoutacrossthediagonal

In thischapter,wederivedmany importantpropertiesof triangles,squares,rectangles,andotherpolygons,allofwhicharecreatedwithstraightlines.Theinvestigationofcirclesandothercurvedobjectswillrequiremoresophisticatedgeometricideasthroughtrigonometryandcalculus,allofwhichwilldependonthemagicalnumberπ.

Page 203: The Magic of Math: Solving for x and Figuring Out Why

CHAPTEREIGHT

3.141592653589…TheMagicofπ

CircularReasoningWe began the last chapter with some problems designed to challenge yourgeometricintuitionpertainingtorectanglesandtriangles,endingwithaproblemthatinvolvedaropeconnectingtwogoalpostsattheoppositeendsofafootballfield.Inthischapterourfocuswillbeoncircles,andwe’llbeginwithaproblemthatstartsbyputtingaropearoundtheEarth!

Page 204: The Magic of Math: Solving for x and Figuring Out Why

Question 1. Imagine that a rope is about to be tied around the Earth’sequator (approximately 25,000miles long).Before tying the ends together, anextra10feetofropeisadded.Ifwenowsomehowlifttheropesothatithoversover each point of the equator by the same distance, about how highwill theropebe?

A)Lessthanoneinchofftheground.B)Justhighenoughtocrawlunder.C)Justhighenoughtowalkunder.D)Highenoughtodriveatruckunder.

Question2.TwopointsXandYarefixedonacircle,asinthefigurebelow.WewishtochooseathirdpointZonthecirclesomewhereonthemajorarc(thelongarcbetweenXandY,nottheshortarc).WhereshouldwechoosethepointZtomaximizetheangle∠XZY?

A)PointA(oppositethemidpointofXandY).B)PointB(thereflectionofXthroughthecenterofthecircle).C)PointC(asclosetoXaswecan).D)Itdoesn’tmatter.Allangleswillhavethesamemeasure.

WhichpointonthemajorarcbetweenXandYresultsinlargestangle?Isitangle∠XAY,∠XBY,∠XCY,oraretheyallthesame?

Toanswerthesequestions,weneedtoimproveourunderstandingofcircles.(Well,Isupposeyoudon’tneedcirclestoreadtheanswers.TheanswersareBandD, respectively.But inorder toappreciatewhy theseanswersare true,we

Page 205: The Magic of Math: Solving for x and Figuring Out Why

needtounderstandcircles.)AcirclecanbedescribedbyapointOandapositivenumber r so that every point on the circle has a distance r away fromO, asshownontheoppositepage.ThepointOiscalledthecenterof thecircle.Thedistancer is called the radius of the circle.As amathematical convenience, alinesegment fromOtoapointPonthecircleisalsocalledaradius.

CircumferenceandAreaForanycircle,itsdiameterDisdefinedtobetwiceitsradius,andisthedistanceacrossthecircle.Thatis,

AcirclewithcenterO,radiusr,anddiameterD=2r

D=2r

The perimeter of a circle (its distance around) is called the circle’scircumference,denotedbyC.Fromthepicture, it isclear thatC isbigger than2D, since the distance along the circle fromP toQ is bigger thanD and thedistancefromQbacktoPisalsobiggerthanD.Consequently,C>2D. Ifyoueyeball it, youmight even convince yourself thatC is a little bigger than 3D.(Buttoseeitclearly,youmightneedtowear3-Dglasses.Sorry.)

Now,ifyouwantedtogoaboutcomparingacircularobject’scircumferencetoitsdiameter,youmightwrapastringaroundthecircumference.Thendividethelengthyoumeasuredbythediameter.You’llfind,regardlessofwhetheryou

Page 206: The Magic of Math: Solving for x and Figuring Out Why

aremeasuringacoin, thebaseofaglass,adinnerplate,oragianthulahoop,that

C/D≈3.14

Wedefinethenumberπ (pi,pronounced“pie”; theGreekletterfor the“p”sound) to be the exact constant that represents the ratio of a circle’scircumferencetoitsdiameter.Thatis,

π=C/D

andπ is the same for every circle! Or if you prefer, you can write this as aformulaforthecircumferenceofanycircle.GiventhediameterDorradiusrofanycircle,wehave

C=πD

or

C=2πr

Thedigitsofπbeginasfollows:

π=3.14159...

Wewillprovidemoredigitsofπ anddiscuss someof its numerical propertieslaterinthischapter.

Aside

Interestingly, the human eye is not so good at estimating circumferences.Forexample,takeanylargedrinkingglass.Whatdoyouthinkisbigger,itsheightoritscircumference?Mostpeoplethinktheheightisbigger,butit’susually the circumference. To convince yourself, put your thumb andmiddle finger on opposite sides of a glass to determine its diameter.Youwilllikelyseethatyourglassislessthan3diameterstall.

Page 207: The Magic of Math: Solving for x and Figuring Out Why

Wecannowanswerquestion1fromthebeginningofthechapter.Ifwethinkof the equator of theEarth as a perfect circlewith circumferenceC = 25,000miles,thenitsradiusmustbe

But we don’t actually need to know the value of the radius to answer thisquestion.Allwereallyneedtoknowishowmuchtheradiuswillchangeifweincreasethecircumferenceby10feet.Adding10feettothecircumferencewillcreateaslightlylargercirclewitharadiusthatislargerbyexactly10/2π=1.59feet.Hencetherewouldbeenoughspacebeneaththeropethatyoucouldcrawlunderit(butnotwalkunderit,unlessyouwerequitealimbodancer!).Whatisespeciallysurprisingaboutthisproblemisthattheanswerof1.59feetdoesnotdepend at all on the Earth’s actual circumference. You would get the sameanswerwith any planet orwith a ball of any size! For example, ifwe have acirclewithcircumferenceC = 50 feet, then its radius is 50/(2π) ≈ 7.96. Ifweincrease the circumference by 10 feet, then the new radius is 60/(2π) ≈ 9.55,whichisbiggerbyabout1.59feet.

Aside

Here’sanotherimportantfactaboutcircles.Theorem:LetXandYbeoppositepointsonacircle.Thenforanyother

pointPonthecircle,∠XPY=90º.Forexample,inthefigurebelow,angles∠XAY,∠XBY,and∠XCYare

allrightangles.

Page 208: The Magic of Math: Solving for x and Figuring Out Why

Proof:DrawtheradiusfromOtoP,andsuppose that∠XPO=xand∠YPO=y.Ourgoalistoshowthatx+y=90°.

Since and are radii of the circle, they both have length r, andtherefore triangle XPO is isosceles. By the isosceles triangle theorem,∠OXP =∠XPO =x. Similarly, is a radius and∠OYP =∠YPO =y.SincetheanglesoftriangleXYPmustsumto180°,wehave2x+2y=180°,andthereforex+y=90°,asdesired.

The theorem above is a special case of one of my favorite theoremsfromgeometry—thecentralangletheorem,describedinthenextaside.

Aside

Theanswertoquestion2fromthebeginningofthechapterisrevealedbythecentralangletheorem.LetXandYbeanytwopointsonthecircle.ThemajorarcisthelongerofthetwoarcsconnectingXandY.Theshorterarc

Page 209: The Magic of Math: Solving for x and Figuring Out Why

iscalledtheminorarc.Thecentralangletheoremsaysthattheangle∠XPYwill be the same for every point P on the major arc between X and Y.Specifically,angle∠XPYwillbehalfofthecentralangle∠XOY.IfQisontheminorarcfromXtoY,then∠XQY=180º−∠XPY.

Forexample,if∠XOY=100º,theneverypointPonthemajorarcfromXtoYhas∠XPY=50º,andeverypointQontheminorarcfromXtoYhas∠XQY=130º.

Oncewe know the circumference of a circle,we can derive the importantformulafortheareaofacircle.

Theorem:Theareaofacirclewithradiusrisπr2.Thisisaformulathatyouprobablyhadtomemorizeinschool,butitiseven

moresatisfyingtounderstandwhyitistrue.Aperfectlyrigorousproofrequirescalculus,butwecangiveaprettyconvincingargumentwithoutit.

Proof1:Thinkof a circle as consistingof a bunchof concentric rings, aspicturedonthefollowingpage.Nowcutthecirclefromthetoptoitscenter,asshown,thenstraightenouttheringstoformanobjectthatlookslikeatriangle.Whatistheareaofthistriangularobject?

Page 210: The Magic of Math: Solving for x and Figuring Out Why

Theareaofacirclewithradiusrisπr2

Theareaofatrianglewithbasebandheighthis .Forthetriangle-likestructurethebaseis2πr(thecircumferenceofthecircle)andtheheightisr(thedistance from the center of the circle to the bottom). Since the peeled circlebecomesmore andmore triangular as we use more andmore rings, then thecirclehasarea

asdesired.

Fora theoremsonice, let’sproveit twice!Thelastproof treatedthecirclelikeanonion.Thistimewetreatthecirclelikeapizza.

Proof 2: Slice the circle into a large number of equally sized slices, thenseparatethetophalffromthebottomhalfandinterweavetheslices.Weillustratewith8slices,thenwith16slices,onthenextpage.

As the number of slices increases, the slices becomemore andmore liketriangles with height r. Interlacing the bottom row of triangles (thinkstalagmites)withthetoprowoftriangles(stalactites)givesusanobject that isverynearlya rectanglewithheightrandbaseequal tohalf thecircumference,

Page 211: The Magic of Math: Solving for x and Figuring Out Why

namely πr. (To make it look even more like a rectangle, instead of aparallelogram,wecanchoptheleftmoststalactiteinhalfandmovehalfofittothefarright.)Sincetheslicedcircle

Anotherproof(bypizzapi?)thattheareaisπr2

becomesmoreandmorerectangularasweusemoreandmoreslices,thecirclehasarea

bh=(πr)(r)=πr2

aspredicted.

Weoftenwanttodescribethegraphofacircleontheplane.Theequationtodosoforacircleofradiusrcenteredat(0,0)is

x2+y2=r2

asseeninthegraphonthenextpage.Toseewhythisistrue,let(x,y)beanypoint on the circle, and draw a right trianglewith legs of length x and y andhypotenuser.ThenthePythagoreantheoremimmediatelytellsusthatx2+y2=

Page 212: The Magic of Math: Solving for x and Figuring Out Why

r2.

Acircleofradiusrcenteredat(0,0)hasformulax2+y2=r2andareaπr2

Whenr=1,theabovecircleiscalledtheunitcircle.Ifwe“stretch”theunitcircle by a factor of a in the horizontal direction and by a factor of b in theverticaldirection,thenwegetanellipse,liketheonebelow.

Theareaofanellipseisπab

Suchanellipsehastheformula

Page 213: The Magic of Math: Solving for x and Figuring Out Why

andhasareaπab,whichmakessense,becausetheunitcirclehasareaπandtheareahasbeenstretchedbyab.Noticethatwhena=b=r,wehaveacircleofradiusrandtheπabareaformulacorrectlygivesusπr2.

Herearesomefunfactsaboutellipses.Youcancreateanellipseby takingtwopins, a loopof string, andapencil.Stick twopinsonapieceofpaperorcardboard andwrap the string around the pinswith a little bit of slack. Placeyour pencil at one part of the string and pull the string taut so that the stringformsa triangle, as in the figurebelow.Thenmove thepencil around the twopins, keeping the string taut the entire time. The resulting diagramwill be anellipse.

Thepositionsofthepinsarecalledthefocioftheellipse,andtheyhavethefollowingmagicalproperty.Ifyoutakeamarbleorbilliardballandplaceitatone focus, thenhit theball inanydirection,afteronebounceoff theellipse itwillheadstraighttotheotherfocus.

Heavenlybodies likeplanetsandcomets travel around the sun inellipticalpaths.Ican’tresistthefollowingrhyme:

EveneclipsesArebasedonellipses!

Page 214: The Magic of Math: Solving for x and Figuring Out Why

Aside

Interestingly,thereisnosimpleformulaforthecircumferenceofanellipse.ButthemathematicalgeniusSrinivasaRamanujan(1887–1920)establishedthefollowingexcellentapproximation.Thecircumferenceofanellipse,asdescribedabove,isapproximately

Notice that when a = b = r, this reduces to , thecircumferenceofacircle.

The number π appears in three-dimensional objects as well. Consider acylinder, such as a can of soup. For a cylinder of radius r and height h, itsvolume(whichmeasureshowmuchroomtheshapetakesup)is

Vcylinder=πr2h

This formulamakes sense, since we can think of the cylinder asmade up ofcircleswithareaπr2stackedoneontopofanother(likeastackofroundcoastersatarestaurant)toaheightofh.

What is the surfacearea of the cylinder? In otherwords, howmuch paintwouldbenecessary topaint itsexterior, including the topandbottom?Youdonot need tomemorize the answer since you can figure it out by breaking thecylinderintothreepieces.Thetopandbottomofthecylindereachhaveanareaofπr2,sotheycontribute2πr2tothesurfacearea.Fortherestof thecylinder,cut thecylinderwithastraightcutfrombottomtotopandflattentheresultingobject.Theobjectwillbearectanglewithheighthandbase2πr,sincethat’sthecircumferenceof thesurroundingcircle.Sincethisrectanglehasarea2πrh, thetotalsurfaceareaofthecylinderis

Acylinder=2πr2+2πrh

Page 215: The Magic of Math: Solving for x and Figuring Out Why

Asphere isa three-dimensionalobjectwhereallpointsareafixeddistanceawayfromitscenter.Whatisthevolumeofasphereofradiusr?Suchaspherewouldfitinsideacylinderofradiusrandheight2r,soitsvolumemustbelessthanπr2(2r)=2πr3.As luck(andcalculus)wouldhave it, thesphereoccupiesexactlytwo-thirdsofthatspace.Inotherwords,thevolumeofasphereis

The surface areaof a spherehas a simple formula that is not so simple toderive:

Asphere=4πr2

Let’s end this sectionwith examples ofwhereπ appears in ice cream andpizza.Imagineanicecreamconewithheighth,andwherethecircleatthetophasradiusr.Letsbetheslantheightfromthetipoftheconetoanypointonthecircle,asshownbelow.(WecancalculatesfromthePythagoreantheorem,sinceh2+r2=s2.)

Theconehasvolumeπr2h/3andsurfaceareaπrs

Suchaconewouldfitinsideacylinderwithradiusrandheighth,soitisnosurprise that the cone’s volume is less than πr2h. But it is a surprise (andcompletely unintuitivewithout using calculus) that the volume is exactly one-

Page 216: The Magic of Math: Solving for x and Figuring Out Why

thirdofthatnumber.Inotherwords,

Althoughwecanderivethesurfaceareawithoutcalculus,wejustdisplayitforitseleganceandsimplicity.Thesurfaceareaofaconeis

Acone=πrs

Finally,considerapizzawithradiuszandthicknessa,asshownbelow.Whatwoulditsvolumebe?

Whatisthevolumeofthispizzawithradiuszandthicknessa?

Thepizzacanbe thoughtof as anunusually shapedcylinderwith radiuszandheighta,soitsvolumemustbe

V=πz2a

Buttheanswerwasreallystaringyouinthefaceallalong,sinceifwespellouttheanswermorecarefullyweget

V=pizza

Somesurprisingappearancesofπ

Page 217: The Magic of Math: Solving for x and Figuring Out Why

It’snosurprisetoseeπshowupinareasandcircumferencesofcircularobjectsliketheoneswehaveseen.Butπshowsupinmanypartsofmathematicswhereitdoesn’tseemtobelong.Take,forexample,thequantityn!,whichweexploredin Chapter 4. There is nothing particularly circular about this number. It islargely used for counting discrete quantities.We know that it’s a number thatgrowsextremelyfast,andyetthereisnoefficientshortcutforcomputingn!.Forinstance, computing 100,000! still requiresmany thousands ofmultiplications.And yet there is a useful way to estimate n! using Stirling’s approximation,whichsaysthat

wheree=2.71828...(anotherimportantirrationalnumberthatwewilllearnallabout in Chapter 10). For instance, a computer can calculate that to foursignificant figures, 64! = 1.269 × 1089. Stirling’s approximation says that

.(Isthereashortcuttoraisinganumberto

the64thpower?Yes!Since64=26,youjuststartwith64/e,andsquare it sixtimes.)

Thefamousbellcurve, picturedbelow,which appears throughout statisticsand all of the experimental sciences, has a height of .We’ll saymoreaboutthiscurveinChapter10.

Theheightofthebellcurveis

Page 218: The Magic of Math: Solving for x and Figuring Out Why

Thenumberπalsooftenappearsininfinitesums.ItwasLeonhardEulerwhofirst showed that when we add the squares of the reciprocals of the positiveintegers,weget

1+1/22+1/32+1/42+···=1+1/4+1/9+1/16+···=π2/6

Andifwesquareeachoftheaboveterms,thesumofthereciprocalsoffourthpowersturnsouttobe

1+1/16+1/81+1/256+1/625+···=π4/90

In fact, there are formulas for the sumof reciprocals of everyeven power 2k,producingananswerofπ2k,multipliedbyarationalnumber.

Whataboutpowersofoddreciprocals?InChapter12,wewillshowthatthesumofthereciprocalsofthepositiveintegersisinfinite.Withoddpowersbiggerthan1,likethesumofthereciprocalsofthecubes,

1+1/8+1/27+1/64+1/125+···=???

thesumisfinite,butnobodyhasfiguredoutasimpleformulaforthesum.Paradoxically,πpopsupinproblemspertainingtoprobability.Forexample,

ifyou randomlychoose twovery largenumbers, thechance that theyhavenoprime factors in common is a little over 60 percent. More precisely, theprobabilityis6/π2=.6079....Itisnocoincidencethatthisisthereciprocaloftheanswertooneofourearlierinfinitesums.

DigitsofπBy doing your own careful measurements, you can experimentally determinethatπ is a little bit bigger than 3, but two questions naturally arise. Can youprovethatπisnear3withouttheuseofphysicalmeasurements?Andisthereasimplefractionorformulaforπ?

Wecananswerthefirstquestionbydrawingacircleofradius1,whichweknowhasareaπ12=π.Inthefigurebelow,wehavedrawnasquarewithsidesoflength2thatcompletelycontainsthecircle.Sincetheareaofthecirclemustbelessthantheareaofthesquare,thisprovesthatπ<4.

Page 219: The Magic of Math: Solving for x and Figuring Out Why

Ageometricalproofthat3<π<4

Ontheotherhand, thecirclealsocontainsahexagonatsixequallyspacedpoints along the circle.What is the perimeter of the inscribed hexagon? Thehexagoncanbebroken into6 triangles,eachwithacentralangleof360° /6=60°. Two sides of each triangle are radii of the circle with length 1, so thetriangleisisosceles.Bytheisoscelestriangletheorem,theothertwoanglesareequal,andmust thereforealsobe60°.Hence, these trianglesareallequilateralwithsidesoflength1.Theperimeterofthehexagonis6,whichislessthanthecircumferenceof2π.Thus6<2π,andsoπ>3.Puttingitalltogether,wehave

3<π<4

Aside

Wecanrestrictπ toasmaller intervalbyusingpolygonswithmoresides.For example, if we surround the unit circle with a hexagon instead of asquare,wecanprovethat ....

Page 220: The Magic of Math: Solving for x and Figuring Out Why

Once again, the hexagon can be subdivided into six equilateral triangles.Eachofthesetrianglescanbesubdividedintotwocongruentrighttriangles.Iftheshortleghaslengthx,thenthehypotenusehaslength2x,andbythePythagorean theorem, x2 + 1 = (2x)2. Solving for x gives us .Consequently,theperimeterofthehexagonis ,andsincethisisgreater than the circle’s circumference, 2π, it follows that .(Interestingly,wereachthesameconclusionbycomparingtheareaofthecircletotheareaofthehexagon.)

The great ancient Greekmathematician Archimedes (287 to 212 BC)builtonthisresulttocreateinscribedandcircumscribedpolygonswith12,24, 48, and 96 sides, leading to 3.14103< π< 3.14271 and the simplerlookinginequality

Therearemanysimplewaystoapproximateπasafraction.Forexample,

Iparticularlylikethelastapproximation.Notonlydoesitcorrectlygiveπtosixdecimalplaces,butitalsousesthefirstthreeoddnumberstwice:two1s,two3s,andtwo5s,inorder!

Page 221: The Magic of Math: Solving for x and Figuring Out Why

Naturally, it would be interesting to find a fraction that gave usπ exactly(wherethenumeratoranddenominatorsareintegers;otherwisewecouldsimplysay ).In1768,JohannHeinrichLambertprovedthatsuchasearchwouldbefutile,byshowingthatπisirrational.Perhapsitcouldbewrittenintermsofsquarerootsorcuberootsofsimplenumbers?Forexample, . . . isprettyclose.Butin1882,FerdinandvonLindemannprovedthatπismorethanjust irrational. It is transcendental, whichmeans thatπ is not the root of anypolynomialwithintegercoefficients.Forexample, isirrational,butitisnottranscendental,sinceitisarootofthepolynomialx2−2.

Althoughπcannotbeexpressedasafraction,itcanbeexpressedasthesumorproductoffractions,providedweuseinfinitelymanyofthem!Forexample,wewillseeinChapter12that

The formula above is beautiful and startling, yet it is not a very practicalformulaforcalculatingπ.After300terms,wearestillnotanyclosertoπ than22/7 is.Here’sanotherastounding formula,calledWallis’s formula,whereπ isexpressedasaninfiniteproduct,althoughitalsotakesalongtimetoconverge.

CelebratingandMemorizingπ(andτ)Because of people’s fascination with π (and as a way to test the speed andaccuracy of supercomputers), π has been calculated to trillions of digits. Wecertainlydon’tneedtoknowπtothatlevelofaccuracy.Withjustfortydigitsofπ,youcanmeasurethecircumferenceoftheknownuniversetowithintheradiusofahydrogenatom!

Thenumberπ hasdevelopedalmost a cult following.Manypeople like tocelebratethenumberπonPiDay,March14(withnumericrepresentation3/14),whichalsohappenstobethebirthdateofAlbertEinstein.AtypicalPiDayevent

Page 222: The Magic of Math: Solving for x and Figuring Out Why

might consist of mathematically themed pies for display and consumption,Einstein costumes, and of courseπ memorization contests. Students generallymemorize dozens of digits of π, and it is not unusual for the winner to havememorized over a hundred digits. By theway, the currentworld record forπmemorization belongs toChaoLu ofChina,who in 2005 recitedπ to 67,890decimalplaces!AccordingtotheGuinnessBookofWorldRecords,Lupracticedforfouryearstoreachthismanydigits,andittookhimalittleovertwenty-fourhourstoreciteallthedigits.

Beholdthefirst100digitsofπ:

π=3.141592653589793238462643383279502884197169399375105820974944592307816406286208998628034825342117067...

Overtheyears,peoplehavecomeupwithcreativewaystomemorizethedigitsofπ.Onemethodistocreatesentenceswherethelengthofeachwordgivesusthe next digit of π. Some famous examples include “How I wish I couldcalculate pi” (which yields seven digits: 3.141592) and “How Iwant a drink,alcoholic of course, after the heavy lectures involving quantum mechanics”(whichprovidesfifteendigits).

A most impressive example was written in 1995 by Mike Keith, whogenerated 740 digits in an amazing parody of Edgar Allan Poe’s poem “TheRaven.”The first stanza, alongwith the title,generates42digits.The stanza’s“disturbing”ten-letterwordgeneratesthedigit0.

Poe,E.NearaRaven

Midnightssodreary,tiredandweary.Silentlyponderingvolumesextollingallby-nowobsoletelore.Duringmyratherlongnap—theweirdesttap!Anominousvibratingsounddisturbingmychamber’santedoor.“This,”Iwhisperedquietly,“Iignore.”

Keithwenton toextend thismasterpiecebywritinga3835-digit “CadaeicCadenza.”(NotethatifyoureplaceCwith3,Awith1,Dwith4,andsoon,then“cadaeic” becomes 3141593.) It begins with the “Raven” parody, but alsoincludes digital commentaries and parodies of other poems such as LewisCarroll’s “Jabberwocky.” His most recent contribution to this genre isNot aWake:ADreamEmbodyingπ’sDigitsFullyfor10000Decimals.(Notethewordlengthsinthebook’stitle!)

Page 223: The Magic of Math: Solving for x and Figuring Out Why

The word length method for memorizing π suffers from a significantproblem.Evenifyoucouldmemorizethesentences,poems,andstories,itisnotsoeasytoinstantlydeterminethenumberoflettersineachword.OrasIliketosay, “How I wish I could elucidate to others. There are often superiormnemonics!”(whichyieldsthirteendigits).

Myfavoritewaytomemorizenumbersisthroughtheuseofaphoneticcodecalledthemajorsystem.Inthiscode,everydigitisrepresentedbyoneormoreconsonantsounds.Specifically,

1=tord2=n3=m4=r5=l6=j,ch,orsh7=korhardg8=forv9=porb0=sorzThere are even mnemonics for memorizing this mnemonic system! My

friendTonyMarloshkovipsoffers thefollowingsuggestions.Theletter t(oritsphonetically similar d) has 1 downstroke; n has 2 downstrokes; m has 3downstrokes; “four” ends in the letter r; displaying 5 fingers, you see an Lbetweenyourindexfingerandyourthumb;abackward6lookslikeaj;two7scanbedrawntoformaK;askaterdoesa figure8; turning the9backwardorupsidedown,youobtainporb;“zero”beginswithz.Orifyouprefer,youcanput all the consonants in order, TNMRLShKVPS, and you getmy (fictitious)friend’sname:TonyMarloshkovips.

Wecanusethiscodetoturnnumbersintowordsbyinsertingvowelsoundsaround the associated consonant sounds. For example, the number 31, whichusesconsonantsmandt(ormandd),canbeturnedintowordslike

31=mate,mute,mud,mad,maid,mitt,might,omit,muddy

Notice that a word like “muddy” or “mitt” is acceptable, since the d or tsoundonlyoccursonce.Spellingdoesn’tmatter.Sincetheconsonantsoundsofh,w, and y are not represented on the list, then it is acceptable to use thosesoundsasfreelyasvowels.Thus,wecouldalsoturn31intowordslike“humid”or“midway.”Noticethatalthoughanumbercanoftenberepresentedbymany

Page 224: The Magic of Math: Solving for x and Figuring Out Why

differentwords,awordcanonlyberepresentedbyasinglenumber.The first three digits ofπ,with consonant soundsm, t, and r, can become

wordslike

314=meter,motor,metro,mutter,meteor,midyear,amateur

Thefirst fivedigits31415,canbecome“my turtle.”Extending this to the firsttwenty-fourdigitsofπ,314159265358979323846264canbecome

MyturtlePanchowill,mylove,pickupmynewmoverGinger

Iturnthenextseventeendigits33832795028841971,into

Mymoviemonkeyplaysinafavoritebucket

I like the next nineteen digits, 6939937510582097494, since they allow somelongwords:

ShipmypuppyMichaeltoSullivan’sbackrubber

Thenexteighteendigitsofπ,459230781640628620,couldgiveus

AreallyopenmusicvideocheersJennyF.Jones

followedbytwenty-twomoredigits,8998628034825342117067:

HaveababyfishknifesoMarvinwillmarinatethegoosechick!

Thus,withfivesillysentences,wehaveencodedthefirstonehundreddigitsofπ!

The phonetic code is quite useful for memorizing dates, phone numbers,creditcardnumbers,andmore.Tryit,andwithalittlebitofpractice,youwillvastlyimproveyourabilitytoremembernumbers.

All mathematicians agree that π is one of the most important numbers inmathematics.But if you look at the formulas and applications that useπ, youwill find that most of them have π multiplied by 2. The Greek letter τ (tau,rhymeswith“wow”)hasbeenadoptedtorepresentthisquantity

τ=2π

Page 225: The Magic of Math: Solving for x and Figuring Out Why

Manypeoplebelieve that ifwe couldgoback in time,mathematical formulasand key concepts in trigonometry would be expressed more simply using τinstead ofπ. These ideas have been elegantly and entertainingly expressed inarticlesbyBobPalais(“πisWrong!”)andMichaelHartl(“TheTauManifesto”).The“centralpoint”of theargument is thatcirclesaredefinedin termsof theirradius,andwhenwecomparethecircumferencetotheradius,wehaveC/r=2π=τ.Sometextbooksarenowlabeledas“τ-compliant”toindicatethattheywillexpressformulasintermsofbothπandτ.(Althoughswitchingtothisconstantmaynotbe“easyaspie,”manystudentsandteacherswillagreethatτiseasierthan π.) It will be interesting to see what happens to this movement in thecomingdecades.Supportersofτ(whocallthemselvestauists)earnestlybelievethattheyhavethetruthontheirside,buttheyaretolerantofthemoretraditionalnotation.Astheyliketosay,tauistsareneverpious.

Here are the first one hundred digits of τ with spaces inserted for themnemonicsgivenafterward.Notethatτbeginswiththenumbers6and28,bothofwhichareperfectnumbers,asdescribedinChapter6.Is thatacoincidence?Ofcourse!Butit’safuntidbitanyway.τ = 6.283185 30717958 64769252 867665 5900576 839433 8798750211641949889184615632812572417997256069650684234135...In 2012, thirteen-year-old Ethan Brown established a world record by

memorizing2012digitsofτasafund-raisingproject.Heusedthephoneticcode,but instead of creating long sentences, he created visual images, where eachimagecontainedasubject,anaction(alwaysendingin-ing)andanobjectbeingacted upon. The first seven digits, 62 831 85, became “An ocean vomiting awaffle.”Herearehisimagesforthefirstonehundreddigitsofτ.

AnoceanvomitingawaffleAmasktuggingonabailiffAsharkchoppingnylonFudgecoachingacelloElbowssellingacouchFoamburyingamummyFogpavingglassAhandoutshreddingapropFIFAbeautifyingtheIrishAdollshooingaminnowAphotonlookingneurotic

Page 226: The Magic of Math: Solving for x and Figuring Out Why

ApuppyacknowledgingthesewageApeachlosingitschauffeurHoneymarryingoatmeal

Tomake the images even easier to remember,Brown adopted thememorypalaceapproachbyimagininghimselfwanderingthroughhisschool,andashewalkeddowncertainpassagewaysandenteredvariousclassrooms,therewouldbethreetofiveobjectsdoingsillythingsineachroom.Ultimately,hehad272images split upamongmore than60 locations. It tookhimabout4monthsofpreparationtorecitethe2012digits,whichhedidin73minutes.

Let’sendthischapterwithamusicalcelebrationofπ.IwrotethisasalyricaladditiontoLarryLesser’sparody,“AmericanPi.”Youshouldonlysingthesongonce,becauseπdoesn’trepeat.

Along,long,timeago,Icanstillrememberhowmymathclassusedtomakemesnore.’CauseeverynumberwewouldmeetWouldterminateorjustrepeat,Butmaybetherewerenumbersthatdidmore.

Butthenmyteachersaid,“IdareyaTotrytofindthecircle’sarea.”Despitemyeveryaction,Icouldn’tfindafraction.

Ican’trememberifIcried,ThemoreItriedorcircumscribed,ButsomethingtouchedmedeepinsideThedayIlearnedofpi!

Pi,pi,mathematicalpi,Twiceelevenoversevenisamightyfinetry.Agoodoldfractionyoumayhopetosupply,Butthedecimalexpansionwon’tdie.Decimalexpansionwon’tdie.

Pi,pi,mathematicalpi,3.141592653589.

Page 227: The Magic of Math: Solving for x and Figuring Out Why

Agoodoldfractionyoumayhopetodefine,Butthedecimalexpansionwon’tdie!

Page 228: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERNINE

20°=π/9TheMagicofTrigonometry

TheHighPointofTrigonometryThesubjectof trigonometryallowsus tosolvegeometricalproblemsthatcan’tbe solved using classical geometry. For example, consider the followingproblem.

Question:Usingonlyaprotractorandpocketcalculator,determinetheheightofanearbymountain.

Wewill provide five differentmethods for solving this problem. The firstthreemethodsactuallyrequirealmostnomathwhatsoever!

Method1(bruteforceapproach):Climbtothetopofthemountainandhurlyourcalculatoroffthemountain.(Thismayrequireconsiderableforce.)Measurethetimeittakesforyourcalculatortohittheground(orlistenforthescreamofabackpackerbelow).Ifthetimeistseconds,andifweignoretheeffectsofairresistanceandterminalvelocity,thenstandardphysicsequationsindicatethattheheight of the mountain is approximately 16t2 feet. The disadvantage of thisapproach is that theeffectsofair resistanceand terminalvelocitycanbequitesignificant, so your calculation will be inaccurate. Also, you are unlikely torecoveryourcalculator.Anditrequiresatimekeepingdevice,whichmighthave

Page 229: The Magic of Math: Solving for x and Figuring Out Why

beenonyourcalculator.Theadvantageofthismethodisthattheprotractordoesnotneedtobeused.

Method2 (methodof tangents):Find a friendlypark ranger andoffer heryourshinynewprotractorifshetellsyoutheheightofthemountain.Ifnoparkranger can be found, look for a gentlemanwith a nice tan who has probablyspent considerable time outdoors and might well know the answer to yourquestion.Theadvantageofthisapproachisthatyoumaymakeanewfriendandyoudon’tneedtosurrenderyourcalculator.Also,ifyouaresuspiciousofthetangent’s response, you can still climb the mountain and apply method 1. Thedisadvantageisthatyoumayloseyourprotractorandbeaccusedofbribery.

Method3(lawofsigns):Beforeattemptingmethod1or2,lookforapostedsign that tellsyou theheightof themountain.Thishas theadvantage thatyoudon’tneedtosurrenderanyofyourequipment.

Ofcourse,ifnoneofthesethreemethodsappealtoyou,thenwemustresorttomoremathematicalsolutions,whicharethesubjectofthischapter.

TrigonometryandTrianglesThe word “trigonometry” has Greek roots trigon and metria, which literallymeans triangle measurement. We begin with the analysis of some classictriangles.

Isosceles right triangle. In an isosceles right triangle, there is a 90° angle,andtheothertwoanglesmustbeequal.Theotheranglesarethus45°(sincethesumoftheanglesis180°),sowerefertosuchatriangleasa45-45-90triangle.If both legs have length 1, then by the Pythagorean theorem, the hypotenusemusthavelength .Notethatallisoscelesrighttriangleswillhavethesameproportionsof ,aspicturedbelow.

Page 230: The Magic of Math: Solving for x and Figuring Out Why

Ina45-45-90triangle,thesidelengthsareproportionalto

30-60-90triangle.Inanequilateraltriangle,allsideshaveequallength,andall anglesmeasure60°. Ifwedivideanequilateral triangle into twocongruenthalves,aspicturedbelow,weobtain two right triangleswithanglesmeasuring30°,60°,and90°.Ifthesidesoftheequilateraltriangleallhavelength2,thenthe hypotenuse of the right trianglewill have length 2, and the short legwillhave length 1. By the Pythagorean theorem, the long leg will have height

.Thusall30-60-90triangleshavethesameproportions,(orasIrememberit,theyareaseasyas1,2, ).Inparticular,ifthehypotenusehaslength1,thentheothersidelengthsare1/2and .

Ina30-60-90triangle,thesidesareproportionalto ,respectively

Aside

When positive integers a, b, c satisfy a2 + b2 = c2, we call (a, b, c) aPythagoreantriple.Thesmallestandsimplesttripleis(3,4,5),butthereareinfinitelymanymore.Naturally, you could scale your triple by a positiveintegertogettripleslike(6,8,10)or(9,12,15)or(300,400,500),butwewould like more interesting examples. Here’s a clever way to createPythagoreantriples.Chooseanytwopositivenumbersmandnwherem>n.Nowlet

a=m2−n2 b=2mn c=m2+n2

Page 231: The Magic of Math: Solving for x and Figuring Out Why

Notice thata2+b2= (m2−n2)2+ (2mn)2 =m4 + 2m2n2 +n4,whichequals (m2+n2)2=c2,so(a,b,c) is aPythagorean triple.For example,choosingm=2,n=1produces(3,4,5);(m,n)=(3,2)givesus(5,12,13);(m,n)=(4,1)yields(15,8,17);(m,n)=(10,7)yields(51,140,149).Whatisespeciallyremarkable(andisprovedinanycourseonnumbertheory)isthateveryPythagoreantriplecanbecreatedbythisprocess.

Alloftrigonometryisbasedontwoimportantfunctions:thesineandcosinefunctions. Given a right triangleABC, as pictured below,we let c denote thelengthofthehypotenuseandletaandbdenotethelengthsofthesidesopposite∠Aand∠B,respectively.

ForangleA(whichisnecessarilyacuteinarighttriangle),wedefinethesineof∠A,denotedsinA,tobe

Similarly,wedefinethecosineof∠Atobe

(NotethatanyrighttrianglewithangleAwillbesimilartotheoriginaltriangleandwillhavesidesofproportional length,sothesineandcosineofAwillnotdependonhowlargethetriangleis.)

After sine and cosine, the next most commonly used function intrigonometryisthetangentfunction.Wedefinethetangentof∠Atobe

Page 232: The Magic of Math: Solving for x and Figuring Out Why

Intermsoftherighttriangle,wehave

Therearemanymnemonics for remembering theformulas forsine,cosine,andtangent.Themostpopularoneis“SOHCAHTOA,”whereSOHremindsusthat sine is opposite/hypotenuse, and similarly for CAH and TOA. My highschoolteacherusedamnemonic(whichassumedthatyouproceededinorderofsine,thencosine,thentangent)ofOscarHasAHeapOfApples(OH-AH-OA).MyfriendsmodifiedthistobecomeOliviaHasAHairyOldAunt!

Forexample,inthe3-4-5trianglebelow,wehave

Forthe3-4-5righttriangle,sinA=3/5,cosA=4/5,tanA=3/4

Nowwhatabout∠Binthesametriangle?Ifwecalculateitssineandcosinevalues,weseethat

HerewehavesinB=cosAandcosB=sinA.Thisisnotacoincidence,sinceforanyangle∠A, theotheracuteanglewillswitchwhat itconsiders tobetheopposite sideand theadjacent side,but itwill stillhave the samehypotenuse.

Page 233: The Magic of Math: Solving for x and Figuring Out Why

Since∠A+∠B=90º,wehaveforanyacuteangle

sin(90°−A)=cosA cos(90°−A)=sinA

Thus, forexample, ifa right triangleABChas∠A=40º, then its complement∠B = 50º has the property sin 50°= cos 40° and cos 50°= sin 40°. In otherwords, the complement sine is equal to the cosine (which is where the word“cosine”comesfrom).

There are three other functions that should be part of your trigonometricvocabulary,but theywon’tbeusednearlyasmuchas thefirst three functions.Theyarethesecant,cosecant,andcotangentfunctions,andtheyaredefinedas

You can easily verify that the “co”-functions have the same complementaryrelationships that sine and cosine do. Namely, for any acute angle in a righttriangle,sec(90°−A)=cscAandtan(90°−A)=cotA.

Onceyouknowhowtocomputethesineofanangle,youusecomplementstofindthecosineofanyangle,andfromthoseyoucancomputetangentsandtheother trig functions.But howdo you calculate a sine value, like sin 40°?Thesimplestwayistojustuseacalculator.Mycalculator(indegreemode)tellsmethatsin40°=0.642....Howdoesitdothatcalculation?We’llexplainthatneartheendofthischapter.

Thereareahandfuloftrigvaluesthatyoushouldknowwithoutneedingtoresort toacalculator.Recall that a30-60-90 trianglehas sidesproportional to

,asshownpreviously.Consequently,

and

Andsincea45-45-90trianglehassidesproportionalto ,wehave

Since ,Idon’tthinkitisnecessarytomemorizeanyvaluesofthe

Page 234: The Magic of Math: Solving for x and Figuring Out Why

tangentfunctionexceptperhapstan45°=1andthattan90°isundefined sincecos90°=0.

Beforewedeterminetheheightofamountainusingtrigonometry,let’sfirstsolve the simpler problemof determining the height of a tree. (Would that beusingtwigonometryortreegonometry?)

Supposeyoustood10feetfromatree,andtheanglefromthegroundtothetop of the treewas 50°, as pictured on the opposite page. (By theway,mostsmartphoneshaveappsthatmeasureangles.Withmoreprimitivetools,onecancreate a functional angle measurer, called a clinometer, using a protractor, astraw,andapaperclip.)

Howtallisthetree?

Lethdenotetheheightofthetree.Itfollowsthat

andthereforeh=10tan50°,whichaccordingtothecalculatorequals10(1.19...)≈11.9,sothetreeisabout11.9feettall.

We are now prepared to answer the mountain question by our firstmathematicalmethod.Thechallenge is thatwedon’tknowourdistance to thecenter of the mountain. Essentially we have two unknowns (the mountain’sheight and its distance from us), so we collect two pieces of information.Supposewemeasuretheanglefromourpositiontothetopofthemountainandfind theangle tobe40°, thenmove1000feet furtherawayfromthemountainandfindthattheanglenowmeasures32°,asshownonthenextpage.Let’suse

Page 235: The Magic of Math: Solving for x and Figuring Out Why

thisinformationtoapproximatethesizeofthemountain.Method4(methodoftangents):Lethdenotetheheightofthemountain,and

let x be our initial distance from the mountain (so x is the length of ).LookingattherighttriangleBCD,wecomputetan40°≈0.839,andtherefore

whichimpliesh=0.839x.FromtriangleABC,wehave

soh=0.625(x+1000)=0.625x+625.Equatinghfrombothexpressions,weget

0.839x=0.625x+625

which has solution x = 625/(0.214) ≈ 2920. Consequently,h is approximately0.839(2920)=2450,sothemountainisapproximately2450feethigh.

TrigonometryandCirclesSofar,wehavedefinedtrigonometricfunctionsintermsofarighttriangle,andIstrongly encourage you to be comfortable with that definition. However, thisdefinition has the shortcoming that it allows us to find the sine, cosine, andtangentonlywhentheangleisstrictlybetween0°and90°(sincearighttrianglealwayscontainsa90°angleandtwoacuteangles).Inthissection,wedefinethe

Page 236: The Magic of Math: Solving for x and Figuring Out Why

trigonometric functions in termsof theunitcircle,whichwill allowus to findsines,cosines,andtangentsforanyanglewhatsoever.

Recallthattheunitcircleisacircleofradius1,centeredattheorigin(0,0).It has equation x2 + y2 = 1, which we derived in the last chapter using thePythagoreantheorem.SupposeIaskedyoutodeterminethepoint(x,y)on theunitcirclethatcorrespondstoacuteangleA,measuredinthecounterclockwisedirectionfromthepoint(1,0),asshowninthenextfigure.

Thepoint(x,y)ontheunitcirclecorrespondingtoangleAhasx=cosAandy=sinA

Wecanfindxandybydrawinga right triangleandapplyingour formulasforcosineandsine.Specifically,

and

Page 237: The Magic of Math: Solving for x and Figuring Out Why

Inotherwords,thepoint(x,y)isequalto(cosA,sinA).(Moregenerally,ifthecirclehasradiusr,then(x,y)=(rcosA,rsinA).)

For any angleA,we extend this idea by defining (cosA, sinA) to be thepointontheunitcircleidentifiedwithangleA.(Inotherwords,cosA isthex-coordinateandsinAisthey-coordinateofthepointonthecirclewithangleA.)Here’sthebigpicture.

ThegeneraldefinitionofcosAandsinA

Here’s another big picture, where we have subdivided the unit circle intoangles that are 30° apart (with 45° thrown in for good measure), since thesecorrespond to theanglesof thespecial triangleswe lookedatearlier.Wehavelistedthecosineandsinevaluesfor0°,30°,45°,60°,and90°.Specifically,

Page 238: The Magic of Math: Solving for x and Figuring Out Why

Aswe’llsee,multiplesoftheseanglescanbecalculatedbyreflectingthevaluesfromthefirstquadrant.

Sinceaddingorsubtracting360°toanangledoesn’treallychangetheangle(itliterallytakesusfullcircle),wehaveforanyangleA,

sin(A±360°)=sinA cos(A±360°)=cosA

Anegativeanglemovesintheclockwisedirection.Forexample,theangle−30°is the same as the angle 330°. Notice that when you moveA degrees in theclockwise direction, you have the same x-coordinate as when you move A

Page 239: The Magic of Math: Solving for x and Figuring Out Why

degrees in the counterclockwise direction, but the y-coordinates will haveoppositesigns.Inotherwords,foranyangleA,

cos(−A)=cosA sin(−A)=−sinA

Forexample,

WhenwereflectangleAacrossthey-axis,weget thesupplementaryangle180−A.Thiskeepsthey-valueontheunitcircleunchanged,butthex-valueisnegated.Inotherwords,

cos(180−A)=−cosA sin(180−A)=sinA

Forinstance,whenA=30°,

We continue to define the other trigonometric functions as before, forinstance,tanA=sinA/cosA.

The x-axis and y-axis divide the plane into four quadrants. We call thesequadrants I, II, III, and IV, where quadrant I has angles between 0° and 90°;quadrant IIhasanglesbetween90°and180°;quadrant IIIhasanglesbetween180°and270°;andquadrantIVhasanglesbetween270°and360°.NotethatthesineispositiveinquadrantsIandII,thecosineispositiveinquadrantsIandIV,andthereforethetangentispositiveinquadrantsIandIII.SomestudentsusethemnemonicAllStudentsTakeCalculus(A,S,T,C)torememberwhichofthetrigfunctionsarepositiveineachrespectivequadrant(all,sine,tangent,cosine).

Thelastbitofvocabularyworthlearninginvolvestheinversetrigonometricfunctions,which areuseful fordeterminingunknownangles.For example, theinversesineof1/2,denotedassin−1(1/2),tellsustheangleAforwhichsinA=1/2.Weknowthatsin30°=1/2,so

sin−1(1/2)=30°

The sin−1 function (also called the arc sine function) always gives an anglebetween−90°and90°,butbeaware that thereareotheranglesoutsideof this

Page 240: The Magic of Math: Solving for x and Figuring Out Why

interval that have the same sinevalue.For example, sin150°=1/2, as is anymultipleof360°addedto30°or150°.

For the 3-4-5 triangle pictured on the opposite page, our calculator candetermineangleAinthreedifferentwaysthroughinversetrigfunctions:

∠A=sin−1(3/5)=cos−1(4/5)=tan−1(3/4)≈36.87º≈37º

Inversetrigfunctionscandetermineanglesfromsidelengths.Here,sinceA=(3/4),∠A=tan−1(3/4)≈37º.

It’s time to put these trigonometric functions to work. In geometry, thePythagoreantheoremtellsus the lengthof thehypotenusegiventhe lengthsofthe legs of any right triangle. In trigonometry, we can perform a similarcalculationforanytriangleusingthelawofcosines.

Theorem(lawofcosines):ForanytriangleABC,wherethesidesoflengthaandbform∠C,thethirdsideoflengthcsatisfies

c2=a2+b2−2abcosC

Forexample,inthetrianglebelow,triangleABChassidesoflength21and26witha15°anglebetweenthem.Soaccordingtothelawofcosines,thethirdsideoflengthcmustsatisfy

c2=212+262−2(21)(26)cos15°

andsincecos15°≈0.9659,thisequationreducestoc2=62.21,andthereforec≈7.89.

Page 241: The Magic of Math: Solving for x and Figuring Out Why

Aside

Proof:Toprovethelawofcosines,weconsiderthreecases,dependingonwhether∠C isarightangle,acute,orobtuse.If∠C isa rightangle, thencosC=cos90°=0,sothelawofcosinessimplysaysthatc2=a2+b2,whichistruebythePythagoreantheorem.

If∠Cisacute,asinthefigureabove,drawtheperpendicularlinefromB to intersecting at pointD; this splitsABC into two right triangles.From thepictureaboveand thePythagorean theoremapplied toCBD,wehavea2=h2+x2,andtherefore

h2=a2−x2

FromtriangleABD,wehavec2=h2+(b−x)2=h2+b2−2bx+x2,andtherefore

h2=c2−b2+2bx−x2

Settingtheabovevaluesofh2equaltoeachothergivesus

Page 242: The Magic of Math: Solving for x and Figuring Out Why

c2−b2+2bx−x2=a2−x2

andtherefore

c2=a2+b2−2bx

AndfromrighttriangleCBD,weseethatcosC=x/a,sox=acosC.Thus,when∠Cisacute,

c2=a2+b2−2abcosC

If∠Cisobtuse,thenwecreatetherighttriangleCBDontheoutsideofthetriangle,asshowninthefigureopposite.

Fromright trianglesCBDandABD,Pythagoras tellsus thata2=h2+x2

andc2=h2+(b+x)2.Thistime,whenweequatethevaluesh2,weget

c2=a2+b2+2bx

Thistime,triangleCBDtellsusthatcos(180°−C)=x/a,sox=acos(180°−C)=−acosC.Soonceagain,wegetthedesiredequation

c2=a2+b2−2abcosC

Bytheway,thereisalsoaniceformulafortheareaoftheprevioustriangle.Corollary: For any triangleABC,where the sides of lengtha and b form

∠C,

Page 243: The Magic of Math: Solving for x and Figuring Out Why

areaoftriangle

Aside

Proof:Theareaofatrianglewithbasebandheighthis .Inallthreecasescovered in the law of cosines proof, the triangle has a base b; now let’sdetermineh.Intheacutecase,observethatsinC=h/a,soh=asinC. Intheobtusecase,wehavesin(180°−C)=h/a,soh=asin(180°−C)=asinC,asbefore.Intheright-angledcase,h=a,whichequalsasinC,sinceC=90°andsin90°=1.Thus,sinceh=asinCinallthreecases,theareaofthetriangleis sinC,asdesired.

Asaconsequenceofthiscorollary,noticethat

andtherefore

Inotherwords,forthetriangleABC,(sinC)/cistwicetheareaofABCdividedby theproduct of the lengthsof all of its sides.But therewasnothing specialabout angleC in this statement.Wewould get the same conclusion from (sinB)/bor(sinA)/a.Consequently,wehave justproved thefollowingveryusefultheorem.

Theorem(lawofsines):ForanytriangleABCwithrespectivesidelengthsa,b,andc,

Page 244: The Magic of Math: Solving for x and Figuring Out Why

orequivalently,

We can apply the law of sines to determine the height of themountain adifferentway.This time,wefocusona,ouroriginaldistance to the topof themountain,asintheillustrationbelow.

Findingthemountain’sheightwithlawofsines

Method5(lawofsines):IntriangleABD,∠BAD=32º,∠BDA=180º−40º,andtherefore∠ABD=8º.Applyingthelawofsinestothistriangle,wehave

Multiplyingbothsidesbysin32°,wegeta=1000sin32°/sin8°≈3808feet.Next,sincesin40≈0.6428=h/a,itfollowsthat

h=asin40≈(3808)(.6428)=2448

so themountain isabout2450feethigh,which isconsistentwithourpreviousanswer.

Aside

Page 245: The Magic of Math: Solving for x and Figuring Out Why

Here’sanotherprettyformulaworthknowing,calledHero’sformula,whichtellsustheareaofatrianglefromitssidelengthsa,b,andc.Theformulaisstraightforwardonceyoucalculatethesemi-perimeter

Hero’sformulasaysthattheareaofthetrianglewithsidelengthsa,b,cis

For example, a trianglewith side lengths 3, 14, 15 (first five digits ofπ)would have s = (3 + 14 + 15)/2 = 16. Therefore the triangle has area

.Hero’sformulacanbederivedfromthelawofcosinesandalittlebitof

heroicalgebra.

TrigonometricIdentitiesTrigonometricfunctionssatisfymanyinterestingrelationships,calledidentities.Wehaveseenafewofthemalready,like

sin(−A)=−sinA cos(−A)=cosA

but there are other interesting identities leading to useful formulas, whichwewillexploreinthissection.Thefirstidentitycomesfromtheformulafortheunitcircle:

x2+y2=1

Since the point (cos A, sin A) is on the unit circle, it must satisfy thatrelationship, and therefore (cosA)2− (sinA)2 = 1. This gives us perhaps themostimportantidentityinalloftrigonometry.

Theorem:ForanyangleA,

Page 246: The Magic of Math: Solving for x and Figuring Out Why

cos2A+sin2A=1

SofarwehavemainlybeenusingtheletterAtorepresentanarbitraryangle,butthereiscertainlynothingspecialaboutthatletter.Theidentityaboveisoftenstatedwithotherletters.Forinstance,

cos2x+sin2x=1

TheGreekletterθ(theta)isanotherpopularchoice

cos2θ+sin2θ=1

Andsometimeswesimply refer to the identitywithoutanyvariableatall.Forinstance,wemightabbreviatethetheoremas

cos2+sin2=1

Before proving the other identities, let’s apply thePythagorean theorem tocomputethelengthofalinesegment.Thiswillbekeytotheproofofourfirstidentity,andit’sausefulresultbyitself.

Theorem(distanceformula):LetLbethelengthofthelinesegmentfrom(x1,y1)to(x2,y2).Then

Forexample,thelengthofthelinesegmentfrom(−2,3)to(5,8)wouldbe.

Page 247: The Magic of Math: Solving for x and Figuring Out Why

FromthePythagoreantheorem,L2=(x2−x1)2+(y2−y1)

2

Proof:Considertwopoints(x1,y1)and(x2,y2)asinthefigureabove.Drawarighttrianglesothatthelinesegmentconnectingthemisthehypotenuseofarighttriangle.Inourpicture,thelengthofthebaseisx2−x1,andtheheightisy2−y1.HencebythePythagoreantheorem,thehypotenuseLsatisfies

L2=(x2−x1)2+(y2−y1)2

andtherefore ,asdesired.

Note that the formulaworks evenwhenx2<x1ory2 < y1. For instance,whenx1=5andx2=1,thedistancebetweenx1andx2is4,andeventhoughx2−x1=−4,thesquareofthatnumberis16,whichisallthatmatters.

Aside

Inaboxofdimensionsa×b×c,whatisthelengthofthediagonal?LetOandPbediagonallyoppositecornersofthebaseofthebox.Thebaseisana×brectangle,sothediagonal haslength .

Page 248: The Magic of Math: Solving for x and Figuring Out Why

NowifwegostraightupadistancecfromP,wereachthepointQthatisintheoppositecorner fromO.To find thedistance fromO toQ, notice thattriangleOPQ isarighttrianglewithleglengths andc.Hence,bythePythagoreantheorem,thelengthofthediagonal is

Wearenowreadytoproveatrigonometricidentitythatisbothelegantanduseful.Theproofofthistheoremisalittletricky,sofeelfreetoskipit,butthegoodnews is thatoncewehavedone thehardwork toestablish it, thenmanymoreidentitieswillimmediatelyfollow.

Theorem:ForanyanglesAandB,

cos(A−B)=cosAcosB+sinAsinB

Proof:OntheunitcirclecenteredatOpicturedonthenextpage,letPbethepoint(cosA,sinA)andQbethepoint(cosB,sinB).Supposeweletcdenotethelengthof .Whatcanwesayaboutc?

Page 249: The Magic of Math: Solving for x and Figuring Out Why

Thispicturecanbeusedtoprovecos(A−B)=cosAcosB+sinAsinB

IntriangleOPQ,weseethat and arebothradiioftheunitcircle,sothey have length 1 and the angle∠POQ between them has measure A −B.Therefore,bythelawofcosines,

Ontheotherhand,fromthedistanceformula,csatisfies

c2=(x2−x1)2+(y2−y1)2

so the distance c from pointP = (cosA, sinA) to pointQ = (cos B, sin B)satisfies

Page 250: The Magic of Math: Solving for x and Figuring Out Why

wherethelastlineusedcos2B+sin2B=1andcos2A+sin2A=1.Equatingthetwoexpressionsforc2tellsus

2−2cos(A−B)=2−2cosAcosB−2sinAsinB

Subtracting2frombothsides,thendividingby−2givesus

cos(A−B)=cosAcosB+sinAsinB

Aside

The proof of the cos(A − B) formula relied on the law of cosines andassumedthat0°<A−B<180°.Butwecanalsoprovethetheoremwithoutmaking those assumptions. If we rotate the previous triangle POQclockwiseBdegrees,weobtainthecongruenttriangleP′OQ′whereQ′isonthex-axisatthepoint(1,0).

Since∠P′OQ′=A−B,wehaveP′=(cos(A−B),sin(A−B)).Thusifweapplythedistanceformulato ,wehave

Page 251: The Magic of Math: Solving for x and Figuring Out Why

sowe can conclude thatc2= 2− 2 cos(A −B)without using the lawofcosinesormakinganyassumptionsabouttheangleA−B.Therestoftheprooffollowsasbefore.

NoticethatwhenA=90°,thecos(A−B)formulasays

sincecos90°=0andsin90°=1. Ifwe replaceBwith90°−B in theaboveequation,weget

Earlier,wesawthatthesetwostatementsweretruewhenBisanacuteangle,butthealgebraabovemakesittrueforallanglesB.Likewise,ifwereplaceBwith−Binthecos(A−B)theorem,weobtain

sincecos(−B)=cosBandsin(−B)=−sinB.WhenweletB=Aabove,wegetthedoubleangleformula:

cos(2A)=cos2A−sin2A

andsincecos2A=1−sin2Aandsin2A=1−cos2A,wealsoget

cos(2A)=1−2sin2Aandcos(2A)=2cos2A−1

We can build on these cosine identities to get related sine identities. For

Page 252: The Magic of Math: Solving for x and Figuring Out Why

example,

SettingB=Agivesusadoubleangleformulaforsines,namely

sin(2A)=2sinAcosA

OrreplacingBwith−B,wehave

sin(A−B)=sinAcosB−cosAsinB

Let’ssummarizemanyoftheidentitiesthatwehavelearnedinthischaptersofar.

Page 253: The Magic of Math: Solving for x and Figuring Out Why

Someusefultrigonometricidentities

Again,IshouldpointoutthatalthoughwehavewrittentheidentitiesusingangleAorB,thereisnothingparticularlyspecialabouttheseletters.Youmightwellseethemwrittenwithotherangles.Forinstance,cos(2u)=cos2u−sin2uorsin(2θ)=2sinθcosθ.

RadiansandTrigonometricGraphsSo far in our discussion of geometry and trigonometry,we have assigned ouranglesameasurethatrangesfrom0to360degrees.Butifyoulookattheunitcircle, there isnothingparticularlynaturalabout thenumber360.Thisnumberwas chosen by the ancient Babylonians, probably since they used a base 60numbersystemanditisapproximatelythenumberofdaysinayear.Instead,formostareasofscienceandmathematics,itispreferabletomeasureanglesusingradians.Wedefine

2πradians=360°

Orequivalently,

Orforthetauistsouttherewholikeτ=2π,

Numerically, 1 radian is approximately 57°.Why are radiansmore naturalthandegrees?Onacircleofradiusr,anangleof2πradianscapturesthecircle’scircumferenceof2πr. Ifwetakeanyfractionofthatangle, thentheamountofarcthatwecaptureis2πr timesthatfraction.Specifically,1radiancapturesanarcoflength2πr(1/2π)=randmradianswouldcaptureanarcoflengthmr.Insummary,ontheunitcircle,theangleinradiansisequaltoitscorrespondingarclength.Howconvenient!

Page 254: The Magic of Math: Solving for x and Figuring Out Why

Acirclehas2πradians

Hereistheunitcirclewithsomecommonanglesgiveninradians.

Andhere’saτversionforcomparison.

Page 255: The Magic of Math: Solving for x and Figuring Out Why

Youcanseefromthepicturesoneofthereasonssomemathematicianspreferτoverπ.Fora90°angle,whichisone-quarterofthecircle,theradianmeasureisτ/4. For 120°,which is one-third of the circle, themeasure is τ/3. Indeed, theletterτwaschosen since it suggested theword turn.For instance,360° isoneturnof the circle andhas radianmeasure τ; 60° isone-sixthof a turn andhasradianmeasureτ/6.

As we’ll see later in this book, the formulas for computing trigonometricfunctionsaremuchcleanerwhenusingradiansinsteadofdegrees.Forexample,we can compute sines and cosines as “infinitely long polynomials” with theformulas

sinx=x−x3/3!+x5/5!−x7/7!+x9/9!−...

cosx=1−x2/2!+x4/4!−x6/6!+x8/8!−...

but these formula only work when x is expressed in radians. Likewise, incalculus,wewill see that thederivative of sinx is cosx, but that is only truewhenxisinradians.Thegraphsoftrigonometricfunctionsy=sinxandy=cosxareoftengivenwhenxismeasuredinradians.

Page 256: The Magic of Math: Solving for x and Figuring Out Why

Thegraphsofsinxandcosx,wherethexvariableismeasuredinradians

Because of the circular nature of sines and cosines, both graphs repeatthemselves every 2π units. (Score another point for the tauists!) This makessense because the angle x + 2π is the same as the angle x.We say that thesegraphshaveperiod2π.Moreover,ifyoushiftthecosinegraphtotherightbyπ/2units,itcompletelycoincideswiththesinegraph.That’sbecauseπ/2radiansis90°,andtherefore

Forexample,sin0=0=cos(−π/2)andsinπ/2=1=cos0.Sincetanx=sinx/cosx,itisundefinedwhenevercosx=0(whichhappens

halfway between each multiple of π). The graph of the tangent function hasperiodπ,asshownbelow.

Page 257: The Magic of Math: Solving for x and Figuring Out Why

Thegraphofy=tanx

You can combine sine functions and cosine functions to create almost anyfunctionthatbehavesinaperiodicway.Thisiswhytrigonometricfunctionsareinstrumental in modeling seasonal behavior like temperatures and economicdata,orphysicalphenomenasuchassoundandwaterwaves,electricity,or thebeatingofyourheart.

Let’s end with a magical connection between trigonometry and π. On acalculator, type as many 5s as you can. My calculator allows5,555,555,555,555,555. Now take the reciprocal of this number. On mycalculator,Iget

1/5,555,555,555,555,555=1.8×10−16

Next press the sin buttononyour calculator (in degreemode) and look at theleadingdigits(ignoringanyinitialstringsofzerosthatmayappear).Theansweronmydisplayis

3.1415926535898×10−18

which (after a decimal point, followed by seventeen 0s) are the digits ofπ toseveralplaces!Infact,youshouldgetasimilarpi-culiarresultifyoustartwithanynumberof5s—aslongasyouhaveatleastfiveofthem.

In this chapter,wehave seenhow trigonometryhelpsusbetter understandtrianglesandcircles.Trigonometric functions interactwitheachother inmanybeautifulways, andwe have seen how they are intimately connectedwith thenumberπ.Inthenextchapter,wewillseethattheyarealsointertwinedwithtwoother fundamental numbers, the irrational number e = 2.71828 . . . and the

Page 258: The Magic of Math: Solving for x and Figuring Out Why

imaginarynumberi.

Page 259: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERTEN

eiπ+1=0TheMagicofiande

TheMostBeautifulMathematicalFormulaEveryonceinawhile,mathematicsandsciencejournalssurveytheirreaderstochoose themostbeautifulmathematicalequations. Inevitably,at the topof thislististhefollowingformula,attributedtoLeonhardEuler:

eiπ+1=0

Sometimespeoplerefertothisas“God’sequation”becauseitusesperhapsthefivemostimportantnumbersinmathematics:0and1,whicharethefoundationsofarithmetic;π,themostimportantnumberingeometry;e, themostimportantnumberincalculus;andi,whichmaybethemostimportantnumberinalgebra.Even more than that, it uses the fundamental operations of addition,multiplication, and exponentiation. Although we have a good idea about themeaning of 0, 1, andπ, it is the goal of this chapter to explore the irrationalnumbereandtheimaginarynumberisothatwhenwearefinished,theformulawillbealmostasobvioustousas1+1=2(oratleastaseasyascos180°=−1).

Page 260: The Magic of Math: Solving for x and Figuring Out Why

Aside

Herearesomeothermathematicalequations thatwerealsocontenders forbeing most beautiful. Most of these formulas appear in this book; somehavealreadybeendiscussed,whileothersarestilltocome!ThefirsttwooftheseformulaswerealsodiscoveredbyLeonhardEuler.

1. Inanypolyhedron(asolidfiguremadeupofflatfaces,straightlineedges, and sharp corners called vertices)withV vertices,E edges,andFfaces,

V−E+F=2

For example, a cube has 8 vertices, 12 edges, and 6 faces, and itsatisfiesV−E+F=8−12+6=2.

2.1+1/4+1/9+1/16+1/25+…=π2/6

3.1+1/2+1/3+1/4+1/5+…=∞

4.0.99999...=1

5. Stirling’sapproximationforn!:

6. Binet’sformulaforthenthFibonaccinumber:

TheImaginaryNumberi:TheSquareRootof−1

Page 261: The Magic of Math: Solving for x and Figuring Out Why

Thenumberihasthemysteriouspropertythat

i2=−1

Whenpeople firsthear that, they tend to think that it’s impossible.Howcananumbertimesitselfbenegative?Afterall,02=0andanegativenumbertimesitselfmustbepositive.Butbeforeyoutotallydismisstheidea,itispossiblethatthere was a time in your life when you thought that negative numbers wereimpossible(asmostmathematiciansdidforcenturies).Whatdoesitmeanforanumbertobelessthan0?Howcansomethingbelessthannothing?Eventually,youcame toviewnumbersasoccupantsof thereal line shownopposite,withpositive numbers to the right of 0 and negative numbers to the left of 0. In asimilarway,we’llneedtothinkoutsidethebox(oroutsidetheline,anyway)toappreciatei,butoncewedo,wewillfindthatithasaveryrealsignificance.

Thereallinedoesnotcontainimaginarynumbers.Wherecouldtheybehiding?

Wecallianimaginarynumber.Animaginarynumberisanynumberwhosesquareisanegativenumber.Forexample,theimaginarynumber2isatisfies(2i)(2i)=4i2=−4.Algebrawithimaginarynumbersworksjustlikeitdoeswithrealnumbers.Forinstance,

3i+2i=5i, 3i−2i=1i=i, 2i−3i=−1i=−i

and

Bytheway,notethatthenumber−ialsohasasquareof−1,since(−i)(−i)=i2=−1.Multiplyingarealnumberbyanimaginarynumberhaspredictableresults.Forexample,3×2i=6i.

Whathappenswhenyouaddarealnumberandanimaginarynumber?For

Page 262: The Magic of Math: Solving for x and Figuring Out Why

instance,what is3plus4i?Theanswer is just that:3+4i. It doesn’t simplifyfurther(inthesamewaythatwedon’tsimplify Numbersoftheforma+bi(whereaandbarerealnumbers)arecalledcomplexnumbers.Notethatrealand imaginary numbers can be considered special cases of complex numbers(whereb=0anda=0,respectively).Thustherealnumberπandtheimaginarynumber7iarealsocomplex.

Let’s do some examples of (not so) complex arithmetic, beginning withadditionandsubtraction:

(3+4i)+(2+5i)=5+9i

(3+4i)−(2+5i)=1−i

FormultiplicationweusetheFOILrulefromalgebrainChapter2:

With complex numbers, every quadratic polynomialax2+bx +c has tworoots (or one repeated root). From the quadratic formula, the polynomial willequal0whenever

InChapter2,wesaidtherewerenorealsolutionsifthenumberunderthesquarerootwasnegative,butnownegativesquarerootsdon’tbotherus.Forexample,theequationx2+2x+5hasroots

Bytheway,thequadraticformulastillworksevenwhena,b,orciscomplex.Quadratic polynomials always have at least one root, although it may be

complex.Thenexttheoremsaysthatthisistrueforalmostallpolynomials.Theorem (Fundamental theorem of algebra): Every polynomial p(x) of

degree1orhigherhasarootzwherep(z)=0.

Page 263: The Magic of Math: Solving for x and Figuring Out Why

Noticethatafirst-degreepolynomiallike3x−6canbefactoredas3(x−2),where2istheonlyrootof3x−6.Ingeneral,ifa≠0,thepolynomialax−bcanbefactoredasa(x−(b/a))whereb/aistherootofax−b.

Similarly,foreverysecond-degreepolynomialax2+bx+c,wecanfactoritasa(x−z1)(x−z2)wherez1andz2are(possiblycomplex,possiblythesame)roots of the polynomial. As a consequence of the fundamental theorem ofalgebra,thispatternextendstopolynomialsofanydegree.

Corollary:Everypolynomialofdegreen≥1canbe factored intonparts.Morespecifically,ifp(x) isannth-degreepolynomialwith leading terma≠0,thenthereexistnnumbers(possiblycomplex,possiblythesame)z1,z2,...,znsuchthatp(x)=a(x−z1)(x−z2)···(x−zn).Thenumbersziaretherootsofthepolynomialwherep(zi)=0.

Thiscorollarymeansthateverypolynomialofdegreen≥1hasatleastone,andatmostn,distinctroots.Forexample,thepolynomialx4−16hasdegree4andcanbefactoredas

x4−16=(x2−4)(x2+4)=(x−2)(x+2)(x−2i)(x+2i)

andhas fourdistinct roots2,−2, 2i,−2i.Thepolynomial3x3+9x2− 12 hasdegree3,butsinceitfactorsas

3x3+9x2−12=3(x2+4x+4)(x−1)=3(x+2)2(x−1)

ithasonlytwodistinctroots,−2and1.

TheGeometryofComplexNumbersThecomplexnumberscanbevisualizedbydrawingthecomplexplane.Itlooksjustlikethe(x,y)planefromalgebra,butthey-axishasbeenreplacedwiththeimaginary axis with numbers like 0,±i,±2i, and so on.We have plotted somecomplexnumbersinthefigurebelow.

Page 264: The Magic of Math: Solving for x and Figuring Out Why

Somepointsinthecomplexplane

Wehaveseenhoweasyitistoadd,subtract,andmultiplycomplexnumbersnumerically. But we can also perform these operations geometrically, just bylookingattheirpointsonthecomplexplane.

Forexample,considertheadditionproblem

(3+2i)+(−1+i)=2+3i

Inthefigurebelow,noticethatthepoints0,3+2i,2+3i,and−1+iformtheverticesofaparallelogram.

Page 265: The Magic of Math: Solving for x and Figuring Out Why

In general, we can add complex numbers z andw geometrically, just bydrawing a parallelogram, as in the previous example. To do the subtractionproblemz−w,weplotthepoint−w(whichislocatedsymmetricallyoppositew)andaddthepointszand−w,asillustratedbelow.

Complexnumberscanbeaddedandsubtractedbydrawingparallelograms

In order to multiply and divide complex numbers geometrically, we firstneedtomeasure theirsizes.Wedefine the length (ormagnitude)ofacomplexnumberz,denoted|z|, tobe the lengthof the linesegmentfromtheorigin0 tothepointz.Specifically, ifz=a+bi, thenby thePythagorean theorem, zhaslength

Page 266: The Magic of Math: Solving for x and Figuring Out Why

Forexample,asillustratedbelow,thepoint3+2ihaslength .Notethattheangleθcorrespondingto3+2iwouldsatisfytanθ=2/3.Thusθ=tan−12/3≈33.7°orabout0.588radians.

Thecomplexnumberz=3+2ihaslength ,andanangleθwheretanθ=2/3

If you plot the points that have length 1, you get the unit circle on thecomplex plane, shown on the next page.What is the complex number on thecircle associatedwith angleθ? If thiswere thex-yCartesian plane, then fromChapter9weknowthatitwouldbethepoint(cosθ,sinθ).Sointhecomplexplane,thiswouldbecosθ+isinθ.Likewise,anycomplexnumberwithlengthRisoftheform

z=R(cosθ+isinθ)

Wecallthisthepolarformofthecomplexnumber.MaybeIshouldn’ttellyouthisnow,butat theendof thischapter,wewill learn that this is alsoequal toReiθ.(Wouldthatbea“spEuleralert”?)

Page 267: The Magic of Math: Solving for x and Figuring Out Why

Theunitcircleinthecomplexplane

Remarkably,whencomplexnumbersaremultiplied,theirlengthsmultiplyaswell.

Theorem:Forcomplexnumbersz1andz2,|z1z2|=|z1||z2|.Inotherwords,thelengthoftheproductistheproductofthelengths.

Aside

Proof: Let z1 = a + bi and z2 = c + di. Then and.Thus,

Page 268: The Magic of Math: Solving for x and Figuring Out Why

Forexample,

What about the angle of the product? The notation arg z is often used todenotetheanglethatthecomplexnumberzmakeswiththepositivex-axis.Forinstance, we saw that arg(3 + 2i) = 0.588 radians. Likewise, since 1−3i is inquadrantIVanditsanglesatisfiestanθ=−3,wehavearg(1−3i)=tan−1(−3)=−71.56°=−1.249radians.

Note that (3 + 2i)(1 − 3i) = (9 − 7i) has angle tan−1(−7/9) = −37.87° =−0.661radian,whichjusthappenstobe0.588+(−1.249).Accordingtothenexttheorem,thisisnotacoincidence!

Theorem:Forcomplexnumbersz1andz2,arg(z1z2)=arg(z1)+arg(z2).Inotherwords,theangleoftheproductisthesumoftheangles.

Theproof,presentedinthefollowingbox,reliesontrigonometricidentitiesfromthepreviouschapter.

Aside

Page 269: The Magic of Math: Solving for x and Figuring Out Why

Proof:Supposethatz1andz2arecomplexnumberswithrespectivelengthsR1 andR2 and respective angles θ1, and θ2. Then, writing z1 and z2 inpolarform,wehave

z1=R1(cosθ1+isinθ1) z2=R2(cosθ2+isinθ2)

Therefore,

whereweexploitedtheidentitiesforcos(A+B)andsin(A+B),whichwerederivedlastchapter.Consequently,z1z2haslengthR1R2(whichweknew)andangleθ1+θ2,aswastobeshown.

To summarize, when multiplying complex numbers, you simply multiplytheirlengthsandaddtheirangles.Forexample,whenmultiplyinganumberbyi,thelengthstaysthesame,buttheangleincreasesby90°.Noticethatwhenwemultiply real numbers together, the positive numbers have angles of 0° (orequivalently, 360°) and the negative numbers have angles of 180°.When youaddanglesof180°together,yougetanangleof360°,whichisanotherwayofsaying that the product of two negative numbers is a positive number. Theimaginary numbers have angles of 90° and −90° (or 270°). Thus, when youmultiplyanimaginarynumberbyitself,theanglemustbe180°(since90°+90°= 180° or −90° + −90° = −180° is the same as 180°), which is a negativenumber.Finally,notethatifzhasangleθ,then1/zmusthaveangle−θ. (Why?Since z · 1/z = 1, the angles for z and 1/z must sum to 0°.) Therefore, whendividing complex numbers, you divide their lengths and subtract their angles.Thatis,z1/z2haslengthR1/R2andangleθ1−θ2.

Page 270: The Magic of Math: Solving for x and Figuring Out Why

TheMagicofeIfyouhaveascientificcalculator,pleasetrythefollowingexperiment.

1. Enteramemorableseven-digitnumberonyourcalculator(perhapsaphonenumberoridentificationnumber,ormaybeyourfavoriteone-digitnumberrepeatedseventimes).

2. Take the reciprocal of that number (by pressing the 1/x button on yourcalculator).

3. Add1toyouranswer.

4. Now raise this number to the power of your original seven-digit number(bypressingthexybutton,followedbyyourseven-digitnumber,followedbytheequalssign).

Does your answer begin 2.718? In fact, it wouldn’t surprise me if youranswerbeganwithseveraldigitsoftheirrationalnumber

e=2.718281828459045...

So what is this mysterious number e, and why is it so important? In themagictrickyoujustperformed,youcalculated

(1+1/n)n

Page 271: The Magic of Math: Solving for x and Figuring Out Why

forsomelargenumbern.Now,whatwouldyouexpecttohappentothisnumberasngetslargerandlarger?Onthe“one”hand,asngetslarger,thenumber(1+1/n)getscloserandclosertothenumber1,andwhenweraise1toanypower,westillget1.Thusitwouldbereasonabletoexpectthatforverylargevaluesofn,(1+1/n)nwouldbeapproximately1.Forexample,(1.001)100≈1.105.

Ontheotherhand,evenwhennislarge,(1+1/n)isstillslightlybiggerthan1.And ifyouraiseanyfixednumber that isbigger than1 to largerand largerpowers, then thatquantitygets arbitrarily large.For example, (1.001)10,000 isover20,000.

Theproblemisthatthebase(1+1/n)isgettingsmallwhiletheexponentnisgettinglargesimultaneously.Andinthis tug-of-warbetween1andinfinity, theanswergetscloserandcloser toe=2.71828. . . .Forexample, (1.001)1000≈2.717.Let’slookatthefunction(1+1/n)nforlargevaluesofn,asshowninthefollowingtable.

Wedefineetobethenumberthat(1+1/n)nisgettingcloserandclosertoasngetslargerandlarger.Mathematicianscallthisthelimitof(1+1/n)nasngoestoinfinity,denoted

Ifwereplace thefraction1/nwithx/nwherex isanyrealnumber, thenasn/xgetslargerandlarger,thenumber(1+x/n)n/xgetscloserandclosertoe.Raisingbothsidestothepowerx(andrecallingthat givesuswhat’scalledthe

Page 272: The Magic of Math: Solving for x and Figuring Out Why

exponentialformula:

Theexponentialformulahasmanyinterestingapplications.Supposeyouput10,000dollarsinasavingsaccountthatearnsaninterestrateof0.06(thatis,6percentperyear).Iftheinterestisappliedannually,thenattheendofoneyear,youwouldhave10,000(1.06)=10,600dollars.Aftertwoyears,youwouldearn6percentonthisnewamountandhave10,000(1.06)2=11,236dollars.Inthreeyears, you would have 10,000(1.06)3 = 11,910.16 dollars. After t years, youwouldhave

10,000(1.06)t

dollars.Moregenerally, ifwe replace the interest rateof 0.06with an interestrater,andifyoubeginwithaprincipalofPdollars,thenattheendoftyears,thenumberofdollarsyouwouldhavewouldbe

P(1+r)t

Nowsupposeour6percentinterestiscompoundedsemiannually:soyouearn3percent every sixmonths. Then after a year youwould have 10,000(1.03)2 =10,609 dollars, which is a little more than the 10,600 dollars for annualcompounding.Ifthemoneyiscompoundedquarterly,thenyouearn1.5percentfourtimesayear,yielding10,000(1.015)4=10,613.63dollars.Moregenerally,if ourmoney is compoundedn timesper year, then after oneyear, youwouldhave

dollars. Letting n get very large is called continuous compounding. By theexponentialformula,afteroneyearyouwouldhave

Page 273: The Magic of Math: Solving for x and Figuring Out Why

dollars,asshowninthenexttable.

Moregenerally,ifyoustartwithaninitialprincipalofPdollarsandifyourmoneyiscompoundedcontinuouslyatinterestrater,thenaftertyears,youwillhaveAdollarsgivenbythispretty(orperhapsIshouldsay“pertly”)formula:

A=Pert

As seen in the graph below, the function y = ex grows very quickly.Alongside it,we alsopresent thegraphsofe2x ande0.06x.We say that thesefunctions grow exponentially. The graph y = e−x goes to 0 very quickly andexhibitsexponentialdecay.

Someexponentialfunctions

Howaboutthegraphof5x?Sincee<5<e2,then5xmustlieinbetweenthe

Page 274: The Magic of Math: Solving for x and Figuring Out Why

functions ex and e2x. More specifically, it turns out that e1.609... = 5 andtherefore 5x ≈ e1.609x. In general, any function ax can be expressed as anexponentialfunctionekx,oncewefindanexponentkforwhicha=ek.Howdowefindk?Usinglogarithms.

Inthesamewaythatthesquarerootistheinverseofthesquaringfunction(since the functions undo each other), the logarithm is the inverse of theexponential function. The most commonly used logarithm is the base 10logarithm,denotedlogx.Wesaythat

y=logx if 10y=x

Orequivalently,

10logx=x

Forexample,since102=100,wehave log100=2.Here is auseful tableoflogarithms.

Oneofthereasonsthatlogarithmsaresousefulisthattheytransformlargenumbers into much smaller numbers that our brains are better able tocomprehend.Forexample,theRichterscaleuseslogarithms,whichallowustomeasurethesizeofanearthquakeonascaleof1to10.Logarithmsarealsousedformeasuringtheintensityofsound(usingdecibels), theacidityofachemicalsolution(pH),andeventhepopularityofawebpagethroughGoogle’sPageRank

Page 275: The Magic of Math: Solving for x and Figuring Out Why

algorithm.Whatislog512?Anyscientificcalculator(orevenmostsearchengines)will

tellyoulog512=2.709....Thisseemsreasonable:since512liesbetween102

and103,itslogarithmmustbebetween2and3.Logarithmswereinventedasatool forconvertingmultiplicationproblems intoeasieradditionproblems.Thiswasbasedonthefollowingusefultheorem.

Theorem:Foranypositivenumbersxandy,

logxy=logx+logy

Inotherwords,thelogoftheproductisthesumofthelogs.Proof:Thiscomesimmediatelyfromthelawofexponents,since

10logx+logy=10logx10logy=xy=10logxy

Thus,raising10tothelogx+logypowergivesusxy,asdesired.

Anotherusefulpropertyistheexponentrule.Theorem:Foranypositivenumberxandanyintegern,

logxn=nlogx

Proof:Bythelawofexponents,abc=(ab)c.Therefore,

Hencethelogarithmofxnequalsnlogx.

Thereisnothingparticularlyspecialaboutthebase10logarithm,althoughitiswidelyusedinchemistryandphysicalscienceslikegeology.Butincomputerscienceanddiscretemathematics,thebase2logarithmismorepopular.Foranyb>0,thebaseblogarithmlogbisdefinedbytherule

y=logbx if by=x

For example, log2 32 = 5 since 25 = 32. All of the previous logarithm

Page 276: The Magic of Math: Solving for x and Figuring Out Why

propertiesholdforanybaseb.Forexample,

blogbx=x logbxy=logbx+logby logbxn=nlogbx

However,inmostareasofmathematics,physics,andengineering,themostuseful logarithmiswithbaseb=e.This iscalledthenatural logarithmand isdenotedbylnx.Thatis,

y=lnx if ey=x

Orequivalently,foranyrealnumberx,

lnex=x

Forexample,yourcalculatorcandetermineln5=1.609...,whichishowwedeterminedearlierthate1.609≈5.Wewillhavemore tosayabout thenaturallogarithmfunctioninChapter11.

Aside

All scientific calculators compute natural logarithms and base 10logarithms,butmostdonot explicitly calculate logarithms inotherbases.Butthisturnsouttonotbeaproblem,sincethereisasimplewaytoconvertlogarithms from one base to another. Essentially, if you know onelogarithm,youknowthemall.Specifically,usingjustthebase10logarithm,wecandeterminethebaseblogarithmwiththefollowingrule.

Theorem:Foranypositivenumbersbandx,

Proof:Lety=logbx.Thenby=x.Takingthelogofbothsides,logby

=logx.Andbytheexponentrule,thissaysylogb=logx.Thereforey=(logx)/(logb),asdesired.

Page 277: The Magic of Math: Solving for x and Figuring Out Why

Forexample,foranyx>0,

lnx=(logx)/(loge)=(logx)/(0.434...)≈2.30logx

log2x=(logx)/(log2)=(logx)/(0.301...)≈3.32logx

MoreAppearancesofeJustlikethenumberπ,thenumbereispervasiveinmathematics,showingupinplaceswhereyouwouldn’texpectit.Forexample,theclassicbellcurve,whichwesawinChapter8,hastheformula

Itsgraph(shownopposite)isprobablythemostimportantgraphinthesubjectofstatistics.

InChapter8wealsosaweappearinStirling’sapproximationforn!:

As we’ll see in Chapter 11, e is fundamentally connected to the factorialfunction.Wewillshowthatexhastheinfiniteseries

Page 278: The Magic of Math: Solving for x and Figuring Out Why

Thebellcurvehasformula

Inparticular,whenx=1,thisformulasays

whichisaveryquickwaytodeterminethedigitsofe.Bytheway,thedigitsofebeginwiththerepetitivepattern

e=2.718281828...

or as my high school teacher would say, “2.7 Andrew Jackson, AndrewJackson,” since 1828was the year that the seventhUS presidentwas elected.(Althoughformethemnemonicworkedtheotherway.IremembertheyearofJackson’selectionfromthedigitsofe.)Youmightbetemptedtobelievethateisarationalnumber,whichitwouldbeifthedigitsequence1828repeatedforever,but that is not the case.Thenext sixdigits ofe are . . . 459045. . . ,which Irememberastheanglesofanisoscelesrighttriangle.

The number e also shows up in many probability problems where youwouldn’t expect to see it. For example, let’s suppose that every week youpurchasearaffleticketwhereyourchanceofwinningaprizeis1in100.Ifyoubuy a ticket for 100 consecutive weeks, what are your chances of winning aprizeatleastonce?Eachweek,yourprobabilityofwinningis1/100=0.01andyourchanceoflosingis99/100=0.99.Since your chance of winning in any given week is independent of previous

Page 279: The Magic of Math: Solving for x and Figuring Out Why

weeks,yourchanceoflosingall100weeksis

(0.99)100≈0.3660

whichisverycloseto

1/e≈0.3678794...

This is not a coincidence. Recalling the exponential formula when we firstintroducedex,wehave

Nowifweletx=−1,thenforanylargenumbern,wehave

Whenn=100,thissaysthat(0.99)100≈1/e,aspromised.Thusyourchanceofwinningisabout1−(1/e)≈64percent.

Oneofmyfavoriteprobabilityproblemsgoesbythenameofthematchingproblem(orthehat-checkproblemorthederangementproblem).Supposethatnhomeworkassignmentsarebeingreturnedtoaclass,buttheteacherislazyandgives each student a random assignment (whichmay be that student’s ormaybelongtoanyoftheotherstudentsintheclass).Whatistheprobabilitythatnostudent receives her own homework back? Equivalently, if the numbers 1throughnare randomlymixed,what is theprobability thatnonumber is in itsnaturalposition?Forexample,whenn=3,thenumbers1,2,3canbearranged3! = 6ways, and there are 2derangementswhere no number is in its naturalposition, namely 231 and 312. Thus when n = 3, the probability of aderangementis2/6=1/3.

Withnhomeworkassignmentsbeingreturned,therearen!possiblewaystoreturn them. If we let Dn denote the number of derangements, then theprobability that nobody gets her own homework back is pn = Dn/n!. Forexample,whenn=4,thereare9derangements:

Page 280: The Magic of Math: Solving for x and Figuring Out Why

2143 2341 2413 3142 3412 3421 4123 4312 4321

Thusp4=D4/4!=9/24=0.375,aslistedinthefollowingtable.

As n gets larger and larger, pn will get closer and closer to 1/e. Theimplications are astounding.This says that the likelihood of nobody receivingherownhomeworkbackisvirtuallythesame,whethertheclasshas10studentsor100studentsoronemillionstudents!Thechanceisreally,reallycloseto1/e.

Wheredoes1/ecomefrom?Asafirstapproximation,withnstudents,eachstudenthas a1/n chanceof receivingher homeworkback and therefore a1−(1/n)chanceofgettingsomeoneelse’sassignment.Thustheprobabilitythatallnstudentsgetsomeoneelse’sassignmentis

The probability is approximate because, unlike the raffle problem, we do notquitehaveindependentevents.Ifstudent1getsherownhomework,thatslightlyincreasestheprobabilitythatstudent2getshis.(Theprobabilitywouldbe1/(n−1)insteadof1/n.)Likewise,ifstudent1doesnotgetherhomeworkback,thenstudent2’s chancesgodownever so slightly.But since theprobabilitiesdon’tchangetoomuch,theapproximationisverygood.

Theexactprobabilityforpnusestheinfiniteseriesforex,

Page 281: The Magic of Math: Solving for x and Figuring Out Why

Whenwesubstitutex=−1intothisequation,weget

It can be shown that forn students, the probability that nobody receives theirownhomeworkisexactly

For example,with n = 4 students,pn = 1 − 1 + 1/2 − 1/6 + 1/24 = 9/24, aspreviously shown. The convergence to 1/e is extremely fast. The distancebetweenpnand1/eislessthan1/(n+1)!.Thusp4iswithin1/5!=0.0083of1/e;p10agreeswith1/e tosevendecimalplaces;p100agreeswith1/e toover150decimalplaces!

Aside

Theorem:Thenumbereisirrational.Proof: Suppose, to the contrary, that e is rational. Then e =m/n for

some positive integersm andn. Now let’s use the number n to split theinfiniteseriesforeintotwoparts,sothate=L+R,where

Noticethatn!e=en(n−1)!=m(n−1)!mustbeaninteger(sincemand(n−1)!areintegers)andn!Lisanintegertoo(sincen!/k!isanintegerforallk≤n).Thusn!R = n!e − n!L is the difference of two integers, so itmust be anintegeritself.Butthisisimpossible,sincen≥1impliesthat

Page 282: The Magic of Math: Solving for x and Figuring Out Why

Son!Rcan’tbeanintegerbecausetherearenopositiveintegerslessthan1.Hencetheassumptionthate=m/nleadstoacontradiction,andthereforeeisirrational.

Euler’sEquationThe number e was explored and popularized by the great mathematicianLeonhard Euler, and he was the first to assign this fundamental number itscurrentname.Mosthistoriansofmathematicsdisagreewiththesuggestionthathechose the lettere because itwas the first letter ofhis last name.ButmanypeoplestillrefertoeasEuler’snumber.

Wehavealreadyintroducedtheinfiniteseriesforthefunctionsex,cosx,andsinx,andwewillexplainwheretheycomefrominthenextchapter.Butlet’sputthemallinoneplacehere.

Theseformulasarevalidforallrealnumbersx,butEulerhadtheaudacitytoimaginewhattheywouldsayifweletxbeanimaginarynumber.Whatwoulditmean for a number to be raised to an imaginary power? The result is Euler’sbeautifultheorem.

Theorem(Euler’stheorem):Foranyangleθ(measuredinradians),

Page 283: The Magic of Math: Solving for x and Figuring Out Why

eiθ=cosθ+isinθ

Proof:Weprovethistheorembyseeingwhathappenswhenwesubstitutex=iθintheseriesforex.

Notewhathappenstothepowerofiasitisraisedtovariouspowers:i0=1,i1=i,i2=−1,i3=−i(sincei3=i2i=−i),andthenthepatternrepeats:i4=1,i5=i,i6 = −1, i7 = −i, i8 = 1, and so on. In particular, notice that the powers of ialternate between real and imaginary, and we can factor the number i out ofeverysecondterm,asinthealgebrathatfollows.

Thisgivesustheproofof“God’sequation,”introducedatthebeginningofthechapter.Lettingθ=πradians(or180°),wehave

eiπ=cosπ+isinπ=−1+i(0)=−1

ButEuler’stheoremsaysmuchmorethanthis.Wehaveseentheexpressioncosθ+isinθbefore.Itisthepointontheunitcircleofthecomplexplanethathasanangleofθ relative to thepositivex-axis.Euler’s theoremsays thatyoucanexpressthatpointinasimpleway,asshowninthefigure.

Page 284: The Magic of Math: Solving for x and Figuring Out Why

ByEuler’stheorem,thepointsontheunitcirclearealloftheformeiθ

Butwait, there’smore! Every point on the complex plane is just a scaledversionofapointontheunitcircle.Specifically,ifthecomplexnumberzhasalengthofRandanangleofθ, thenthatpointisjustR timesthecorrespondingpointontheunitcircle.Inotherwords,

z=Reiθ

Thusifwehaveanytwopointsinthecomplexplane,sayz1=R1eiθ1andZ2=

R2eiθ2,thenthelawofexponents(withcomplexnumbers)tellsusthat

Z1Z2=R1eiθ1R2eiθ2=R1R2ei(θ1+θ2)

which is the complex number with lengthR1R2 and angle θ1 + θ2. So onceagainwecanconcludethat tomultiplycomplexnumbers,yousimplymultiplytheir lengths and add their angles. When we proved this fact earlier in thechapter, we relied on about a page’s worth of algebra and trigonometricidentities.ButwithEuler’stheorem,wearriveatthisconclusioninjustoneline,allthankstothenumbere!

Let’sendwithapoemtocelebratethisremarkablenumber,withapologiestoJoyceKilmer.

Page 285: The Magic of Math: Solving for x and Figuring Out Why

IthinkthatIshallneverseeAnumberlovelierthane.WhosedigitsaretoogreattostateThey’re2.71828...Andehassuchamazingfeatures.It’slovedbyall(butmostlyteachers).Withallofe’sgreatproperties,Mostintegralsaredonewith...ease.Theoremsareprovedbyfoolslikeme.ButonlyEulercouldmakeane.

Page 286: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERELEVEN

y=x11⇒y′=11x10TheMagicofCalculus

GoingoffonTangentsMathematics is the language of science, and themathematics used to expressmostlawsofnatureiscalculus.Calculusisthemathematicsofhowthingsgrowandchangeandmove.Inthischapter,wewilllearnhowtodeterminetherateatwhich functions change and how to approximate complicated functions withsimpler functions like polynomials. Calculus is also a powerful tool foroptimizationandcanbeusefulfordetermininghowtochooseyournumbersinsuch a way as to maximize a quantity (like profit or volume) or minimize aquantity(likecostordistancetraveled).

Forexample, supposeyouhaveasquarepieceofcardboard,12 inchesperside, as shown on the next page. Suppose you cut x-by-x squares out of thecornersandthenfoldtheresultingtabsuptocreateatray.Whatisthemaximumpossiblevolumeoftheresultingtray?

Let’sstartbycomputingthevolumeasafunctionofx.Thebaseofthetraywouldhavearea(12−2x)(12−2x)andtheheightofthetraywouldbex,sothevolumeofthetraywouldbe

Page 287: The Magic of Math: Solving for x and Figuring Out Why

V=(12−2x)2x

Whatvalueofxmaximizesthevolumeofthebox?

cubicinches.Ourgoalistochoosethevalueofxtomakethisvolumeaslargeaspossible.Wecan’tchoosextobetoobigortoosmall.Forinstance,ifx=0orx=6,thentheboxhasavolumeof0.Theoptimalvalueofx liessomewhereinbetween.

Below is agraphof the functiony= (12−2x)2x asx ranges from0 to6.Whenx=1,wecomputethatthevolumeisy=100.Whenx=2,y=128.Whenx=3,y=108.Thevalueofx=2 lookspromising,butperhaps there isarealnumberthatdoesevenbettersomewherebetween1and3?

Thepointwherey=(12−2x)2xismaximizedhasahorizontaltangentline

Justtotheleftofthemaximum,thefunctionisgoinguphill,withapositiveslope,andjusttotheright,itisgoingdownhill,withanegativeslope.So,atthe

Page 288: The Magic of Math: Solving for x and Figuring Out Why

maximumpoint,thefunctionisneitherincreasingnordecreasing:itisswitchingbetweenthetwo.Toputitmoremathematically,atthisoptimalpoint,thereisahorizontaltangentline(withaslopeof0).Inthischapter,wewillusecalculustofindthatpointbetween0and6wherethetangentlineishorizontal.

Andspeakingoftangents,wewillbegoingoffonmanytangentsthroughoutthischapter.Forinstance,theproblemwejustconsideredwastofindtheoptimalwaytocutcorners,andindeedwewillbecuttinglotsofcornersinthischapter.Calculus is a vast subject, with typical textbooks containing more than athousandpages. In justacoupledozenpages,wewillonlyhave time tocoverthe highlights. In this book, we will not cover the topic of integral calculus,whichcomputesareasandvolumesofcomplicatedobjects;wewill focusonlyondifferentialcalculus,whichmeasureshowfunctionsgrowandchange.

Thesimplestfunctionstoanalyzearestraight lines.InChapter2,wenotedthat the line y =mx + b has a slope ofm. Thus if x increases by 1, then yincreasesbym.Forexample,theliney=2x+3hasaslopeof2.Ifweincreasethevalueofxby1(sayfromx=10tox=11),thenywillincreaseby2(here,from23to25).

Wehavedrawnthegraphsofvariouslinesinthefigurebelow.Here,y=−xhasslope−1,andthehorizontalliney=5hasslope0.

Graphsoflines

Givenany twopoints,wecandrawa line through themanddetermine theslopeof that linewithoutneedingtheline’sformula.Theslopeof the line thatgoes through the point (x1, y1) and (x2, y2) is given by the “rise over run”formula:

Page 289: The Magic of Math: Solving for x and Figuring Out Why

Forexample,takeanytwopointsontheliney=2x+3,saythepoints(0,3)and (4, 11). Then the slope of the line connecting these points is

,whichisexactlytheslopeweseeintheoriginalequationofthatline.

Nowconsider the functiony =x2+ 1, as shown in the graph below.Thisgraph is not a straight line andwe can see that the slope is always changing.Let’strytodeterminetheslopeofthetangentlineatthepoint(1,2).

Fory=x2+1,findtheslopeofthetangentlineatthepoint(1,2)

Thebadnews is that it takes twopoints todetermineaslope,andweonlyhavetheonepoint(1,2).Thuswefirstapproximatetheslopeofthetangentlinebylookingata line thatgoes throughtwopointson thecurve(calledasecantline),asshownontheright.Ifx=1.5,theny=(1.5)2+1=3.25.Solet’slookattheslopeofthelinefrom(1,2)to(1.5,3.25).Accordingtoourslopeformula,theslopeofthissecantlineis

Page 290: The Magic of Math: Solving for x and Figuring Out Why

Approximatingthetangentlinewithasecantline

Forabetterapproximation,wemove thesecondpointcloser to (1,2).Forinstance,ifx=1.1,theny=(1.1)2+1=2.21,andtheresultingsecantslopeism=(2.21−2)/(1.1−1)=2.1.Asshowninthetablebelow,aswemovethesecondpointcloserandcloserto(1,2),thesecantslopeseemstogetcloserandcloserto2.

Lookwhathappenswhenx=1+hwhereh≠0,butcouldbe justahair’slengthawayfromx=1.Theny=(1+h)2+1=2+2h+h2.Theslopeofthesecantlinewouldthenbe

Nowashgetscloserandcloserto0,thesecantslopegetscloserandcloserto2.

Page 291: The Magic of Math: Solving for x and Figuring Out Why

Formally,wesay

Thisnotationmeansthatthelimitof2+hashgoestozerois2.Intuitively,ashgetscloserandcloserto0,2+hgetscloserandcloserto2.Sowehavefoundthatforthegraphy=x2+1atthepoint(1,2),theslopeofthetangentlineis2.

Thegeneralsituation looks like this.For thefunctiony= f (x),wewant tofind the slopeof the tangent lineat thepoint (x, f (x)).Aspicturedbelow, theslopeofthesecantlinethroughthepoint(x,f(x))andtheneighboringpoint(x+h,f(x+h))is

Theslopeofthesecantlinethrough(x,f(x))and(x+h,f(x+h))is

Weusethenotationf′(x)todenotetheslopeofthetangentlineatthepoint(x,f(x)),so

Thisisacomplicateddefinition,solet’sdosomeexamples.Forastraightliney=mx+b,thenf(x)=mx+b.Tofindf(x+h)wereplacexwithx+htoobtainf(x+h)=m(x+h)+b.Therefore,thesecantslopeisequalto

Page 292: The Magic of Math: Solving for x and Figuring Out Why

Thetangentslopeisalsoequaltomregardlessofthevalueofxinvolved,sof′(x)=m.Thismakessensebecausetheliney=mx+balwayshasaslopeofm.

Let’snowfindthederivativey=x2usingthedefinition.Here,wehave

andashgoesto0,wegetf′(x)=2x.Forf(x)=x3,wehave

andashgoesto0,wegetf′(x)=3x2.Given the function y = f (x), the process of determining the derivative

functionf′(x)iscalleddifferentiation.Thegoodnewsisthatoncewehavefoundthederivativesof a few simple functions,we candetermine thederivativesofmorecomplicatedfunctionswithverylittledifficultyandwithoutneedingtousethe formal limit-based definition given above. The following theorem is veryuseful.

Theorem:Ifu(x)=f(x)+g(x),thenu′(x)=f′(x)+g′(x).Inotherwords,thederivativeofthesumisthesumofthederivatives.Also,ifcisanyrealnumber,thederivativeofcf(x)iscf′(x).

Asaconsequenceofthistheorem,sincey=x3hasderivative3x2andy=x2

Page 293: The Magic of Math: Solving for x and Figuring Out Why

has derivative 2x, then y = x3 + x2 has derivative 3x2 + 2x. To illustrate thesecondstatement,thefunctiony=10x3hasderivative30x2.

Aside

Proof:Letu(x)=f(x)+g(x).Then

Takingthelimitofbothsidesash→0givesus

u′(x)=f′(x)+g′(x)

Note thatwhenwe take the limiton therightsideof theequation,weareusingthefactthatthelimitofthesumisthesumofthelimits.Wewon’trigorouslyprovethathere,buttheintuitionisthatifthenumberaisgettingcloserandclosertoAandbisgettingcloserandclosertoB,thena+b isgettingcloserandclosertoA+B.Wenotethatit’salsotruethatthelimitoftheproduct is theproductof the limitsand the limitof thequotient is thequotient of the limits. But as we’ll see, the corresponding rules forderivativesarenotquiteasstraightforward.For instance, thederivativeoftheproductisnottheproductofthederivatives.

Forthesecondhalfofthetheorem,ifv(x)=cf(x),thenwehave

asdesired.

Page 294: The Magic of Math: Solving for x and Figuring Out Why

Todifferentiatef(x)=x4,let’sfirstexpandf(x+h)=(x+h)4=x4+4x3h+6x2h2+4xh3+h4.Thecoefficientsofthisexpression,1,4,6,4,1,mightlookfamiliartoyou,astheyarerow4ofPascal’striangle,studiedinChapter4.Thus,wehave

andash→0,wegetf′(x)=4x3.Doyouseeapattern?Thederivativesofx,x2,x3, and x4 are, respectively, 1, 2x, 3x2, and 4x3. Applying the same logic tohigherexponentsgivesusthefollowingpowerfulrule.Anotherpopularnotationforthederivativeisy′,solet’sstartusingithere.

Theorem(thepowerrule):Forn≥0,

y=xnhasderivativey′=nxn−1

Forexample,

ify=x5,theny′=5x4

and

ify=x10,theny′=10x9

Evenaconstantfunction,likey=1,canbedifferentiatedbythisrule,since1=x0andy=x0hasderivative0x−1=0, foreveryvalueofx.Thismakessensesince the liney=1 ishorizontal.Asaconsequenceof thepower rule and theprevioustheorem,wecannowdifferentiateanypolynomial.Forexample,if

y=x10+3x5−x3−7x+2520

then

y′=10x9+15x4−3x2−7

Thepowerruleiseventruewhennisnotapositiveinteger.Forinstance,if

Page 295: The Magic of Math: Solving for x and Figuring Out Why

then

Likewise,if

then

Butwe’renotreadytoprovethesefactsyet.Beforewelearnhowtodifferentiatemorecomplicatedfunctions,let’stakeadvantageofwhatwehavelearnedsofartosolvesomeotherinterestingandpracticaloptimizationproblems.

Max-MinProblemsDifferentiation helps us determinewhere a function achieves itsmaximum orminimumvalues.Forinstance,forwhatvalueofxdoestheparabolay=x2−8x+10reachitslowestpoint?

Page 296: The Magic of Math: Solving for x and Figuring Out Why

Theparabolay=x2−8x+10isatitslowestpointwheny′=0

Atthelowestpoint,theslopeofthetangentlinemustbe0.Sincey′=2x−8,solving2x−8=0tellsusthattheminimumoccurswhenx=4(andy=16−32+10=−6).Forthefunctiony=f(x),avalueofxthatsatisfiesf′(x)=0iscalledacriticalpointoff.Forthefunctiony=x2−8x+10,theonlycriticalpointisx=4.

Where does the maximum occur? In the above problem, there is nomaximumbecause they-valueofx2−8x+10cangetarbitrarilybig.But ifxwererestrictedtoaninterval,say0≤x≤6,thenywouldbegreatestatoneofitsendpoints.Here,weseethatwhenx=0,y=10andwhenx=6,y=−2,sothefunctionwould bemaximized at the endpoint x = 0. In general, we have thefollowingimportanttheorem.

Theorem (optimization theorem): If a differentiable function y = f (x) ismaximizedorminimizedatapointx*,thenx*mustbeeitheracriticalpointofforanendpoint.

Let’sreturntotheboxproblematthebeginningofthechapter.Hereweareinterestedinmaximizingthefunction

y=(12−2x)2x=4x3−48x2+144x

wherexisrequiredtobebetween0and6.Wewishtofindavalueofxforwhichyismaximized.Sinceourfunctionisapolynomial,weseethatithasderivative

y′=12x2−96x+144=12(x2−8x+12)=12(x−2)(x−6)

Hencethefunctionhascriticalpointsx=2andx=6.Theboxhas volume0 at the endpointsx = 0 andx = 6, so the volume is

minimizedthere.Ithasmaximumvolumeattheothercriticalpointx=2,wherey=128cubicinches.

DifferentiationRulesThemorefunctionsthatwecandifferentiate, themoreproblemswecansolve.Perhapsthemost importantfunctionincalculusis theexponentialfunctiony=ex.Whatmakesy=exspecialisthatitisequaltoitsownderivative.

Page 297: The Magic of Math: Solving for x and Figuring Out Why

Theorem:Ify=ex,theny′=ex.

Aside

Whydoesf(x)=exsatisfyf′(x)=ex?Hereistheessentialidea.Firstnoticethat

Nowrecallthatthenumberehasdefinition

whichmeans that as n gets larger and larger, (1 + 1/n)n gets closer andclosertoe.Nowleth=1/n.Whennisverylarge,thenh=1/nisverycloseto0.Thusforhnear0,

e≈(1+h)1/h

Ifweraisebothsidestothepowerhandusetheexponentlaw

,thenweseethat

eh≈1+h

andtherefore

Thusashgetscloserandcloserto0, getscloserandcloserto1,so

getscloserandclosertoex.

Page 298: The Magic of Math: Solving for x and Figuring Out Why

Arethereanyotherfunctionsthataretheirownderivative?Yes,buttheyarealloftheformy=cexwherecisarealnumber.(Notethatthisincludesthecasewhenc=0,givingustheconstantfunctiony=0.)

Wehaveseen thatwhenweaddfunctions, thederivativeof thesumis thesumofthederivatives.Whatabouttheproductoffunctions?Alas,thederivativeof a product is not the product of the derivatives, but it’s not too hard tocompute,asthefollowingtheoremdemonstrates.

Theorem(productruleforderivatives):Ify=f(x)g(x),then

y′=f(x)g′(x)+f′(x)g(x)

Forexample,accordingtotheproductrule,todifferentiatey=x3ex,weletf(x)=x3andg(x)=ex.Therefore

Noticethatwhenf(x)=x3andg(x)=x5,thentheproductrulesaysthattheirproductx3x5=x8hasderivative

whichisconsistentwiththepowerrule.

Aside

Proof(productrule):Letu(x)=f(x)g(x).Then

Nextwecleverlyadd0 to thenumeratorbysubtractingandadding f (x+

Page 299: The Magic of Math: Solving for x and Figuring Out Why

h)g(x)toget

Ash→0,thisbecomesf(x)g′(x)+f′(x)g(x),asdesired.

Theproductruleisnotjustcomputationallyuseful:italsoallowsustofindderivativesofotherfunctions.Forexample,wepreviouslyprovedthepowerruleforpositive exponents.Butnowwecanprove that it is true for fractional andnegativeexponentstoo.

Forexample,thepowerrulepredictsthat

Let’sseewhythisistrueusingtheproductrule.Suppose .Then

Whenwedifferentiatebothsides,theproductruletellsusthat

u(x)u′(x)+u′(x)u(x)=1

Thus2u(x)u′(x)=1,andtherefore ,aspredicted.

Aside

The power rule also predicts that for negative exponents, y =x−n shouldhavethederivative .Toprove this, letu(x)=x−n,wheren≥1.Then,bydefinition,forx≠0,wehave

Page 300: The Magic of Math: Solving for x and Figuring Out Why

u(x)xn=x−nxn=x0=1

Whenwedifferentiatebothsides,theproductruletellsusthat

u(x)(nxn−1)+u′(x)xn=0

Dividingthroughbyxnandmovingthefirsttermtotheotherside,weget

asdesired.

Thus,ify=1/x=x−1,theny′=−1/x2.Ify=1/x2=x−2,theny′=−2x−3=−2/x3,andsoon.

InChapter7wewantedtofindthepositivenumberx thatwouldminimizethefunction

y=x+1/x

Using clever geometry, we showed that this occurs when x = 1. But withcalculus,wedon’thavetobeasclever.Wesimplysolvey′=0,whichgivesus1−1/x2=0,andtheonlypositivenumberthatsatisfiesthisisx=1.

The trigonometric functionsarealsoeasy todifferentiate.Note that for thefollowingtheoremtobetrue,theanglesmustbeexpressedinradians.

Theorem:Ify=sinx,theny′=cosx.Ify=cosx,theny′=−sinx.Inotherwords, the derivative of sine is cosine and the derivative of cosine is negativesine.

Aside

Proof:Theproof relieson the following lemma. (A lemma isastatement

Page 301: The Magic of Math: Solving for x and Figuring Out Why

thathelpsusproveamoreimportanttheorem.)Lemma:

Thissaysthatforanytinyangleh(inradians)near0,itssinevalueisveryclosetohanditscosinevalueisverycloseto1.Forexample,acalculatorreveals that sin0.0123=0.0122996. . . andcos0.0123=0.9999243. . . .Assuming the lemma for now, we can differentiate the sine and cosinefunctions.Usingthesin(A+B)identityfromChapter9,wehave

Ash→0,thenaccordingtoourlemma,theexpressionabovebecomes(sinx)(0)+(cosx)(1)=cosx.Likewise,

Ash→0,thisbecomes(cosx)(0)−(sinx)(1)=−sinx,asdesired.

Aside

Wecanprove usingthefigurebelow.

Page 302: The Magic of Math: Solving for x and Figuring Out Why

Ontheunitcircleabove,R=(1,0)andP=(cosh,sinh),wherehisasmallpositiveangle.Also,inrighttriangleOQR,

ItfollowsthatrighttriangleOPShasarea coshsinh,andright triangleOQRhasarea .

NowfocusonthesectorOPR,whichisawedge-shapedobject.Theareaoftheunitcircleisπ12=π,andsectorOPS isjustafractionh/(2π)oftheunitcircle.ThereforesectorOPRhasareaπ(h/2π)=h/2.

SincesectorOPRcontainstriangleOPSandiscontainedinsidetriangleOQR,thenbycomparingtheirareaswehave

Multiplyingthroughby ,wehave

Forpositivenumbers,ifa<b<c,then1/c<1/b<1/a.Therefore,

Nowash→0,bothcoshand1/coshgoto1,asdesired.Therefore, .

Page 303: The Magic of Math: Solving for x and Figuring Out Why

Aside

We can prove using the previous result and a few

linesofalgebra(includingcos2h+sin2h=1).

Nowas ,and .Hence .

Onceweknow the derivatives of sine and cosine,we can differentiate thetangentfunction.

Theorem:Fory=tanx,y′=1/(cos2x)=sec2x.Proof:Letu(x)=tanx=(sinx)/(cosx).Then

tan(x)cosx=sinx

Differentiatingbothsidesandusingtheproductrule,wehave

tanx(−sinx)+tan′(x)cosx=cosx

Dividingthroughbycosxandsolvingfortan′(x)givesus

where the second-to-last equality is obtainedbydividing the identity cos2x +sin2x=1bycos2x.

Page 304: The Magic of Math: Solving for x and Figuring Out Why

Taking a similar approach allows us to prove the quotient rule fordifferentiation.

Theorem(quotientrule):Ifu(x)=f(x)/g(x),then

Aside

Proofofquotientrule:Sinceu(x)g(x)= f (x), thenwhenwedifferentiatebothsides,theproductrulegivesus

u(x)g′(x)+u′(x)g(x)=f′(x)

Ifwemultiplybothsidesbyg(x),weget

g(x)u(x)g′(x)+u′(x)g(x)g(x)=g(x)f′(x)

Replacing g(x)u(x) with f (x) and solving for u′(x) gives us the desiredquantity.

We know how to differentiate polynomials, exponential functions,trigonometricfunctions,andmore.Wehaveseenhowtodifferentiatefunctionswhentheyareadded,multiplied,anddivided.Thechainrule(statedbelow,butnotproved)tellsuswhattodowhenthefunctionsarecomposed.Forexample,iff(x)=sinxandg(x)=x3,then

f(g(x))=sin(g(x))=sin(x3)

Notethatthisisnotthesameasthefunction

g(f(x))=g(sinx)=(sinx)3

Theorem(chainrule):Ify=f(g(x)),theny′=f′(g(x))g′(x).

Page 305: The Magic of Math: Solving for x and Figuring Out Why

Forexample,iff(x)=sinx,andg(x)=x3,thenf′(x)=cosxandg′(x)=3x2.Thechainruletellsusthatify=f(g(x))=sin(x3),then

y′=f′(g(x))g′(x)=cos(g(x))g′(x)=3x2cos(x3)

More generally, the chain rule tells us that if y = sin(g(x)), then y′ = g′(x)cos(g(x)).Bythesamelogic,y=cos(g(x))hasy′=−g′(x)sin(g(x)).

Ontheotherhand,forthefunctiony=g(f(x))=(sinx)3,thechainrulesaysthat

y′=g′(f(x))f′(x)=3(f(x)2)f′(x)=3sin2xcosx

Moregenerally,thechainruletellsusthatify=(g(x))n,theny′=n(g(x))n−1

g′(x).Whatdoesitsayaboutdifferentiatingy=(x3)5?

y′=5(x3)4(3x2)=5x12(3x2)=15x14

whichisconsistentwiththepowerrule.Let’sdifferentiate .Then

Exponential functions are easy to differentiate too. Since ex is its ownderivative,ify=eg(x),then

y′=g′(x)eg(x)

Forexample,y=ex3hasy′=(3x2)ex

3.

Noticethatthefunctiony=ekxhasderivativey′=kekx=ky.Thisisoneofthepropertiesthatmakesexponentialfunctionssoimportant.Theyariseanytimethattherateofgrowthofafunctionisproportionaltothesizeofitsoutput.Thisiswhyexponentialfunctionsarisesoofteninfinancialandbiologicalproblems.

Thenaturallogarithmfunctionlnxhasthepropertythat

Page 306: The Magic of Math: Solving for x and Figuring Out Why

elnx=x

foranyx>0.Let’susethechainruletodetermineitsderivative.Lettingu(x)=lnx, we have eu(x) = x. Differentiating both sides of this equation tells usu′(x)eu(x)=1.Butsinceeu(x)=x,itfollowsthatu′(x)=1/x.Inotherwords,ify=lnx,theny′=1/x.Applyingthechainruleagain,weobtainthatify=ln(g(x)),then .

Wesummarizetheseconsequencesofthechainrulehere.

Let’sapplythechainruletosolveaproblemfromcow-culus!ClaratheCowisonemilenorthofthex-axisriver,whichrunsfromeast towest.Herbarnisthreemileseastandonemilenorthofhercurrentposition.Shewishestodrinkfromtheriverandthenwalktoherbarnsoastominimizehertotalamountofwalking.Whereontherivershouldshestoptodrink?

Cow-culusquestion:Whereshouldthecowdrinktominimizethetotalamountofwalking?

Page 307: The Magic of Math: Solving for x and Figuring Out Why

AssumingthatClarawalksinastraightlinefromherstartingpoint(0,1)tothedrinkingpoint(x,0),thenthePythagoreantheorem(orthedistanceformula)tellsusthatthelengthofthelinetothedrinkingpointis andthelengthof the trip to the barn at B = (3, 2) is . Hence theproblemistodeterminethenumberx(between0and3)thatminimizes

When we differentiate the above expression (using the chain rule) and set itequalto0,weget

You can verify thatwhen x = 1, the left side of the above equation becomes,which indeed equals 0. (You can solve the equation directly by

putting ontheothersideoftheequation,thensquaringbothsidesandcross-multiplying.Alotofcancellationoccurs,andtheonlysolutionbetween0and3isx=1.)

WecanconfirmouranswerwithjustalittlereflectionlikewedidinChapter7. Imagine that insteadofClaragoing to thebarnat (3,2)afterherdrink,shewenttothebarn’sreflectionatB′=(3,−2),asinthefigureonthenextpage.

ThedistancetoB′isexactlythesameasthedistancetoB.Andeverypointfromabove the river tobelow the rivermust cross thex-axis somewhere.Thepathwith the shortest distance is the straight line from (0, 1) to (3, −2) (withslope−3/3=−1),whichintersectsthex-axiswhenx=1.Nocalculusorsquarerootsrequired!

Page 308: The Magic of Math: Solving for x and Figuring Out Why

Uponreflection,thereisanotherwaytosolvethisproblem

AMagicalApplication:TaylorSeriesWhenwe provedEuler’s equation at the end of last chapter,we relied on thefollowingmysteriousformulas:

Beforeweseehowwearrivedat these, let’splaywith themfora littlebit.Look what happens as you differentiate every term in the series for ex. Forexample,thepowerruletellsusthatthederivativeofx4/4!is(4x3)/4!=x3/3!,whichistheprecedingtermoftheseries.Inotherwords,whenwedifferentiatetheseriesforex,wegetbacktheseriesforex,whichagreeswithwhatweknowaboutex!

Page 309: The Magic of Math: Solving for x and Figuring Out Why

Ifwedifferentiatex−x3/3!+x5/5!−x7/7!+···termbyterm,weget1−x2/2!+x4/4!−x6/6!+···,whichisconsistentwiththefactthatthederivativeof thesinefunction is thecosinefunction.Likewise,whenwedifferentiate thecosine seriesweget thenegativeof the sine series.Notice also that the seriesconfirmsthatcos0=1,andbecauseeveryexponentiseven,thevalueofcos(−x)willbethesameascosx,whichweknowtobetrue.(Forexample,(−x)4/4!=x4/4!.)Likewise,forthesineseries,weseethatsin0=0andbecausealloftheexponentsareodd,wegetsin(−x)=−sinx,asappropriate.

Now let’s see where those formulas come from. In this chapter, we havelearnedhowtofindthederivativeofmostcommonlyusedfunctions.Butthereare times when it is useful to differentiate a function more than once bycomputingitssecondderivativeorthirdderivativeormore,denotedbyf″(x),f′″(x), and soon.The secondderivative f″(x)measures the rate of change of theslope of the function (also known as its concavity) at the point (x, f (x)). Thethirdderivativemeasurestherateofchangeofthesecondderivative,andsoon.

The formulas given above are called Taylor series, named after EnglishmathematicianBrookTaylor(1685–1731).Forafunctionf(x)withderivativesf′(x),f″(x),f′″(x),andsoon,wehave

forallvaluesofxthatare“closeenough”to0.Whatdoescloseenoughmean?Forsomefunctions,likeex,sinx,andcosx,allvaluesofxarecloseenough.Butforsomefunctions,aswe’llseelater,xhastobesmallfortheseriestomatchthefunction.

Let’sseewhattheformulasaysforf(x)=ex.Sinceex isitsownfirst(andsecondandthird...)derivative,itfollowsthat

f(0)=f′(0)=f″(0)=f′″(0)=···=e0=1

sotheTaylorseriesforexis1+x+x2/2!+x3/3!+x4/4!+...,aspromised.Whenxissmall,thenweonlyneedtocomputeafewtermsoftheseriestogetanexcellentapproximationoftheexactanswer.

Let’sapplythis tocompoundinterest.Inthelastchapterwesawthat ifwe

Page 310: The Magic of Math: Solving for x and Figuring Out Why

have$1000earning5percentinterest,compoundedcontinuously,thenattheendof the year we have $1000e0.05 = $1051.27. But we can get a get a goodestimateofthatwiththesecond-orderTaylorpolynomialapproximation

$1000(1+0.05+(0.05)2/2!)=$1051.25

andthethird-orderapproximationgivesus$1051.27.We illustrate Taylor approximation in the figure below, where y = ex is

graphedalongwithitsfirstthreeTaylorpolynomials.

Taylorapproximationsofex

As we increase the degree of the Taylor polynomial, the approximationbecomesmoreandmoreaccurate,especiallyforthevaluesofxnear0.SowhatisitabouttheTaylorpolynomialsthatmakethemworksowell?Thefirst-degreeapproximation(alsocalledthelinearapproximation)saysthatforxnear0,

f(x)≈f(0)+f′(0)x

Page 311: The Magic of Math: Solving for x and Figuring Out Why

Thisisastraightlinethatgoesthroughthepoint(0,f(0))andhasslopef′(0).Likewise, it canbeshown that thenth-degreeTaylor polynomial goes throughthepoint(0,f(0))withthesamefirstderivative,samesecondderivative,samethirdderivative,andsoon,uptothesamenthderivativeastheoriginalfunctionf(x).

Aside

Taylor polynomials and Taylor series can also be defined for values of xnearothernumbersbesides0.Specifically, theTaylorseries for f (x)withbasepointaisequalto

Asinthecasewhena=0,theTaylorseriesisequaltof(x)forallrealorcomplexnumbersxsufficientlyclosetoa.

Let’slookattheTaylorseriesforf(x)=sinx.Noticethatf′(x)=cosx,f″(x)=−sinx,f′″(x)=−cosx,andf″″(x)=sinx=f(x)again.Whenthisisevaluatedat0,startingat f(0),weobtainthecyclicpattern0,1,0,−1,0,1,0,−1, . . . ,causingeveryevenpowerofxtodisappearintheTaylorseries.Thuswehave,forallvaluesofx(measuredinradians),

Andsimilarly,whenf(x)=cosxweget

Finally, let’s look at an example where the Taylor series is equal to thefunction for some values of x, but not all values of x. Consider

. Here f (0) = 1 and using the chain rule, the first few

Page 312: The Magic of Math: Solving for x and Figuring Out Why

derivativesare

f′(x)=−1(1−x)−2(−1)=(1−x)−2

f″(x)=(−2)(1−x)−3(−1)=2(1−x)−3

f′″(x)=−6(1−x)−4(−1)=3!(1−x)−4

f″″(x)=−4!(1−x)−5(−1)=4!(1−x)−5

Continuing this pattern (or using a proof by induction), we see that the nthderivativeof(1−x)−1isn!(1−x)−(n+1),andwhenx=0,thenthderivativeisjustn!.Consequently,theTaylorseriesgivesus

butthisequationisonlyvalidwhenxisbetween−1and1.Forexample,whenxisgreaterthan1,thenthenumbersbeingaddedgetlargerandlargerandsothesumisundefined.

Wewillsaymoreaboutthisseriesinthenextchapter.Inthemeantime,youmightwonderwhat it reallymeans to add up an infinite number of numbers.Howcouldsuchasumbeequaltoanything?That’safairquestion,andwewillattempttoansweritasweexplorethenatureofinfinity,wherewewillencountermanysurprising,puzzling,unintuitive,andbeautifulresults.

Page 313: The Magic of Math: Solving for x and Figuring Out Why

CHAPTERTWELVE

TheMagicofInfinity

InfinitelyInterestingLast, but certainly not least, let’s talk about infinity. Our journey began inChapter1withthesumofthenumbersfrom1to100:

1+2+3+4+···+100=5050

andweeventuallydiscoveredformulasforthesumofthenumbersfrom1ton:

andwediscoveredformulasforothersumswithafinitenumberofterms.Inthischapter,wewillexploresumsthathaveaninfinitenumberoftermslike

Page 314: The Magic of Math: Solving for x and Figuring Out Why

which, I hope, I will convince you has a sum that is equal to 2. Notapproximately2,butexactlyequalto2.Somesumshaveintriguinganswers,like

Andsomeinfinitesums,like

don’t add up to anything.We say that the sum of all the positive numbers isinfinity,denoted

1+2+3+4+5+···=∞

whichmeans that the sumgrowswithoutbound. Inotherwords, the sumwilleventuallyexceedanynumberyouwish:itwilleventuallyexceedonehundred,thenonemillion, thenonequadrillion, and so on.Andyet, by the endof thischapter,weshallseethatacasecouldbemadethat

Areyouintrigued?Ihopeso!Asweshallsee,whenyouenterthetwilightzoneof infinity, very strange things can happen, which is part of what makesmathematicssofascinatingandfun.

Isinfinityanumber?Notreally,althoughitsometimesgetstreatedthatway.Looselyspeaking,mathematiciansmightsay:

Technically, there isno largestnumber, sincewecanalwaysadd1 toobtainalargernumber.Thesymbol∞essentiallymeans“arbitrarilylarge”orbiggerthanany positive number. Likewise, the term − ∞ means less than any negativenumber.By theway, thequantities∞−∞(infinityminus infinity)and1/0areundefined.It istemptingtodefine1/0=∞,sincewhenwedivide1bysmallerand smaller positive numbers, the quotient gets bigger and bigger. But theproblem is thatwhenwedivide 1 by tinynegative numbers, the quotient gets

Page 315: The Magic of Math: Solving for x and Figuring Out Why

moreandmorenegative.

AnImportantInfiniteSum:TheGeometricSeriesLet’s startwith a statement that is accepted by allmathematicians, but seemswrongtomostpeoplewhentheyfirstseeit:

0.99999...=1

Everyone agrees that the two numbers are close, indeed extremely close, butmanystillfeelthattheyshouldnotbeconsideredthesamenumber.Letmetrytoconvince you that the numbers are in fact equal by offering various differentproofs.Ihopethatatleastoneoftheseexplanationswillsatisfyyou.

Perhapsthequickestproofisthatifyouacceptthestatementthat

thenwhenyoumultiplybothsidesby3youget

AnotherproofistousethetechniquethatweusedinChapter6 toevaluaterepeatingdecimals.Let’sdenotetheinfinitedecimalexpansionwiththevariablewasfollows:

w=0.99999...

Nowifwemultiplybothsidesby10,thenweget

10w=9.99999...

Subtractingthefirstequationfromthesecondgivesus

9w=9.00000...

whichmeansthatw=1.Here’s an argument that uses no algebra at all. Do you agree that if two

Page 316: The Magic of Math: Solving for x and Figuring Out Why

numbers are different, then theremust be a different number in between them(forinstance,theiraverage)?Thensuppose,tothecontrary,that0.99999...and1 were different numbers. If that were the case, what number would be inbetweenthem?Ifyoucan’tfindanothernumberbetweenthem,thentheycan’tbedifferentnumbers.

We say that twonumbers or infinite sums areequal if they arearbitrarilyclosetooneanother.Inotherwords,thedifferencebetweenthetwoquantitiesislessthananypositivenumberyoucanname,whetheritbe0.01or0.0000001or1dividedbyatrillion.Sincethedifferencebetween1and0.99999...issmallerthan any positive number, then mathematicians agree to call these quantitiesequal.

It’swiththesamelogicthatwecanevaluatetheinfinitesumbelow:

We can give this sum a physical interpretation. Imagine you are standing twometersawayfromawall,andyoutakeonebigstepexactlyonemetertowardthewall, thenanotherstephalfameter towardthewall, thenaquarterofameter,thenaneighthofameter,andsoon.Aftereachstep,thedistancebetweenyouand thewall is cut exactly in half. Ignoring the practical limitations of takingtinierandtiniersteps,youeventuallygetasclosetothewallasdesired.Hencethetotallengthofyourstepswouldbeexactlytwometers.

Wecanillustratethissumgeometrically,asinthefigurebelow.Westartwitha1-by-2rectanglewitharea2,thencutitinhalf,thenhalfagain,thenhalfagain,andsoon.Theareaofthefirstregionis1.Thenextregionhasarea1/2,thenthenextregionhasarea1/4,andsoon.Asngoestoinfinity,theregionsfilluptheentirerectangle,andsotheirtotalareais2.

Page 317: The Magic of Math: Solving for x and Figuring Out Why

Ageometricproofthat1+1/2+1/4+1/8+1/16+···=2

Foramorealgebraicexplanation,welookatthepartialsums,asgiveninthetablebelow.

Thepatternseemstoindicatethatforn≥0,

Wecanprovethisbyinduction(aswelearnedinChapter6)orasaspecialcaseofthefinitegeometricseriesformulabelow.

Theorem(finitegeometricseries):Forx≠1andn≥0,

Page 318: The Magic of Math: Solving for x and Figuring Out Why

Proof 1: This can be proved by induction as follows. When n = 0, theformula says that ,which is certainly true.Nowassume the formulaholdswhenn=k,sothat

Then theformulawillcontinue tobe truewhenn=k+1,sincewhenweaddxk+1tobothsides,weget

asdesired.

Alternatively,wecanprovethisbyshiftyalgebra,asfollows.Proof2:Let

S=1+x+x2+x3+···+xn

Thenwhenwemultiplybothsidesbyxweget

xS= x+x2+x3+···+xn+xn+1

Subtracting away the xS (pronounced “excess”),we havemassive amounts ofcancellation,leavinguswith

S−xS=1−xn+1

Inotherwords,S(1−x)=1−xn+1,andtherefore

Page 319: The Magic of Math: Solving for x and Figuring Out Why

asdesired.

Notice that when x = 1/2, the finite geometric series confirms our earlierpattern:

Asngetslargerandlarger,(1/2)ngetscloserandcloserto0.Thus,asn→∞,wehave

Aside

Here’s a joke that onlymathematicians find funny.An infinite number ofmathematicianswalkintoabar.Thefirstmathematiciansays,“I’dlikeoneglass of beer.” The second mathematician says, “I’d like half a glass ofbeer.”Thethirdmathematiciansays,“I’dlikeaquarterofaglassofbeer.”The fourth mathematician says, “I’d like an eighth of a glass. . . .” Thebartendershouts,“Knowyourlimits!”andhandsthemtwobeers.

Moregenerally,anynumberbetween−1and1thatgetsraisedtohigherandhigher powerswill get closer and closer to 0.Thuswe have the all-important(Infinite)geometricseries.

Theorem(geometricseries):For−1<x<1,

Page 320: The Magic of Math: Solving for x and Figuring Out Why

Thegeometricseriessolvesthelastproblembylettingx=1/2:

If thegeometric series looks familiar, it’sbecauseweencountered it at theendofthelastchapterwhenweusedcalculustoshowthatthefunctiony=1/(1−x)hasTaylorseries1+x+x2+x3+x4+···.

Let’sseewhatelsethegeometricseriestellsus.Whatcanwesayaboutthefollowingsum?

Whenwefactorthenumber1/4outofeachterm,thisbecomes

sothegeometricseries(withx=1/4)saysthatthissimplifiesto

Thatserieshasaparticularlybeautifulproofwithoutwordsasshownonthenextpage.Noticethatthedarksquaresoccupyexactlyone-thirdoftheareaofthebigsquare.

Wecanevenusethegeometricseriestosettlethe0.99999...question,sincean infinitedecimalexpansion is justan infinite series indisguise.Specifically,wecanusethegeometricserieswithx=1/10toget

Page 321: The Magic of Math: Solving for x and Figuring Out Why

Proofwithoutwords:1/4+1/16+1/64+1/256+···=1/3

The geometric series formula even works when x is a complex number,providedthatthelengthofxislessthan1.Forexample,theimaginarynumberi/2haslength1/2,sothegeometricseriestellsusthat

Page 322: The Magic of Math: Solving for x and Figuring Out Why

whichweillustrateonthenextpageonthecomplexplane.

Althoughthefinitegeometricseriesformulaisvalidforallvaluesofx≠1,the(infinite)geometricseriesformularequiresthat|x|<1.Forexample,whenx=2,thefinitegeometricseriescorrectlytellsus(aswederivedinChapter6)that

butsubstitutingx=2inthegeometricseriesformulasaysthat

Page 323: The Magic of Math: Solving for x and Figuring Out Why

whichlooksridiculous.(Althoughlookscanbedeceiving.Wewillactuallyseeaplausibleinterpretationofthisresultinourlastsection.)

Aside

Thereareinfinitelymanypositiveintegers:

1,2,3,4,5...

Therearealsoinfinitelymanypositiveevenintegers:

2,4,6,8,10...

Mathematicians say that the set of positive integers and the set of evenpositive integers have the same size (or cardinality or level of infinity)becausetheycanbepairedupwithoneanother:

A set that canbe pairedupwith the positive integers is calledcountable.Countablesetshavethesmallestlevelofinfinity.Anysetthatcanbelistediscountable,sincethefirstelementinthelistispairedupwith1,thesecondelementispairedupwith2,andsoon.Thesetofallintegers

...−3,−2,−1,0,1,2,3...

can’tbelistedfromsmallesttolargest(whatwouldbethefirstnumberonthelist?),buttheycanbelistedthisway:

0,1,−1,2,−2,3,−3...

Page 324: The Magic of Math: Solving for x and Figuring Out Why

Thusthesetofallintegersiscountable,andofthesamesizeasthenumberofpositiveintegers.

Howaboutthesetofpositiverationalnumbers?Thesearethenumbersoftheformm/nwheremandnarepositiveintegers.Believeitornot,thissetiscountabletoo.Theycanbelistedasfollows:

wherewe first list the fractions according to the sumof their numeratorsand denominators. Since every rational number appears on the list, thepositiverationalnumbersarecountabletoo.

Aside

Arethereanyinfinitesetsofnumbersthatarenotcountable?TheGermanmathematician Georg Cantor (1845–1918) proved that the real numbers,evenwhenrestrictedtothosethatliebetween0and1,formanuncountableset.Youmighttrytolistthemthisway:

0.1,0.2,...,0.9,0.01,0.02,...,0.99,0.001,0.002,...0.999,...

andsoon.Butthatwillonlygeneraterealnumberswithafinitenumberofdigits.For instance, thenumber1/3=0.333 . . .willneverappearon thislist. But could there be amore creativeway to list all the real numbers?Cantor proved that this would be impossible, by reasoning as follows.Suppose, to the contrary, that the real numbers were listable. To give aconcreteexample,supposethelistbeganas

Page 325: The Magic of Math: Solving for x and Figuring Out Why

Wecanprovethatsuchalist isguaranteedtobeincompletebycreatingarealnumberthatwon’tbeonthelist.Specifically,wecreatetherealnumber0.r1r2r3r4...wherer1isanintegerbetween0and9anddiffersfromthefirstnumberinthefirstdigit(inourexample,r1≠3)andr2differsfromthesecondnumberintheseconddigit(herer2≠7)andsoon.Forinstance,wemight create thenumber0.2674 . . . . Such anumber can’t beon the listanywhere.Whyisitnotthemillionthnumberonthelist?Becauseitdiffersin themillionth decimal place.Hence any example of a list you create isguaranteed to be missing some numbers, so the real numbers are notcountable. This is called Cantor’s diagonalization argument, but I like tocallitproofbyCantor-example.(Sorry.)

In essence, we have shown that although there are infinitely manyrational numbers, there are considerably more irrational numbers. If yourandomlychoosearealnumberfromtherealline,itwillalmostcertainlybeirrational.

Infiniteseriesarisefrequentlyinprobabilityproblems.Supposeyourolltwo6-sideddicerepeatedlyuntila totalof6or7appears. Ifa6occursbeforea7occurs, then you win the bet. Otherwise, you lose. What is your chance ofwinning?Thereare6×6=36equallylikelydicerolls.Ofthese,5ofthemhaveatotalof6(namely(1,5),(2,4),(3,3),(4,2),(5,1))and6ofthemhaveatotalof7((1,6), (2,5), (3,4), (4,3),(5,2), (6,1)).Henceitwouldseemthatyourchance of winning should be less than 50 percent. Intuitively, as you roll thedice, thereareonly5+6=11 rolls thatmatter—all the rest requireus to rollagain. Of these 11 numbers, 5 of them are winners and 6 are losers. Thus itwouldseemthatyourchanceofwinningshouldbe5/11.

We can confirm that the probability of winning is indeed 5/11 using the

Page 326: The Magic of Math: Solving for x and Figuring Out Why

geometricseries.Theprobabilityofwinningonthefirstrollofthediceis5/36.Whatisthechanceofwinningonthesecondroll?Forthistohappen,youmustnotrolla6or7onthefirstroll,thenrolla6onthesecondroll.Thechanceofa6or7onthefirstrollis5/36+6/36=11/36,sothechanceofnotrolling6or7is25/36.Tofindtheprobabilityofwinningonthesecondroll,wemultiplythisnumber by the probability of rolling a 6 on any individual roll, 5/36, so theprobabilityofwinningon thesecond roll is (25/36)(5/36).Towinon the thirdroll,thefirsttworollsmustnotbe6or7,thenwemustroll6onthethirdroll,which has probability (25/36)(25/36)(5/36).The probability ofwinning on thefourth roll is (25/36)3(5/36), and so on. Adding all of these probabilitiestogether,thechanceofwinningyourbetis

aspredicted.

TheHarmonicSeriesandVariationsWhen an infinite series adds up to a (finite) number, we say that the sumconvergestothatnumber.Whenaninfiniteseriesdoesn’tconverge,wesaythattheseriesdiverges. Ifan infinite seriesconverges, then the individualnumbersbeingsummedneed tobegettingcloserandcloser to0.Forexample,wesawthattheseries1+1/2+1/4+1/8+···convergedto2,andnoticethattheterms1,1/2,1/4,1/8...aregettingcloserandcloserto0.

But the converse statement is not true, since it is possible for a series todivergeeven if the termsareheading to0.Themost importantexample is theharmonicseries,sonamedbecausetheancientGreeksdiscoveredthatstringsoflengths proportional to 1, 1/2, 1/3, 1/4, 1/5, . . . could produce harmonioussounds.

Page 327: The Magic of Math: Solving for x and Figuring Out Why

Theorem:Theharmonicseriesdiverges.Thatis,

Proof:Toprovethatthesumisinfinity,weneedtoshowthatthesumgetsarbitrarilylarge.Todothiswebreakupoursumintopiecesbasedonthenumberofdigits in thedenominator.Notice thatsincethefirst9 termsareeachbiggerthan1/10,therefore

Thenext90termsareeachbiggerthan1/100,andso

Likewise,thenext900termsareeachbiggerthan1/1000.Thus,

Continuingthisway,weseethat

andsoon.Hencethesumofallofthenumbersisatleast

whichgrowswithoutbound..

Aside

Page 328: The Magic of Math: Solving for x and Figuring Out Why

Here’safunfact:

where γ is the number 0.5772155649 . . . (called the Euler-Mascheroniconstant)andlnnisthenaturallogarithmofn,describedinChapter10.(Itis not known if γ, pronounced “gamma,” is rational or not.) Theapproximationgetsbetterasngetslarger.Hereisatablecomparingthesumwiththeapproximation.

Equallyfascinatingis thefact that ifweonlylookatprimedenominators,thenforalargeprimenumberp,

whereM=0.2614972 . . . is theMertensconstant and theapproximationbecomesmoreaccurateaspgetslarger.

Oneconsequenceofthisfactisthat

butitreallycrawlstoinfinitybecausethelogofthelogofpissmall,evenifp is quite large. For instance, when we sum the reciprocals of all primenumbersbelowgoogol,10100,thesumisstillbelow6.

Let’sseewhathappenswhenyoumodifytheharmonicseries.Ifyouthrowaway a finite number of terms, the series still diverges. For example, if youthrow away the first million terms , which sums to a little

Page 329: The Magic of Math: Solving for x and Figuring Out Why

morethan14,theremainingtermsstillsumtoinfinity.If you make the terms of the harmonic series larger, then the sum still

diverges.Forexample,sincefor wehave

But making each term smaller does not necessarily mean that the sum willconverge.Forexample,ifwedivideeachtermintheharmonicseriesby100,itstilldiverges,since

Yettherearechangestotheseriesthatwillcauseittoconverge.Forinstance,ifwesquareeachterm,theseriesconverges.AsEulerproved,

Infact,itcanbeshown(throughintegralcalculus)thatforanyp>1,

converges to some number below . For example, when p = 1.01, even

thoughthetermsarejustslightlysmallerthanthetermsoftheharmonicseries,wehaveaconvergentseries

Suppose we remove from the harmonic series any number with a 9 in itsomewhere.Inthissituation,wecanshowthattheseriesdoesnotsumtoinfinity(and thereforemust converge to something).Weprove thisbycounting the9-lessnumberswithdenominatorsofeach length.For instance,webeginwith8fractionswithone-digitdenominators,namely through .Thereare8×9=72two-digit numbers without 9, since there are 8 choices for the first digit

Page 330: The Magic of Math: Solving for x and Figuring Out Why

(anythingbut0or9)and9choicesfortheseconddigit.Likewise,thereare8×9× 9 three-digit numbers without 9s, and more generally, 8 × 9n−1 n-digitnumberswithout 9s.Noting that the largest of the one-digit fractions is 1, thelargesttwo-digitfractionis ,andthelargestthree-digitfractionis ,wecanbreakourinfiniteseriesintoblocksasfollows,

andsoon.Thesumofallofthenumbersisatmost

bythegeometricseries.Hence,the9-lessseriesconvergestoanumberlessthan80.

Oneway to think of the convergence of this series is that almost all largenumbershavea9inthemsomewhere.Indeed,ifyougeneratearandomnumberwitheachdigitrandomlychosenfrom0to9,thechancethatthenumber9wasnotamongthefirstndigitswouldbe(9/10)n,whichgoes to0asngets largerandlarger.

Aside

If we treat the digits of π and e as random strings of digits, then it is avirtual certainty that your favorite integer appears somewhere in thosenumbers. For example, my favorite four-digit number, 2520, appears asdigits1845through1848ofπ.Thefirst6Fibonaccinumbers1,1,2,3,5,8,appearbeginningatdigit820,390.It’snottoosurprisingtoseethisamong

Page 331: The Magic of Math: Solving for x and Figuring Out Why

thefirstmilliondigits,sincewitharandomlygeneratednumber,thechancethatthedigitsofaparticularsix-digitlocationmatchesyournumberisonein amillion.Sowith about amillion six-digit locations, your chances arepretty good. On the other hand, it is rather astonishing that the number999999 appears so early in π, beginning at digit 763. Physicist RichardFeynman once remarked that if he memorized π to 767 decimal places,peoplemight think that π was a rational number, since he could end hisrecitationwith“999999andsoon.”

Thereareprogramsandwebsitesthatwillfindyourfavoritedigitstringsinside π and e. Using one of these programs, I discovered that if Imemorizedπ to 3000 decimal places, it would endwith 31961,which isamazingtomebecauseMarch19,1961,happenstobemybirthday!

IntriguingandImpossibleInfiniteSumsLet’ssummarizesomeofthesumswehaveseensofar.

Webeganthischapterbyinvestigating

Wesawthatthiswasaspecialcaseofthegeometricseries,whichsaysthatforanyvalueofxwhere−1<x<1,

Noticethatthegeometricseriesalsoworksfornegativenumbersbetween0and−1.Forinstance,whenx=−1/2,itsays

A series that alternates between positive and negative numbers that aregettingcloserandclosertozeroiscalledanalternatingseries.Alternatingseriesalwaysconvergetosomenumber.Toillustratewiththealternatingseriesabove,

Page 332: The Magic of Math: Solving for x and Figuring Out Why

drawthereallineandputyourfingeronthenumber0.Thenmoveittotherightby1,thengototheleftby1/2,thengototherightby1/4.(Atthispoint,yourfingershouldbeonthepoint3/4.)Thengototheleftby1/8(sothatyourfingerisnowonthepoint5/8),andsoon.Yourfingerwillbehominginonasinglenumber,inthiscase2/3.

Nowconsiderthealternatingseries

Afterfourterms,weknowthattheinfinitesumisatleast1−1/2+1/3−1/4=7/12=0.583...,andafterfiveterms,weknowthatitisatmost1−1/2+1/3−1/4+1/5=47/60=0.783. . . .Theeventual infinite sum isa littlemore thanhalfwaybetweenthesetwonumbers,namely0.693147....Usingcalculus,wecanfindtherealvalueofthisnumber.

Asawarm-upexercise,takethegeometricseries:

andlet’sseewhathappenswhenwedifferentiatebothsides.RecallfromChapter11 that thederivativesof1,x,x2,x3,x4,and soonare, respectively,0,1,2x,3x2,4x3,andsoon.Thus,ifweassumethatthederivativeofaninfinitesumisthe(infinite)sumofthederivatives,andusethechainruletodifferentiate(1−x)−1,thenwegetfor−1<x<1,

Nextlet’stakethegeometricserieswithxreplacedby−x,sothatfor−1<x<1,

Nowwe take the anti-derivative of both sides, known to calculus students asintegration. To find the anti-derivative, we go backward. For instance, the

Page 333: The Magic of Math: Solving for x and Figuring Out Why

derivativeofx2is2x,sogoingbackward,wesaythattheanti-derivativeof2xisx2.(Asatechnicalnoteforcalculusstudents,thederivativeofx2+5,orx2+π,orx2+cforanynumberc,isalso2x,sotheanti-derivativeof2xisreallyx2+c.)Theanti-derivativesof1,x,x2,x3,x4, and so on are, respectively x,x2/2,x3/3,x4/4,x5/5,andtheanti-derivativeof1/(1+x)isthenaturallogarithmof1+x.Thatis,for−1<x<1,

(Technicalnoteforcalculusstudents:theconstanttermontheleftsideis0,sincewhenx=0,wewanttheleftsidetoevaluatetoln1=0.)Asxgetscloserandcloserto1,wediscoverthenaturalmeaningof0.693147...,namely

Aside

If we write the geometric series with x replaced with −x2, we get, for xbetween−1and1,

In most calculus textbooks, it is shown that y = tan−1 x has derivative.Thus, ifwe take theanti-derivativeofbothsides(andnote that

tan−10=0),weget

Lettingxgetcloserandcloserto1,weget

Page 334: The Magic of Math: Solving for x and Figuring Out Why

Wehaveseenhowthegeometricseriescanbeused,nowlet’sseehowitcanbeabused.Theformulaforthegeometricseriessaysthat

forvaluesofxwhere−1<x<1.Let’slookatwhathappenswhenx=−1.Thentheformulawouldtellusthat

Ofcourse that’s impossible;sinceweareonlyaddingandsubtracting integers,there isnoway that theyshouldsumtoa fractionalvalue like1/2,even if thesum converged to something. On the other hand, the answer isn’t entirelyridiculous,becausewhenwelookatthepartialsumswehave

andsoon.Sincehalfofthepartialsumsare1andhalfofthepartialsumsare0,theanswer1/2isn’ttoounreasonable.

Usingtheillegalvaluex=2,thegeometricseriessays

Thisanswerlooksevenmoreridiculousthanthelastsum.Howcanthesumofpositive numbers possibly be negative? And yet maybe there is a reasonableinterpretationforthissumtoo.Forinstance,inChapter3,weencounteredwaysinwhichapositivenumbercouldactlikeanegativenumber,withrelationshipslike

Page 335: The Magic of Math: Solving for x and Figuring Out Why

10≡−1(mod11)

allowingustomakestatementslike10k≡(−1)k(mod11).Here’sawaytounderstand1+2+4+8+16+···thatrequiresthinking

outoftheboxalittle.RecallthatinChapter4,weobservedthateverypositiveintegercanberepresentedasthesumofpowersof2inauniqueway.Thisisthebasis for binary arithmetic, which is the way digital computers performcalculations.Everyintegerusesafinitenumberofpowersof2.Forinstance,106=2+ 8+ 32+ 64 uses just four powers of 2.But now suppose thatwe alsoallowed infinite integers, where we could use as many powers of 2 as wewanted.Atypicalinfiniteintegermightlooklike

1+2+8+16+64+256+2048+···

with powers of 2 appearing forever. What these numbers would represent isunclear, butwe could comeupwith consistent rules for doing arithmeticwiththem.Forinstance,wecouldaddsuchnumbersprovidedthatweallowedcarriestooccurinthenaturalway.Forinstance,ifweadd106totheabovenumber,wewouldget

where the 2+ 2 combine to create the 4; next, the 8+ 8 forms 16, butwhenaddedtothenext16createsa32,whichwhenaddedtothenext32creates64,which when added to the two 64s creates 64 and 128. Everything from 256onward is unchanged.Now imaginewhat happenswhenwe take the “largest”infiniteintegerandadd1toit.

Theresultwouldbeanever-endingchainreactionofcarryingwithnopowerof2appearingbelowtheline.Hence,thesumcanbethoughtofas0.Since(1+2+4+8+16+···)+1=0,thensubtracting1frombothsidessuggeststhatthe

Page 336: The Magic of Math: Solving for x and Figuring Out Why

infinitesumbehaveslikethenumber−1.Hereismyfavoriteimpossibleinfinitesum:

We“prove”thisbytheshiftyalgebraapproachthatweusedinthesecondproofof the finite geometric series. Although the shifty approach is valid for finitesums, itcan lead tononsensical-lookingresults for infinitesums.For instance,let’sfirstuseshiftyalgebratoexplainanearlieridentity.Wewritethesumtwice,butshiftthetermsoverbyonespaceinthesecondsumasfollows:

Addingtheseequationstogethergivesus

2S=1

andthereforeS=1/2,asweassertedearlier,whenwesetx=−1inthegeometricseries.

Aside

Wecanusetheshiftyalgebraapproachtogiveaquick,butnotquitelegal,proofofthegeometricseriesformula.

Subtractingthesetwoequationsgivesus

S(1−x)=1

andtherefore

Page 337: The Magic of Math: Solving for x and Figuring Out Why

Nextwe claim that the alternating version of our desired sum also has aninterestinganswer,namely

Here’stheshiftyalgebraproof.Writingthesumtwice,weget

Whenweaddtheseequationsweget

2T=1−1+1−1+1−1+1−1+···

Therefore2T=S=1/2andsoT=1/4,asclaimed.Finally,let’sseewhathappenswhenwewritethesumofallpositiveintegers

asUandunderneaththatwewritetheprevious(andunshifted)sumT.

Subtractingthesecondequationfromthefirstonereveals

U−T=4+8+12+16+···=4(1+2+3+4+···)

Inotherwords,

U−T=4U

SolvingforU,weget3U=−T=−1/4,andtherefore

U=−1/12

asclaimed.

Page 338: The Magic of Math: Solving for x and Figuring Out Why

Fortherecord,whenyouaddaninfinitenumberofpositiveintegers,thesumdiverges to infinity.But before youdismiss all of these finite answers as puremagicwith no redeemingqualities, it is possible that there is a contextwherethisactuallymakessense.Byexpandingourviewofnumbers,wesawawayinwhichthesum1+2+4+8+16+···=−1wasnotsoimplausible.Recallalsothat when we confined numbers to the real line, it was impossible to find anumberwithasquareof−1,yetthisbecamepossibleonceweviewedcomplexnumbersasoccupantsoftheplanewiththeirownconsistentrulesofarithmetic.Infact,theoreticalphysicistswhostudystringtheoryactuallyusethesum1+2+ 3 + 4 + · · · = −1/12 result in their calculations. When you encounterparadoxical results like the sums shown here, you could just dismiss them asimpossibleandbedonewithit,butifyouallowyourimaginationtoconsiderthepossibilities,thenaconsistentandbeautifulsystemcanarise.

Let’s end this bookwith onemore paradoxical result.At the beginning ofthissectionwesawthatthealternatingseries

converged to thenumber ln2=0.693147. . . . If you add thesenumbers in adifferentorder,youwouldnaturallyexpect tostillget thesamesum,since thecommutativelawofadditionsaysthat

A+B=B+A

foranynumbersAandB.Andyet, lookwhathappenswhenwe rearrange thesuminthefollowingway:

Notethatthesearethesamenumbersbeingsummed,sinceeveryfractionwithanodddenominatorisbeingaddedandeveryfractionwithanevendenominatorisbeingsubtracted.Eventhoughtheevennumbersarebeingusedupattwiceasfastarateastheoddnumbers,theybothhaveaninexhaustiblesupply,andeveryfraction from the original sum appears exactly once in the new sum.Agreed?Butnoticethatthisequals

Page 339: The Magic of Math: Solving for x and Figuring Out Why

whichisone-halfoftheoriginalsum!Howcanthisbe?Howisitpossiblethatwhenwe rearrangea collectionofnumbers,wecanget a completelydifferentnumber? The surprising answer is that the commutative law of addition canactuallyfailwhenyouareaddinganinfinitenumberofnumbers.

Thisproblemarisesinaconvergentserieswheneverboththepositivetermsandthenegativetermsformdivergentseries.Inotherwords,thepositivetermsadd to ∞ and the negative terms add to −∞. Suchwas the case with our lastexample. These sequences are called conditionally convergent series and,amazingly,theycanberearrangedtoobtainanytotalyoudesire.Howwouldwerearrangethelastsumtoget42?Youwouldaddenoughpositivetermsuntilthesum just exceeds 42, then subtract your first negative term. Then add morepositive terms until it exceeds 42 again. Then subtract your second negativeterm.Repeating thisprocess,yoursumwilleventuallygetcloserandcloser to42. (For instance, after subtracting your fifth negative term, −1/10, you willalwaysbewithin0.1of42.Aftersubtractingthefiftiethnegativeterm,−1/100,youwillalwaysbewithin0.01of42,andsoon.)

Mostof the infinite series thatweencounter inpracticedonotexhibit thisstrangesortofbehavior.Ifwereplaceeachtermwithitsabsolutevalue(sothateachnegativetermisturnedpositive),thenifthatnewsumconverges,thentheoriginalseriesiscalledabsolutelyconvergent.Forexample,thealternatingseriesweencounteredearlier,

is absolutely convergent, since when we sum the absolute values we get thefamiliarconvergentseries

Withabsolutelyconvergentseries,thecommutativelawofadditionwillalways

Page 340: The Magic of Math: Solving for x and Figuring Out Why

work,evenwithinfinitelymanyterms.Thusinthealternatingseriesabove,nomatterhow thoroughlyyou rearrange thenumbers1,−1/2,1/4,−1/8 . . . , therearrangedsumwillalwaysconvergeto2/3.

Unlikeaninfiniteseries,abookhastoendsometime.Wedon’tdaretotrytogobeyondinfinity,sothisseemslikeagoodplacetostop,butIcan’tresistonelastmathemagicalexcursion.

Encore!MagicSquares!Asarewardformakingitallthewaytotheendofthebook,hereisonemoremagical mathematical topic for your enjoyment. It has nothing to do withinfinity,butitdoeshavetheword“magic”squarelyinitstitle:magicsquares.Amagic square is a square grid of numbers where every row, column, anddiagonal add to the same number. The most famous 3-by-3 magic square isshownbelow,whereallthreerows,allthreecolumns,andbothdiagonalsaddto15.

A3-by-3magicsquarewithmagictotal15

Here’s a little-known fact about this magic square that I call the square-palindromicproperty.Ifyoutreateachrowandcolumnasa3-digitnumberandtakethesumoftheirsquares,youwillfindthat

4922+3572+8162=2942+7532+6182

4382+9512+2762=8342+1592+6722

Asimilarphenomenonoccurswith someof the“wrapped”diagonals, too.Forinstance,

4562+3122+8972=6542+2132+7982

Page 341: The Magic of Math: Solving for x and Figuring Out Why

Magic“squares”indeed!Thesimplest4-by-4magicsquareusesthenumbers1through16whereall

rows,columns,anddiagonalssumtothemagictotalof34,liketheonebelow.Mathematiciansandmagicians like4-by-4magicsquaresbecause theyusuallycontaindozensofdifferentwaystoachievethemagictotal.Forinstance,inthemagicsquarebelow,everyrow,column,anddiagonaladdsto34,asdoesevery2-by-2squareinsideit,includingtheupperleftquadrant(8,11,13,2),thefournumbers in the middle, and the four corners of the magic square. Even thewrappeddiagonalssumto34,asdothecornersofany3-by-3squareinside.

Amagicsquarewithtotal34.Everyrow,column,anddiagonalsumsto34,asdonearlyeveryothersymmetricallyplacedfoursquares.

Doyouhaveafavoritetwo-digitnumberbiggerthan20?YoucaninstantlycreateamagicsquarewithtotalTjustbyusingthenumbers1though12,alongwiththefournumbersT−18,T−19,T−20andT−21asshownonthenextpage.

Forexample,seethemagicsquareonthenextpagewithamagictotalofT=55.Everygroupoffourthatusedtoaddupto34willnowaddupto55,aslongasthegroupof4includesexactlyone(nottwo,notzero)ofthesquaresthatusethevariableT.Sotheupperrightsquareswillhavethecorrecttotal(35+1+7+12=55)butthemiddleleftsquareswillnot(34+2+3+37≠55).

AquickmagicsquarewithmagictotalT

Page 342: The Magic of Math: Solving for x and Figuring Out Why

Amagicsquarewithtotal55

Althoughnoteveryonehasafavoritetwo-digitnumber,everyonedoeshaveabirthday,andIfindthatpeopleappreciatepersonalizedmagicsquaresthatusetheir birthdays. Here is a method that I use for creating a “double birthday”magicsquare,wherethebirthdayactuallyappears twice: in the toprowandinthefourcorners.IfthebirthdayusesthenumbersA,B,C,andD, thenyoucancreatethefollowingmagicsquare.Noticethateveryrow,column,anddiagonal,andmost symmetrically placed groups of four squares, will add to themagictotalA+B+C+D.

Adoublebirthdaymagicsquare.ThedateA/B/C/Dappearsinthetoprowandfourcorners.

Formymother’sbirthday,November18,1936,themagicsquarelookslikethis:

Abirthdaymagicsquareformymother:11/18/36,withmagictotal38

Nowcreate amagic squarebasedonyourownbirthday. If you follow thepatterngivenabove,yourbirthdaytotalwillappearmorethanthreedozentimes.Seehowmanyyoucanfind.

Although 4-by-4 magic squares have the most combinations, there aretechniquesforcreatingmagicsquaresofhigherorder.Forexample,hereisa10-

Page 343: The Magic of Math: Solving for x and Figuring Out Why

by-10magicsquareusingallthenumbersfrom1to100.

A10-by-10magicsquareusingnumbers1through100

Can you figure out the magic total of each row, column, and diagonalwithoutaddingupanyoftherows?Sure!Sinceweshowedalongtimeagothatnumbers 1 through 100 add to 5050, each rowmust add to one-tenth of that.Hencethemagictotalmustbe5050/10=505.Thisbookbeganwiththeproblemofadding thenumbers from1 to100,andso it seemsappropriate thatweendhereaswell.Congratulations(andthankyou)forreadingtotheendofthebook.We covered a great many mathematical topics, ideas, and problem-solvingstrategies.Asyougobackthroughthisbookandreadotherbooksthatrelyonmathematical thinking, I hope you find the ideas presented in this book to beuseful,interesting,andmagical.

Page 344: The Magic of Math: Solving for x and Figuring Out Why

Aftermath

Ihopethatthisisnotthelastmathbookyoueverread,sincethereissomuchgoodmaterialout there. Indeed,mostof thereally interestingmath that Ihavelearned came from outside of the classroom, and includedmany of the itemslistedhere.

This book is an outgrowth of my video course The Joy of Mathematics,produced by The Great Courses. That course contains twenty-four 30-minutelecturesbymeonallofthetopicscoveredinthisbook,plusafewmoretopics,likeTheJoyofProbability,MathematicalGames,andMagic.(Iamgratefulfortheirwillingness to letmeborrowmany ideas from thatcourse for thisbook.)TheGreatCourseshasmorethanthreedozenmathematicscourses(availableonaudio, video, and downloadable formats) on many mathematical topics,includingentirecoursesdevoted to topics likealgebra,geometry,calculus,andhistoryofmathematics.Theyhavedoneanexcellentjobatfindingsomeofthebestprofessors in thecountry to teach thesecourses,and ithasbeenanhonorand a privilege to create four courses for them. My other three courses areDiscrete Mathematics, The Secrets of Mental Math, and The Mathematics ofGamesandPuzzles.

Forprintedinformationondoingmathinyourhead,seemybookSecretsofMentalMath, written withMichael Shermer, published by RandomHouse. Itgoes into great detail on how to quickly and accurately answer all kinds ofproblems,bigandsmall.Ifyouknowyourmultiplicationtablesthrough10,thenyoushouldbeabletounderstandallofthetechniquesinthebook.Foramoreelementaryapproach,Ihavecreatedaworkbookondoingmentaladditionandsubtraction that is aimed at elementary-school-age children, calledThe Art ofMentalCalculation(co-authoredandbeautifullyillustratedbyNatalyaSt.Clair).YoucanfinditonAmazon.comorcreatespace.com.

I have written three other mathematics books for advanced readers. The

Page 345: The Magic of Math: Solving for x and Figuring Out Why

MathematicalAssociationofAmerica(MAA)haspublishedProofsThatReallyCount:TheArtofCombinatorialProof,withJenniferJ.Quinn,andBiscuitsofNumber Theory, co-edited with Ezra Brown. My most recent book is TheFascinating World of Graph Theory with Gary Chartrand and Ping Zhang,publishedbyPrincetonUniversityPress.

I owe a literary debt of gratitude to Martin Gardner, the greatestmathemagicianofall time,whowrotemorethantwohundredbooks,manyonthesubjectofrecreationalmathematics.Hisbooks(and“MathematicalGames”columns inScientific American) inspiredmany generations ofmathematiciansandmath enthusiasts. Following inGardner’s footsteps, I also recommend allbooks by Alex Bellos, Ivars Peterson, and Ian Stewart. One of the best newbooksinthisgenreisTheJoyofX:AGuidedTourofMath,fromOnetoInfinitybyStevenStrogatz.

For mathematics textbooks aimed at the high end of the math abilityspectrum,IamahugefanofTheArtofProblemSolvingbookseries,byRichardRusczyk. These include challenging but clearly written books on algebra,geometry, calculus, problem solving, and more. Their website(ArtOfProblemSolving.com) also offers online courses for studentswho enjoymathematicsandparticipateinmathcontests.

Thereareotherenjoyableonlineresourcestoo.MycolleagueFrancisSuhashundreds of examples of amazing mathematics on his Math Fun Facts page(www.math.hmc.edu/funfacts).Theywereoriginallydesignedfor teacherswhowantedtodosomethingquickandinterestinginthefirstfiveminutesofclass.AlexBogomolnyhascreatedawebsite,Cut theKnot (Cut-The-Knot.org)withdozensof“InteractiveMathematicsMiscellanyandPuzzles”thatwillkeepyouentertained for a long time. One of his columns provides over one hundredproofsofthePythagoreantheorem.Forafun,freevideoresource,checkoutthevideoscreatedbyNumberphile(Numberphile.com),whichpresentmathematicsinamostentertainingway.

Ihavenothingmoretoadd(ormultiply),sohappyreading!

Page 346: The Magic of Math: Solving for x and Figuring Out Why

Acknowledgments

Thisbookwouldnothaveexistedwithout thepersistentencouragementofmyliterary agent, Karen Gantz Zahler, and the enthusiastic support from myextraordinaryeditor,TJKelleher,fromBasicBooks.

Icannot imaginehowIcouldhaveevercompleted thisprojectwithout theinvaluable assistance of Natalya St. Clair, who created the many figures,illustrations,andmathematicaldiagramsthatadornthisbook.Natalyahasagiftformakingmathematicslookbeautifulandisajoytoworkwith.

IreceivedtonsofvaluablefeedbackfrommyformerstudentSamGutekunst,who carefully read every chapter of this book. Sam improved the book in somanyways that hemade TJ’s job considerably easier. Iwas also fortunate tohavethekeeneyesofmathematiciansAmyShell-GellaschandVincentMatsko,whoreadeverychapterandofferedmanysuggestionsthatsignificantlyimpactedthefinalproduct.

IamfortunatetohavesomanywonderfulcolleaguesandstudentsatHarveyMuddCollege.Special thanks toProfessorFrancisSu formany conversationsand his Math Fun Facts website, and Scott and Carol Ann Smallwood forendowing the Smallwood Family Chair inMathematics. I am also grateful toChristopher Brown, Gary Chartrand, Jay Cordes, John Fort, Ron Graham,Mohamed Omar, Jason Rosenhouse, and Natalya St. Clair for valuablediscussionsandideas.

IamgratefultoEthanBrownforsharinghismnemonicsformemorizingτ,DougDunham for permission to use his butterfly image,DaleGerdemann forcreating the Sierpinski diagram,MikeKeith for permission to use his greatπtribute, “Near a Raven,” mathemusicians Larry Lesser and Dane Camp forpermission to use their lyrics to “Mathematical Pi” and “Knowin’ Induction,”andNatalyaSt.Clairforthe“GoldenRose”photo.

ThankstotheveryprofessionalstaffatPerseusBooks.Itwasapleasureto

Page 347: The Magic of Math: Solving for x and Figuring Out Why

workwithQuynhDo,TJKelleher,CassieNelson,MelissaVeronesi,SueWarga,andJeffWilliams(alongwithcountlessotherswhoworkedbehindthescenes).

I owe an enormous thank you to The Great Courses for producing suchwonderful DVD courses that have allowed me to bring mathematics to themasses in a way that I never thought possible, and for permitting me toextensivelyborrowmaterialfrommyJoyofMathematicscoursewhenpreparingthisbook.Throughoutallof thesecourses, JayTatehasbeenan indispensableresource.

Ithankmywonderfulparents,LarryandLenoreBenjamin,andtheteacherswho shapedwho I am today. I shall be forever grateful to elementary schoolteachersBettyGold,MaryAnnSparks,JeanFisler,andthestudentsandfacultyof themath and appliedmath departments atMayfieldHighSchool,CarnegieMellonUniversity,JohnsHopkinsUniversity,andHarveyMuddCollege.

Andmostofall, I thankmywife,Deena,anddaughters,LaurelandAriel,for their love and patience as this book was being written. Deena proofreadeverything I wrote and hasmy eternal love and gratitude. Thank you Deena,Laurel,andArielforaddingsomuchmagictomylife.

ArthurBenjaminClaremont,California

2015

Page 348: The Magic of Math: Solving for x and Figuring Out Why

Index

AAStheorem,159Abel,Niels,47absolutevalue,302absolutelyconvergent,302algebra,20distributivelaw,29–30FOILruleof,30–36,38fundamentaltheoremof,46,141,234goldenruleof,27graphsand,41–47rulesof,26–30shifty,283,298–299solvingforx,36–40solvingfory,48–49

alternateinteriorangles,157alternatingseries,295altitudeoftriangle,172“AmericanPi”(Lesser),202

Page 349: The Magic of Math: Solving for x and Figuring Out Why

anglesalternateinterior,157bisector,160corresponding,156–157perpendicular,155right,155sumsof,156(fig.)sumsof,ofpentagon,167(fig.)supplementary,155–156,213vertical,156

anti-derivatives,296approximations,128arcsinefunction,214Archimedes,196area,169–172ofcircles,182–193ofellipses,190(fig.)ofrectangles,108–109,152ofsquare,173–174surface,191,192oftriangles,171,187,217

arithmetic,fundamentaltheoremof,141ASAtheorem,159axioms,125correspondingangle,157ofEuclid,153–154SAS,159

baseten,61–62basepoints,277bellcurve,194formula,247(fig.)

Benjamin,Arthur,322binaryarithmetic,297–298binaryrepresentation,139Binet’sformula,232Fibonaccinumbersand,116forLucasnumbers,118

binomialcoefficients,76–77Pascal’sidentityand,87

birthdays,304–305“Blowin’intheWind”(Dylan),133Brown,Dan,119Brown,Ethan,201

cadences,102–103Caesar,Julius,64calculus,162differential,257

Page 350: The Magic of Math: Solving for x and Figuring Out Why

integral,257magicof,255–263

Page 351: The Magic of Math: Solving for x and Figuring Out Why

calendarcalculating,63–70Gregorian,64historyof,64Julian,64leapyears,64mnemonicsfor,65–66monthcodes,66–67weekdaynames,66yearcodes,67–68

Camp,Dane,133Cantor,Georg,289cards,decksof,73Seealsopokerhands

Carroll,Lewis,199castingoutnines,53–59divisionand,57–58multiplicationand,56–57

centralangletheorem,186Cervantes,Miguelde,64–65chainrule,271–272checkdigit,62

Page 352: The Magic of Math: Solving for x and Figuring Out Why

checkerboardsdominoscovering,122–123trominoscovering,137

circles,155areaof,182–193circumferenceof,182–193diameterof,182–183magicof,181–182majorarcof,186minorarcof,186radiusof,182,185trigonometryand,210–219unit,188,210,237,238(fig.)

circumference,182–193definitionof,183

circumscribedpolygons,196clinometer,208clocks,60(fig.)coefficients,32–33binomial,76–77,87

CollegeMathematicsJournal,119combinations,76combinatorialproof,87,131combinatorics,71,75commutativeproperty,9complements,16–17completingthesquare,39–40complexnumbers,233–240complexplane,235unitcirclein,238(fig.)

complexroots,46compositenumbers,112,141compoundinterest,242concavity,275conditionallyconvergent,301cone,192congruences,60–61congruentobjects,158congruenttriangles,158(fig.)constantterms,33constructiveproofs,130contradiction,126convergence,290–291absolute,302conditional,301

conversestatements,126corollaries,129correspondingangles,156axiom,157

cosecantfunction,208

Page 353: The Magic of Math: Solving for x and Figuring Out Why

cosinefunction,206,212(fig.)graphsof,228(fig.)

cosines,lawof,215,216cotangentfunction,208countability,288counterexamples,126counting,29Fibonaccinumbers,102–110

criticalpoints,264cryptography,145–146

Page 354: The Magic of Math: Solving for x and Figuring Out Why

cubessumsof,11–12sumsof,identity,136

cubics,44

Page 355: The Magic of Math: Solving for x and Figuring Out Why

cylindersurfaceareaof,191volumeof,191

daVinci,Leonardo,119TheDaVinciCode(Brown,D.),119degreeofpolynomials,44delegations,139denominators,23derivatives,228productrulefor,266–268

Descartes,René,41diameter,182–183differencesofsquaresformula,14,33proofof,34

differentialcalculus,257differentiation,261rules,265–274

digitalroots,54Dirichlet,Peter,147distinctpowers,94

Page 356: The Magic of Math: Solving for x and Figuring Out Why

distributivelawdefinitionof,29FOILand,31illustrationof,29–30negativenumbersand,30

divergence,291dividingbyzero,

Page 357: The Magic of Math: Solving for x and Figuring Out Why

divisionmental,20–24numberofdigits,22

domino,107oncheckerboard,122–123

Dunham,Douglas,154Dylan,Bob,133

e(number),240–250Earth’sequator,181–182,184TheElements(Euclid),153eleven,60–63ellipses,189areaof,190(fig.)fociof,190

encryption,145–146endpoints,averageof,164(fig.)

Page 358: The Magic of Math: Solving for x and Figuring Out Why

equationsbeautiful,232linear,36–37quadratic,37,39–40solving,36–40

equilateraltriangle,159,161,205Escher,M.C.,154

Page 359: The Magic of Math: Solving for x and Figuring Out Why

estimationmental,20–24ofnumberofdigits,21–22

Euclid,121,144–145axiomsof,153–154

Euclideangeometry,154Euler,Leonhard,146–147,231Euler-Mascheroniconstant,292Euler’sequation,251–253evennumberstheorem,125–126exclamationpoints,71–72existenceproof,129exponentialdecay,243exponentialformula,242exponentialfunctions,243(fig.),265exponentiation,lawof,129exponents,lawof,47

factorials,71–72factoringmethod,19,38fastmentalcalculations,12–24Fermat,Pierrede,41onprimenumbers,145

Feynman,Richard,294Fibonaccinumbers,2,178,232additionofsquaresof,108applicationsof,99Binet’sformulaand,116consecutive,111counting,102–110distantneighbors,109–110firstsix,1,1,2,3,5,8firstthirteen,99(table)greatestcommondivisorsof,112inductionand,109,134limericksand,120Lucasnumbersand,117(table)magicof,97–102,113(table)multiplicationof,109(table),110(table)innature,99neighbors,109Pascal’striangleand,95,103–104patterns,110–120poetryof,120(table)prime,112–113rabbits,97–99relativelyprime,111sequencesthataddton,103(table)shifting,103

Page 360: The Magic of Math: Solving for x and Figuring Out Why

squaresof,106(table)sumofeven,100–101sumofodd,102astilings,105

Fibonaccisequence,97financialtransactions,145–146flushes,79–80fociofellipses,190FOILrule,30–36,38,57,234applicationsof,32distributivelawand,31

footballfields,151–152

Page 361: The Magic of Math: Solving for x and Figuring Out Why

formulasbellcurve,247(fig.)Binet’s,116,118,232differencesofsquares,14,33,34exponential,242Hero’s,219quadratic,38Wallis’s,197

fourofakind,81fractions,additionof,127–128fullhouse,80fundamentaltheoremofalgebra,46,234fundamentaltheoremofarithmetic,141

Gadbois,Steve,83Gauss,KarlFriedrich,10,20numberpatterns,5–6

geometricseries,280–290finite,283infinite,284–286

geometricalproofs,136

Page 362: The Magic of Math: Solving for x and Figuring Out Why

geometryclassics,153–169ofcomplexnumbers,235–240Euclidean,154hyperbolic,154magicof,149–153,178–179plane,154

goalposts,151–152,177God’sequation,2,231proofof,252

Goldbach’sconjecture,147goldenratio,2,115culturalperceptionsof,119namingof,118propertiesof,119

goldenrectangle,119goldenruleofalgebra,27Google,244

Page 363: The Magic of Math: Solving for x and Figuring Out Why

graphsalgebraand,41–47linesin,41orderedpairsand,41parabolas,43–44parallel,42slopein,41x-axisof,41y-axisof,41–42y-interceptin,41

greatcircles,154greatestcommondivisors,112Gregoriancalendar,64GregoryXIII(Pope),64GuinnessBookofWorldRecords,198

Hardy,G.H.,121harmonicseries,290–294Hartl,Michael,201HarveyMuddCollege,3Hemachandra,102Hero’sformula,219hexadecimalsystem,61–62hexagons,195–196hockeystickidentity,89–90,90(fig.)hockeyteams,89–90hyperbolicgeometry,154hypotenuse,173

i(number),232icecreamflavors,76–77

Page 364: The Magic of Math: Solving for x and Figuring Out Why

identityhockeystick,89–90,90(fig.)Pascal’s,86,87sumofcubes,136trigonometric,219–225

if-thentheorem,125imaginaryaxis,235imaginarynumbers,2,37,233

Page 365: The Magic of Math: Solving for x and Figuring Out Why

inductionFibonaccinumbersand,109,134proofby,131–140strong,140

index,311infiniteintegers,298infiniteseries,45geometric,284–286impossible,294–302

infinity,279–280inscribedhexagons,195–196integers,125composite,141infinite,298

integralcalculus,257integration,296interest,compound,242Internet,145–146TheInterview(film),28inversetrigonometricfunctions,214,215(fig.)irrationalnumbers,127–131ISBN,62–63isoscelesrighttriangle,204isoscelestriangles,159theorem,151,160

“Jabberwocky”(Carroll),199Jackson,Andrew,247joker,83Juliancalendar,64junkhands(poker),82

Keith,Mike,198,199Kilmer,Joyce,253

Lambert,JohannHeinrich,197

Page 366: The Magic of Math: Solving for x and Figuring Out Why

lawsofcosines,215,216ofexponentiation,129ofexponents,47ofsines,218–219

leapyears,64legs,173lemmas,268length,productsand,238LeonardoofPisa,97Lesser,Larry,133,202LiberAbaci(LeonardoofPisa),97licenseplates,75limericks,120limits,260productsof,262ofquotients,262sumsand,262

linearapproximation,276linearequations,36–37

Page 367: The Magic of Math: Solving for x and Figuring Out Why

linesingraphs,41midpointof,164(fig.)parallel,156secant,258tangent,257,259(fig.)

logarithms,243–244natural,245,272

lotteries,76–84lowestterms,128Lu,Chao,198Lucas,Édouard,117

Page 368: The Magic of Math: Solving for x and Figuring Out Why

LucasnumbersBinet’sformulafor,118Fibonaccinumbersand,117(table)

Page 369: The Magic of Math: Solving for x and Figuring Out Why

magicofalgebra,25–26ofcalculus,255–263ofcircles,181–182ofFibonaccinumbers,97–102,113(table)ofgeometry,149–153,178–179ofinfinity,279–280mathematicsand,1ofnine,51–52numbersand,51–53squares,302–305

majorarc,186majorsystem,199Markowski,George,119Marloshkovips,Tony,199Mars,143matchingproblem,248

Page 370: The Magic of Math: Solving for x and Figuring Out Why

mathematicslawsof,121magicand,1permanenceand,121

max-minproblems,264–265mediant,115memorypalace,202

Page 371: The Magic of Math: Solving for x and Figuring Out Why

mentalcalculationsaddition,15division,20–24estimation,20–24fast,12–24multiplication,17–20subtraction,16–17

Mertensconstant,292midpoint,161ofline,164(fig.)triangle,165

minorarc,186“MisconceptionsAbouttheGoldenRatio”(Markowski),119modulararithmetic,60–63monthcodes,66–67mountainheights,203–204,209,218multiplesofnine,52–53

Page 372: The Magic of Math: Solving for x and Figuring Out Why

multiplicationadditionmethod,18castingoutninesand,56–57ofclosenumbers,34–35commutativepropertyof,9ofFibonaccinumbers,109(table),110(table)mental,17–20ofnegativenumbers,30ofnumberscloseto100,14–15subtractionmethodin,18table,21(table),23–24Seealsoproducts

myfavoritenumber,2520why?,141

naturallogarithm,245,272negativenumbers,37distributivelawand,30multiplicationof,30

Newton,Isaac,47n-gon,166nine(number)castingout,53–59magicof,51–52multiplesof,52–53

NotaWake(Keith),199numberpatterns,5–12beautyof,12factorial,73(table)Fibonacci,110–120Gaussand,5–6

Page 373: The Magic of Math: Solving for x and Figuring Out Why

numberscomplex,233,235–240composite,112even,125–126imaginary,2,37,233interesting,147irrational,127–131magicand,51–53negative,30,37odd,7,10–11,92–93,126,131–132Pascal’strianglewith,85perfect,146rational,127–131real,37relativelyprime,111studyof,5sumoffirst100,5–6sumoffirstn,7sumoffirstneven,7sumoffirstnodd,7triangular,6–7

obtusetriangle,159

Page 374: The Magic of Math: Solving for x and Figuring Out Why

oddnumbersinPascal’striangle,92–93sumoffirstn,7sumsof,131–132theoremabout,126intriangles,10–11

one(number),140–141onepair,811.61,113–115optimization,255theorem,264–265

orderedpairs,41origin,210oversubtracting,16

Pacioli,Luca,119Palais,Bob,201parabolas,43propertiesof,44vertexof,44

parallel,42parallellines,156parallelograms,150partialsums,282Pascal’sidentity,86binomialcoefficientsand,87

Pascal’striangle,84–95additionofnumbersin,86–87Fibonaccinumbersand,95,103–104oddnumbersin,92–93patternsin,92asrighttriangle,89symmetryin,85

pentagons,166sumsofanglesof,167(fig.)

perfectnumbers,146perfectsquares,8perimeters,169–172ofinscribedhexagons,195–196ofrectangles,152

period,229permutations,76perpendicularangles,155perpendicularbisectors,161phoneticcodes,199pi,2,52,183–184celebrating,198–202digitsof,195–197memorizing,198–202

Page 375: The Magic of Math: Solving for x and Figuring Out Why

surprisingappearanceof,193–195transcendental,197

Pi-Day,198pizza,187–188,193planegeometry,154plusorminussymbol,38Poe,EdgarAllan,198–199poetry,120(table)pokerhands,76–78flushes,79–80fourofakind,81fullhouse,80jokersin,83junk,82onepair,81straight,80straightflush,80threeofakind,81twopair,81valueof,83–84wildcards,83

polarform,238polygons,166circumscribed,196triangulationof,168

polyhedrons,232

Page 376: The Magic of Math: Solving for x and Figuring Out Why

polynomialscubic,44degreeof,44quadratic,44quartic,44quintic,44rootsof,45Taylor,276

populationdynamics,97–99postulates.Seeaxiomspowerrule,61,263

Page 377: The Magic of Math: Solving for x and Figuring Out Why

primenumbersFermaton,145Fibonacci,112–113infinitelymany,144–145proofsand,140–147relatively,111twoas,140–141Wilson’stheoremon,144

Page 378: The Magic of Math: Solving for x and Figuring Out Why

productruleforderivatives,266–268proofs,266

Page 379: The Magic of Math: Solving for x and Figuring Out Why

productsofcomplexnumbers,238–240lengthand,238oflimits,262ofnumbersthataddto20,12(table)ruleof,73–76

Page 380: The Magic of Math: Solving for x and Figuring Out Why

proofsbyalgebra,139axiomsin,125combinatorial,87,131constructive,130bycontradiction,126conversestatementsin,126counterexamplesin,126existence,129geometrical,136ofGod’sequation,252byinduction,131–140involvingtrominos,137–138irrationalnumbers,127–131ofnegatives,121–122productrule,266ofPythagoreantheorem,173–174ofquotientrule,271rationalnumbers,127–131stronginduction,140ofsumofcubesidentity,136ofuniquefactorizationtheorem,142valueof,121–127

pseudoprimes,145publickeycryptography,145–146Pythagoreantheorem,173–177inareaofsquarecalculation,173–174proofsof,173–174

Pythagoreantriple,205

quadrants,214quadraticequations,37completingsquares,39–40

quadraticformula,38quadraticfunctions,43quadraticpolynomials,44quadrilaterals,166definition,149midpointsof,150(fig.)

quartics,44quintics,44

Page 381: The Magic of Math: Solving for x and Figuring Out Why

quotientsoflimits,262rule,270–271

rabbits,97–99radians,226–230radius,182,185Ramanujan,Srinivasa,189

Page 382: The Magic of Math: Solving for x and Figuring Out Why

rationalnumbersaveragesof,128proofs,127–131

“TheRaven”(Poe),198–199realline,232realnumbers,37reciprocals,23rectangles,7(fig.)areaof,108–109,152fences,150–151golden,118,119perimetersof,152

reflections,162,273relativelyprimenumbers,111rightangles,155

Page 383: The Magic of Math: Solving for x and Figuring Out Why

righttrianglesisosceles,204Pascal’striangleas,89

Page 384: The Magic of Math: Solving for x and Figuring Out Why

rootscomplex,46digital,54ofpolynomials,45square,37

ruleofproducts,73–76ruleofsum,73–76

SASaxiom,159secantfunction,208secantline,258slopeof,260(fig.)

SecretsofMentalMath(BenjaminandShermer),62semi-perimeter,219Shakespeare,William,64–65shiftyalgebra,283,298–299Sierpinskitriangle,93sinefunction,206,212(fig.)graphsof,228(fig.)

sines,lawof,218–219slantheight,192slope,258ingraphs,41ofsecantline,260(fig.)

solvingforx,36–40solvingfory,48–49sphere,191squareroot,37squares,8(fig.)additionof,ofFibonaccinumbers,108additionofconsecutive,106areaof,173–174differenceof,14,33–34ofFibonaccinumbers,106(table)magic,302–305perfect,8quickcalculationsof,13–14

SSStheorem,161Stirling’sapproximation,193–194,232straight,80straightflush,80stronginduction,140

Page 385: The Magic of Math: Solving for x and Figuring Out Why

subtractioncomplementsin,16mental,16–17methodinmultiplication,18

Page 386: The Magic of Math: Solving for x and Figuring Out Why

sumsofangles,156(fig.)ofanglesofpentagon,167(fig.)ofcubes,11–12ofcubesidentity,136ofeven-positionedFibonaccinumbers,100–101offirst100numbers,5–6offirstnevennumbers,7offirstnnumbers,7offirstnoddnumbers,7limitsand,262ofnumbersinmultiplicationtable,21,23–24ofoddnumbers,131–132ofodd-positionedFibonaccinumbers,102partial,282ruleof,73–76Seealsoaddition

supplementaryangles,155–156,213

Page 387: The Magic of Math: Solving for x and Figuring Out Why

surfaceareaofcone,192ofcylinder,191ofsphere,191

syllables,102–103symmetryinPascal’striangle,85

tangentfunction,206tangentline,257approximationof,259(fig.)

tau,201Taylor,Brook,275Taylorpolynomials,276Taylorseries,274–278Tetris,124The,1–310

Page 388: The Magic of Math: Solving for x and Figuring Out Why

theoremsAAS,159ASA,159centralangle,186evennumbers,125–126if-then,125oddnumbers,126optimization,264–265Pythagorean,173–177SSS,159,161

30-60-90triangle,205threeofakind,81

Page 389: The Magic of Math: Solving for x and Figuring Out Why

tilingsbreakable,106Fibonaccinumbersas,105identities,107unbreakable,106

transcendental,197treeheights,208–209triangles,6–7,158altitudeof,172areaof,171,187,217congruent,158(fig.)equilateral,159,161,205isosceles,151,159,160isoscelesright,204midpointtheorem,165obtuse,159right,89,204Sierpinski,93–9430–60–90,205SeealsoPascal’striangle

triangularnumbers,6–7triangulation,168trigonometricgraphs,226–230trigonometricidentities,219–225trigonometry,201,204circlesand,210–219

trominos,137“TheTwelveDaysofChristmas,”90–91twinprimes,147twopair,81

unbreakabletilings,106uncountablesets,289uniquefactorizationtheorem,141proofof,142

unit,141unitcircle,188,210,237,238(fig.)

variables,26vertex,44verticalangletheorem,156volume,191vonLindemann,Ferdinand,197

Wallis’sformula,197waterfountain,44(fig.)weekdaynames,66wildcards,83Wilson’stheorem,144

Page 390: The Magic of Math: Solving for x and Figuring Out Why

x,solvingfor,36–40x-axis,41

y,solvingfor,48–49y-axis,41–42yearcodes,67–68y-intercept,41

zipcodes,75

Page 391: The Magic of Math: Solving for x and Figuring Out Why

ARTHURBENJAMINholdsaPhDfromJohnsHopkinsUniversityandistheSmallwood Family Professor of Mathematics at Harvey Mudd College. Dr.Benjaminhasreceivednumerousawardsforhiswritingandteaching,andservedas editor of Math Horizons magazine for the Mathematical Association ofAmerica. He has given three TED talks, which have been viewed over 10milliontimes.Reader’sDigestcallshim“America’sbestmathwhiz.”TheauthorofSecretsofMentalMath,helivesinClaremont,California,withhiswifeandtwodaughters.