Practical Mathematica
Practical Mathematica
Dr. Pragati Gautam Kamala Nehru College, University of Delhi Swapnil Verma Kamala Nehru College, University of Delhi
Ane Books Pvt. Ltd. New Delhi i Chennai
Practical Mathematica Dr. Pragati Gautam and Swapnil Verma
© Authors First Edition : 2019 , Reprint : 2020 Price: ` 795/Pages: xii + 340 Size: 8.5” × 11”
Published by
Ane Books Pvt. Ltd. 4821, Parwana Bhawan, 1st Floor, 24 Ansari Road, Darya Ganj, New Delhi - 110 002, Tel.: +91(011) 23276843-44, Fax: +91(011) 23276863 e-mail:
[email protected], Website: www.anebooks.com
Branch Office: Avantika Niwas, 1st Floor, 19 Doraiswamy Road, T. Nagar, Chennai - 600 017, Tel.: +91(044) 28141554, 28141209 e-mail:
[email protected],
[email protected]
ISBN : 978-93-88264-80-8 $OOULJKWVUHVHUYHG1RSDUWRIWKLVERRNPD\EHUHSURGXFHGLQDQ\IRUPLQFOXGLQJSKRWRFRS\LQJPLFUR¿OPVSKRWRSULQWVVWRUDJHLQDQ\UHWULHYDO system, transmission in any permanent or temporary form, without the prior written consent of the publisher. Printed at: Repro Knowledgecast Limited, Thane.
Syllabus of Practical Paper C1 – Calculus Practicals, Semester -1(CBCS) Plotting of graphs of function of type (greatest integer function), ( even and odd positive integer), ( even and odd positive integer), ( a positive integer) , discuss the effect of and on the graph, Plotting the graphs of polynomial of degree 4 and 5, the derivative graph, the second derivative graph and comparing them. Sketching parametric curves, tracing of conics in Cartesian coordinates, obtaining surface of revolution of curves, sketching of ellipsoid, hyperboloid of one and two sheets, elliptic cone, elliptic paraboloid, hyperbolic paraboloid XVLQJ&DUWHVLDQFRRUGLQDWHVWR¿QGQXPEHUVEHWZHHQWZRUHDOQXPEHUVDQGSORWWLQJRI¿QLWHDQGLQ¿QLWHVXEVHW of R, matrix operations (addition, multiplication, inverse, transpose, determinant, rank, eigenvectors, eigenvalues, &KDUDFWHULVWLFHTXDWLRQDQGYHUL¿FDWLRQRI&D\OH\+DPLOWRQHTXDWLRQV\VWHPRIOLQHDUHTXDWLRQV *UDSKRI+\SHUEROLFIXQFWLRQVFRPSXWDWLRQRIOLPLWGLIIHUHQWLDWLRQDQGLQWHJUDWLRQRIYHFWRUIXQFWLRQVFRPSOH[ numbers and their representations, operations like addition, multiplication, division, modulus, Graphical representation of polar form.
C4 - Differential Equations Practicals, Semester -2(CBCS) Plotting of second order solution family of differential equation, Plotting of third order solution family of differential equation. Growth model (exponential case only), Decay model (exponential case only), Lake pollution model (with constant/ VHDVRQDOÀRZDQGSROOXWLRQFRQFHQWUDWLRQ &DVHRIVLQJOHFROGSLOODQGDFRXUVHRIFROGSLOOV/LPLWHGJURZWKRI population (with and without harvesting), Predatory -prey model (Basic Volterra Model, with density dependence, HIIHFWRI''7WZRSUH\RQHSUHGDWRU (SLGHPLFPRGHORILQÀXHQ]DEDVLFHSLGHPLFPRGHOFRQWDJLRXVIRUOLIH disease with carriers). Battle model (basic battle model, jungle warfare, long range weapons). Plotting of recursive sequences,study the convergence of sequences through plotting,verify Bolzano Weierstrass theorem through plotting of sequences and hence identify convergent subsequences from the plot, study the FRQYHUJHQFHGLYHUJHQFHRILQ¿QLWHVHULHVE\SORWWLQJWKHLUVHTXHQFHVRISDUWLDOVXP&DXFK\¶VURRWWHVWE\SORWWLQJ nth roots, Ratio test by plotting the ratio of nth and n+1th term, study the convergence of sequences through plotting.
PREFACE :KHQHYHUDQ\RQHRIXVVHHVDQHZERRNRQ3UDFWLFDOLQ0DWKHPDWLFVWKH¿UVWTXHVWLRQWKDWFRPHVWRPLQG is why yet another book on the topic is required . Of course there is a plethora of titles on Practical in mathematics, from old classics to latest versions, which offer the students a wide range of choices; yet the needs, demands and expectations of student are as different as their socio-economic background, academic requirements and goals are. Therefore no matter how hard a book has been worked upon, it is next to impossible to be able to GHOLYHUDWH[WERRNWRHYHU\RQH¶VQHHGV0RVWVWXGHQWVHVSHFLDOO\LQ,QGLDWKHUHIRUHVWLOOUHO\ODUJHO\XSRQWKHQRWHV provided by their teachers to study the topics of the prescribed syllabi. The problem of being able to choose a VXLWDEOHWH[WERRNRI0DWKHPDWLFVLVPRUHZLWKWKHVWXGHQWVRI¿UVW\HDURIDQ8QGHUJUDGXDWH&RXUVH A beginner, therefore, needs a customized book that is at the same time easy to comprehend and covers plenty of applications along with the needed part of theory. This book is especially designed to cater to the QHHGVRIVXFKVWXGHQWVZKRVWXG\0DWKHPDWLFDLQWKH¿UVWVHPHVWHUDQGVHFRQGVHPHVWHURI%6F+RQV 0DWKHPDWLFVLQWKH8QLYHUVLW\RI'HOKLDQGRWKHU&HQWUDO8QLYHUVLWLHVZKHUHWKH&%&6FXUULFXOXPLVEHLQJRIIHUHG The text introduces the fundamentals of Practicals in Mathematica to the reader in the easiest form and is supplemented with solved examples. This Book will be very useful for students in preparing their core practical SDSHUVRI6HPHVWHU,DVZHOODV6HPHVWHU,,RQ&DOFXOXV$QDO\VLVDQG'LIIHUHQWLDO(TXDWLRQVRIIHUHGE\WKH 8QLYHUVLW\RI'HOKLXQGHU&%&6V\VWHP7KHDXWKRUVKDYHXWLOL]HGWKHLUZLGHH[SHULHQFHRIWHDFKLQJWKLVSDSHUWR 8QGHUJUDGXDWHFRXUVHVLQLQFRUSRUDWLQJPLQXWHVWRIWKHGHWDLOVZKLFKDEHJLQQHUPLJKW¿QGGLI¿FXOWWRXQGHUVWDQG 7KHOXFLGSUHVHQWDWLRQRIWKHWKHRU\LVZHOOFRPSOHPHQWHGE\SOHQW\RIVROYHGH[DPSOHVDQGXQVROYHGH[HUFLVHV,Q presence of so many books on Mathematica around, this title, for the targeted readers, will turn out to be the best in its class. The content of book is divided into two parts. The ¿UVWSDUWintroduces the students to Calculus which contains different types of functions, Conics and Concoids , Parametric curve and polar curves and their plotting etc.. Becoming familiar with the trigonometric functions, a student will thus connect with the book through this chapter very easily. The ¿UVWFKDSWHUintroduces the students to the Mathematica software, its launching and few basic commands. The second chapter, Operating in mathematica provides knowledge about texting features of mathematica and how to create a powerful presentation in it . The Third chapter is about plotting of function and their graphs. The fourth chapter introduces to the students the hyperbolic trigonometric functions and their sketching . The ¿IWK FKDSWHU provides quick introduction to the methods of calculus for vector valued functions and gives a foundation for study of multivariate calculus which they will study in the next semester. Sixth Chapter is on sketching of parametric and polar curve which may be studied independently. Chapter Seven and Eight together offer a good introduction to the methods of tracing of conics and are further applied to the study of Concoid section in Chapter Nine. Chapter Ten and Eleven are introduction to matrix operations and Plotting of real numbers. The Chapter Twelve of Part-1 is on Complex numbers , their operations and the graphical representation . The Second part of this book is on Differential equations and Analysis . The Chapter One is about Basics and Algebraic Calculations. Chapter Two provides a quick introduction to second and third order differential equation and plotting of its solutions. Chapter Three is about modeling in differential equations which covers all the existing models. These Modeling methods utilizes almost everything the reader has studied in theory, hence offering a panoramic view. Chapter Four is on Sequences and Chapter Five LVRQ,Q¿QLWH6HULHVZKLFKWHOOVDERXW SORWWLQJRIVHTXHQFHVFRQYHUJHQFHRIOLPLWV%RO]DQR:HLHUVWUDVVWKHRUHP&DXFK\URRWWHVWDQG'¶$OHPEHUW5DWLR test.
viii | Practical Mathematica
The authors feel highly grateful and would like to thank the founder and CEO of Wolfram Research for developing a great software which is extremely beneficial for Physics, Mathematics and Computer Science students. We are highly thankful to our families, friends and colleagues without whose good wishes this work would be difficult to complete. We are especially thankful to our colleagues in other colleges who shared their practical paper knowledge with us. We would like to express our thanks to our beloved student Riya Jain for helping us during the content development. We are also very thankful to ANE Books Pvt. Ltd. (Our Publisher) who not only showed faith in us but also kept us motivating to bring out the book in the present form. We sincerely KRSHWKDWWKHVWXGHQWVZLOO¿QGWKHWLWOHFRPSUHKHQVLYHDQGIULHQGO\DQGWKHERRNZLOOEHDEOHWRVHUYHLWVGHVLUHG purpose. Any kind of feedback from the readers in terms of suggestions, comments or criticisms is most welcome and it will help us to improve the book further. 10 th April, 2019
Authors
[email protected],
[email protected]
CONTENTS OF THE BOOK
Syllabus of Practical Paper
v
Preface
vii
UNIT 1 - CALCULUS ( SEMESTER 1)
CHAPTER 1 GETTING STARTED WITH MATHEMATICA
1-10
,QWURGXFWLRQWR0DWKHPDWLFD
+RZWRODXQFK0DWKHPDWLFD
1.3 Basic arithmetic computation
3
1.4 Writing commands in Mathematica
5
0DWK,QSXW3DOHWWH
0DWKHPDWLFDEXLOWLQFRQVWDQWV
1.7 Saving work and quitting Mathematica
9
1.8 Getting help with Mathematica
9
CHAPTER 2 OPERATING IN MATHEMATICA
11-16
+RZWRRSHQVDYHGQRWHERRNV
2.2
Writing text in notebook
11
,QVHUWLQJJUDSKLFVLQQRWHERRN
2.4
Writing assistant palette
12
2.5
Editing in Mathematica notebook
13
&RQYHUWLQJQRWHERRNLQRWKHUIRUPDWV
2.7
Creating Slideshows
14
2.8
Printing the document
14
2.9
Loading packages
15
CHAPTER 3 PLOTTING OF FUNCTIONS
16-41
'H¿QLWLRQRID)XQFWLRQRU0DSSLQJ
3.2
17
Plotting of functions 3.2.1 Plotting of function By using Plot command
17
3.2.2 Plotting of function By Manipulate command
24
3ORWWLQJRIIXQFWLRQ%\$QLPDWLRQ
,QFOXGLQJ*UDSKLFV
3.4
Limits of a Function
33
3.5
Derivatives of a function
34
3ORWWLQJRIGHULYDWLYHRIDIXQFWLRQ
3.7
37
Plotting of graphs of polynomials of degree 4 and 5, their derivative graph and comparing them
CHAPTER 4 HYPERBOLIC FUNCTION
42-53
,QWURGXFWLRQ
9DOXHVRI+\SHUEROLF)XQFWLRQ
x | Practical Mathematica
3ORWWLQJRI+\SHUEROLFIXQFWLRQV
,QYHUVH+\SHUEROLFIXQFWLRQ
9DOXHVRI,QYHUVH+\SHUEROLF)XQFWLRQ
3ORWWLQJRI,QYHUVH+\SHUEROLFIXQFWLRQV
4.7 Plotting of function by Manipulate/ Animate command
48
%RXQGHGQHVVDQGXQERXQGHGQHVVRI+\SHUEROLFIXQFWLRQV
'HULYDWLYHRID+\SHUEROLF)XQFWLRQ
CHAPTER 5 VECTOR VALUED FUNCTIONS
54-62
5.1
Vectors
54
5.2
Vector Valued Function
57
5.3
Limit of a Vector Valued Function
57
5.4
Algebra of Limits
58
5.4.1
Addition and Subtraction of Limits
58
5.4.2
Limit of a Scalar Multiple
58
5.4.3
Limit of a Dot and Cross product of a Vector Valued Functions
58
5.5
Differentiation of a vector valued function
,QWHJUDWLRQRIDYHFWRUYDOXHGIXQFWLRQ
CHAPTER 6 SKETCHING OF PARAMETRIC AND POLAR CURVES
59
63-80
'H¿QLQJD3DUDPHWULF&XUYH
6NHWFKLQJRI3DUDPHWULF&XUYHRQDSODQH
6NHWFKLQJRI3DUDPHWULF&XUYHE\3DUDPHWULF3ORWFRPPDQG
6NHWFKLQJRI3DUDPHWULF(TXDWLRQVE\XVLQJ0DQLSXODWH&RPPDQG
6NHWFKLQJRI3DUDPHWULF&XUYHVLQ'6SDFH
6NHWFKLQJRI3DUDPHWULF6XUIDFHLQ'6SDFH
3RODU&XUYHV
&RQYHUWLQJ&DUWHVLDQ&RRUGLQDWHVWR3RODU&RRUGLQDWHV &RQYHUWLQJ3RODU&RRUGLQDWHVWR&DUWHVLDQ&RRUGLQDWHV 7UDFLQJRI3RODU&XUYHV
CHAPTER 7 TRACING OF CONICS 7.1
7.2
Meaning of Conics
81-101 81
7.1.1 Circle
81
7.1.2 Parabola
83
7.1.3 Ellipse
87
+\SHUEROD
Tracing of Conics by Manipulation or Animation
CHAPTER 8 SURFACE OF REVOLUTION OF A CURVE
95
102-118
8.1 Surface of Revolution
102
8.2 Obtaining surface of revolution about x - axis , y- axis and z-axis
102
8.3 Obtaining surface of revolution about x-y axis , y-z axis and z-x axis
110
8.4 Miscellaneous examples
114
Contents | xi
CHAPTER 9 SKETCHING OF CONCOIDS
119-136
,QWURGXFWLRQWR&RQFRLGV
9.2
119
Ellipsoid
+\SHUERORLG
+\SHUERORLGRIRQHVKHHW
+\SHUERORLGRIWZRVKHHWV
(OOLSWLF&RQH
9.5
128
Paraboloid 9.5.1 Elliptical Paraboloid
128
+\SHUEROLF3DUDERORLG
CHAPTER 10 MATRICES
137-152
,QWURGXFWLRQ
10.2
139
Matrix operations
9HUL¿FDWLRQRI&D\OH\+DPLOWRQ(TXDWLRQ
10.4
144
System of linear equations +RPRJHQHRXV6\VWHPRIOLQHDUHTXDWLRQV
10.4.2 Nonhomogeneous system of linear equations
148
CHAPTER 11
PLOTTING OF FINITE AND INFINITE SUBSETS OF R
153-159
11.1 Finding a number between two real numbers
153
3ORWWLQJRI¿QLWHVXEVHWV
3ORWWLQJRILQ¿QLWHVXEVHWV
CHAPTER 12 COMPLEX NUMBERS AND THEIR REPRESENTATION
160-170
5HSUHVHQWDWLRQRIFRPSOH[QXPEHUV
&RQYHUVLRQRI&RPSOH[1XPEHUVWR3RODU)RUP
2SHUDWLRQVRQFRPSOH[QXPEHUV
*UDSKLFDOUHSUHVHQWDWLRQV
3ORWWLQJRI&RPSOH[1XPEHUV
3ORWWLQJRIVXPGLIIHUHQFHDQGSURGXFWRIFRPSOH[QXPEHUV
3ORWWLQJRI&RPSOH[1XPEHUVLQXQLWFLUFOH
UNIT 2 -DIFFERENTIAL EQUATIONS AND REAL ANALYSIS (SEMESTER 2)
CHAPTER 1 BASICS AND ALGEBRAIC CALCULATIONS
171-176
1.1 Algebraic calculations in Mathematica
171
1.2 Factoring and Expanding Polynomials
172
1.3 Some Logical Operators
174
6ROXWLRQRI,QHTXDOLWLHV
CHAPTER 2 PLOTTING OF SOLUTIONS OF FIRST, SECOND AND THIRD ORDER DIFFERENTIAL EQUATIONS
177-194
2.1 Differential Equations
177
2.1 First order differential equations
178
xii | Practical Mathematica
3ORWWLQJVROXWLRQVRI¿UVWRUGHUGLIIHUHQWLDOHTXDWLRQV
2.4 Second order ordinary differential equations
180
2.5 Plotting of solutions of family of second order differential equations
180
7KLUGRUGHUGLIIHUHQWLDOHTXDWLRQV
3ORWWLQJRIWKLUGRUGHUVROXWLRQRIIDPLO\RIGLIIHUHQWLDOHTXDWLRQV
CHAPTER 3 MODELLING IN MATHEMATICA
195-257
3.1 Growth model
195
3.2 Decay model
199
/DNHSROOXWLRQPRGHOZLWKFRQVWDQWVVHDVRQDOÀRZDQGSROOXWLRQFRQFHQWUDWLRQ
3.4 Case of single cold pill and a course of cold pill
210
3.5 Limited growth of population model(with and without harvesting)
214
2VFLOODWRU\JURZWKPRGHO3HULRGGRXEOLQJDQGFKDRWLFJURZWKPRGHO
3.7 Predator prey model
218
(SLGHPLFPRGHORILQÀXHQ]D
3.9 Battle model
232
CHAPTER 4 SEQUENCES
235-257
,QWURGXFWLRQWR6HTXHQFHV
6XEVHTXHQFH
%RXQGHG6HTXHQFH
'LYHUJHQW6HTXHQFH
2VFLOODWRU\6HTXHQFH
4.7 Limit theorems
237
4.8 Limit point of a sequence
237
4.9 Computation of limits in Mathematica
237
4.10 Study of the convergence of sequence by plotting its terms
237
6WXG\RIWKHFRQYHUJHQFH'LYHUJHQFHRIVHTXHQFHVE\¿QGLQJWKHLUOLPLWDQGLWVSORWWLQJ
4.12 Bolzano Weierstrass theorem
244
4.13 Cauchy Sequence
248
9HUL¿FDWLRQRIGH¿QLWLRQRI&DXFK\VHTXHQFHE\¿QGLQJYDOXHRIµP¶
4.15 Plotting of recursive sequences
253
CHAPTER 5 INFINITE SERIES
258-284
,Q¿QLWH6HULHV
5.2 Sequence of Partial Sums
258
&RQYHUJHQFHGLYHUJHQFHRILQ¿QLWHVHULHVE\SORWWLQJWKHLUVHTXHQFHVRISDUWLDOVXPV
&DXFK\¶V5RRWWHVW
'¶$OHPEHUW5DWLRWHVW
&RQYHUJHQFHRI6HULHV
SOLUTIONS TO THE CHAPTER EXERCISE BIBLIOGRAPHY
285-338 339
&+$37(5
*(77,1*67$57(':,7+0$7+(0$7,&$ 2%-(&7,9(6 7RGLVFXVVEULHIKLVWRU\RI0DWKHPDWLFD /DXQFKLQJRI0DWKHPDWLFDVRIWZDUH %DVLF1XPHULFDO&RPSXWDWLRQVLQ0DWKHPDWLFD &UHDWLQJ1RWHERRN,QWHUIDFH +RZWRXVHKHOSER[
,QWURGXFWLRQWR0DWKHPDWLFD 0DWKHPDWL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H\LFRQD0DWKH PDWLFDQRWHERRN ZLOODSSHDU RQ\RXUFRPSXWHUILOH V\VWHPZLWKILOH H[WHQ VLRQRIXQWLWOHGQE³QE´VWDQGVIRUQRWHERRN
)LJXUH
Getting Started with Mathematica | 3
1RWH 7R H[HFXWH \RXU FRPPDQG LQ PDWKHPDWLFD QRWHERRNSUHVV 6KLIW (QWHUNH\FRPELQDWLRQ 8VH &OHDU $OO FRPPDQG WR UHIUHVK \RXU FXUUHQW ZRUNLQJ QRWHERRN HQYLURQPHQW
1RZ \RXFDQ H[HFXWH \RXUZRUN LQ WKLV QRWHERRN DQG DIWHU ILQLVKLQJ \RXU ZRUN\RXFDQVDYH\RXUVHVVLRQ %DVLF$ULWKPHWLF&RPSXWDWLRQ 0DWKHPDWLFD VRIWZDUH KDV D YHU\ LQWHUDFWLYH HQYLURQPHQW )RU EDVLF DULWK PHWLF FDOFXODWLRQV OLNH DGGLWLRQ VXEWUDFWLRQ PXOWLSOLFDWLRQ DQG GLYLVLRQ LW ZRUNVMXVWOLNHDFDOFXODWRU+HUHDUHIHZH[DPSOHV In[1]:= Out[1]=
3 + 62 65
+HUHIRUVLPSOHDGGLWLRQZHXVHµ¶FRPPDQGZKLFKLVLQ\RXUNH\ERDUG )RU PXOWLSOLFDWLRQ µ ¶ RU µî¶ FRPPDQGV DUH XVHG:H FDQ DOVR XVH VSDFH EHWZHHQWZRQXPEHUVWRPXOWLSO\µ¶VWDQGVIRUGLYLVLRQ )RUH[DPSOH In[2]:= Out[2]=
In[3]:= Out[3]=
In[4]:=
2.3 + 5.63 7.93 2*3*4 24 36 24 3
Out[4]=
2
,QWKHDERYHH[DPSOHZHKDYHVHHQ0DWKHPDWLFDJLYHVRQO\DIUDFWLRQYDOXH LQ LWV ORZHVW WHUPV EXW LI ZH ZDQW WR JHW D QXPHULF DSSUR[LPDWH YDOXHZH VKRXOGXVH1LQRXUFRPPDQG )RUH[DPSOH In[5]:= Out[5]=
36 24 N 1.5
)RUDGGLQJWZRIUDFWLRQV