Marian Mureşan Introduction to Mathematica® with Applications r Introduction to Mathematica with Applications Marian Mures¸an Introduction to r Mathematica with Applications 123 MarianMures¸an FacultyofMathematicsandComputerScience Babes¸-BolyaiUniversity Cluj-Napoca,Romania ISBN978-3-319-52002-5 ISBN978-3-319-52003-2 (eBook) DOI10.1007/978-3-319-52003-2 LibraryofCongressControlNumber:2016963590 ©SpringerInternationalPublishingAG2017 Thisworkissubjecttocopyright.AllrightsarereservedbythePublisher,whetherthewholeorpartof thematerialisconcerned,specificallytherightsoftranslation,reprinting,reuseofillustrations,recitation, broadcasting,reproductiononmicrofilmsorinanyotherphysicalway,andtransmissionorinformation storageandretrieval,electronicadaptation,computersoftware,orbysimilarordissimilarmethodology nowknownorhereafterdeveloped. Theuseofgeneraldescriptivenames,registerednames,trademarks,servicemarks,etc.inthispublication doesnotimply,evenintheabsenceofaspecificstatement,thatsuchnamesareexemptfromtherelevant protectivelawsandregulationsandthereforefreeforgeneraluse. Thepublisher,theauthorsandtheeditorsaresafetoassumethattheadviceandinformationinthisbook arebelievedtobetrueandaccurateatthedateofpublication.Neitherthepublishernortheauthorsor theeditorsgiveawarranty,expressorimplied,withrespecttothematerialcontainedhereinorforany errorsoromissionsthatmayhavebeenmade.Thepublisherremainsneutralwithregardtojurisdictional claimsinpublishedmapsandinstitutionalaffiliations. Printedonacid-freepaper ThisSpringerimprintispublishedbySpringerNature TheregisteredcompanyisSpringerInternationalPublishingAG Theregisteredcompanyaddressis:Gewerbestrasse11,6330Cham,Switzerland To my wife Viorica, always with love Foreword The book (written by Professor Marian Mures¸an) is intended to present the Mathematica system in a manner in which the reader will find it easy to acquire a part of the considerable number of mathematical instruments offered by the producer, based on a large variety of examples taken from different scientific branches. The importance of the symbolic calculus is incontestable, since nowadays the scientific calculus is not reduced to the numerical one. Modern mathematical problems, or those appearing through modeling natural phenomena, lead to such complicated symbolic expressions that we need the help of computers to process them. The fast development of the computers’ technical capacity has enabled the genesis of a new domain—the symbolic (or formal) calculus—through which a genuinehuman–machinecollaborationisachieved.Thesymboliccalculussystems are aimed at automating difficult calculi. They provide simple access to many sophisticated mathematical instruments, using a simple yet flexible language, that allows avoidance of writing interminable subroutines (similarly to how it happens withutilizingtraditionallanguages). Itismainlymathematicalaspectsthatarecoveredinthisbook,sothatthereader canunderstandaspreciselyaspossiblehowtohandletheproblem.Atthesametime, theuseriswarnedwithregardtothetypeofproblemswhichcanbesolvedbymeans of the computer and the necessity of the analysis and verification of the results. Special emphasis is given to the fact that a session of Mathematica is typically interactive.Oftentherearemultiplewaystoapproachproblems,thechoiceofone ofthembeingmadeonthespot,accordingtotheanswerofthesystem.Thereader iscarefullyguidedtothemostsuitablechoice. Thebookcontains11chaptersonspecificaspectsoftheMathematicalanguage or branches of mathematics in general, such as ordinary differential equations, to which Chap.7 is dedicated. It is worth mentioning that part of the applications presented in the book have been elaborated by the author in recent years, being thesubjectofcertainscientificarticlesmentionedinthebibliography.Inthisbook, standardlinguisticconstructionsareused. vii viii Foreword The book is at an incredibly high scientific level, and it is useful to many categoriesofusers;forresearchers,professors,andstudentsinscientificfields,the knowledge of such a symbolic calculus system is nowadays indispensable. Math- ematics researchers can use the programs for testing some conjectures or even for provingsomeresultsthatneedabigamountofcalculation(indifferentialgeometry, number theory, combinatorics, theory of functions of complex variable, numeric calculus,differentialequations).Thebookisusefulforengineers,economists,and IT specialists, who can therefore benefit from easy access to a volume of vast mathematicalknowledge.Iwouldmentionthatpartsofthecontentofthisbookhave been presented during the scientific seminars held at the Faculty of Mathematics andComputerScience,havingbeenhighlyappreciated.Thankstoalloftheabove mentioned,IstronglyrecommendProf.MarianMures¸an’sbook. Cluj-Napoca,Romania Prof.ValeriuAnisiu August2016 Preface This book is the output of our work over several years. Being involved in calculus of variations and optimal control problems, we have realized that an exact calculation and a suggestive visualization are very useful, making the ideas addressed many times only in an "-ı language clearer. Then we have chosen Mathematicaforcomputationsandvisualizationsoftheideas.Whydidouroption go to Mathematica? The answer is simple: because we had noticed the wonderful resultsofProf.J.Borweinandhiscolleaguesregardingthedecimalsofnumber(cid:2). TheirapproachwasbasedonanextensiveuseofMathematica. Wolfram Research, located at Champaign, IL, USA, is the company which has beendevelopingMathematica. Mathematicaiscontinuouslydeveloping.WeusedMathematica10.3.Itisvery likelytherewillbenewerversionswithextrafacilitiesinthefuture. WehaveintroducednotionsandresultsinMathematicainourlecturestomaster studentsattheFacultyofMathematicsandComputerScienceoftheBabes¸-Bolyai UniversityinCluj-Napoca,Romania.WedidthesamethingwithourPhDstudents at three summer schools organized in the framework of the grant “Center of Excellence forApplications ofMathematics”supported byDAAD,Germany.The summer schools have been organized in Struga (Macedonia, FYROM), Sarajevo (BosniaandHerzegovina),andCluj-Napoca(Romania). This book is not very large, but it collects many examples. In the first part of thebook,theexamplesarediscussedindetailhelpingthereadertounderstandthe reasoning in and with Mathematica. Later on, the reader is led to use the benefit of the Help and other sources freely offered by Wolfram Research. We take into account mainly the Wolfram community forum as well as the video training and conferencesgenerouslyofferedbyWolframResearch. Awell-motivatedcaseforvisualizationinmathematicsiscontainedin [58]. Here is the right place to express my gratitude to the following colleagues of minefromtheFacultyofMathematicsandComputerScienceoftheBabes¸-Bolyai University for their support: Anca Andreica, Valeriu Anisiu, Paul Blaga, Virginia ix x Preface Niculescu, Adrian Petrus¸el, and Adrian Sterca. The existence and development of theMOS(Modeling,Optimization,andSimulation)ResearchCenterofourfaculty wasarealhelpforusinthepreparationofthisbook. Cluj-Napoca,Romania Prof.MarianMures¸an August2016 Contents 1 AboutMathematica......................................................... 1 1.1 Introduction........................................................... 1 1.1.1 Warning ..................................................... 3 2 FirstStepstoMathematica................................................. 5 2.1 TheIntroductoryTechniquesforUsingMathematica.............. 5 2.1.1 Numbers..................................................... 5 2.1.2 BracketinginMathematica ................................ 9 2.1.3 SetorSetDelayedOperator................................ 9 2.1.4 SomeSimpleSteps......................................... 10 3 BasicStepstoMathematica................................................ 13 3.1 ProblemsinNumberTheory,SymbolicManipulation, andCalculus.......................................................... 13 3.1.1 ProblemsinNumberTheory............................... 13 3.1.2 SymbolicManipulations ................................... 17 3.1.3 Texts......................................................... 19 3.2 Riemann(cid:3) Function.................................................. 20 3.3 SomeNumericalSequences ......................................... 20 3.3.1 TheFirstSequence ......................................... 20 3.3.2 TheSecondSequence ...................................... 21 3.3.3 TheThirdSequence ........................................ 22 3.4 Variables.............................................................. 23 3.5 Lists................................................................... 24 3.5.1 OperationswithLists....................................... 24 3.5.2 OperationswithMatrices................................... 28 3.5.3 InnerandOuterCommands................................ 31 3.5.4 AgainontheThirdSequence .............................. 34 4 SortingAlgorithms......................................................... 35 4.1 Introduction........................................................... 35 4.2 SortingMethods...................................................... 36 xi
Description: