An introduction to SAGE programming : with applications to SAGE interacts for mathematics Machine generated contents note: Preface vii 1. INTRODUCTION 1 1.1 What is Sage Math 1 1.2 Various Flavors of Sage Math 1 1.2.1 Sage Math on your Machine 1 1.2.2 Sage Cell 2 1.2.3 Sage Cloud 2 2. USING SAGE MATH AS A CALCULATOR 5 2.1 First Sage Math Examples 5 2.2 Computations 6 2.2.1 Basic Arithmetic Operators 6 2.2.2 Decimals vs Exact Values 10 2.2.3 Constants 11 2.2.4 Breaking Long Lines of Code 12 2.2.5 Comments 13 2.2.6 Library Functions 14 2.2.7 Working with Strings 17 2.2.8 Solving equations and inequalities 19 2.2.9 Calculus Functions 21 2.2.10 Exercises 25 2.3 Graphs 28 2.3.1 2D Graphs 28 2.3.2 3D Graphs 53 2.3.3 Exercises 54 3. INTRODUCTION TO PROGRAMMING IN SAGE 57 3.1 Variables 58 3.1.1 Exercises 61 3.2 More on Operators 61 3.2.1 Exercises 63 3.3 Making Decisions 64 3.3.1 Boolean Expressions 64 3.3.2 If statements 66 3.3.3 Exercises 73 3.4 Loops 75 3.4.1 For loops 75 3.4.2 Strings 82 3.4.3 While loops 84 3.4.4 Nested loops 88 3.4.5 Lists 91 3.4.6 Exercises 96 3.5 Functions 99 3.5.1 Using library functions. Random Scipy Numpy 104 3.5.2 Exercises 105 3.6 Interacts 107 3.6.1 Exercises 123 3.7 Application to Data Security: Caesars Cipher. Interacts strings and encryption 125 3.7.1 Exercises 127 3.8 Application to Business: Present Value of an Annuity. Amortization127 3.8.1 Exercises 133 3.9 Application to Elementary Statistics. Mean Median Histograms and Bar Charts. 134 3.9.1 Exercises 142 4. SAGE INTERACTS FOR NUMERICAL METHODS 143 4.1 Equations of Lines 143 4.1.1 Exercises 145 4.2 Tangent Lines and Plots 145 4.2.1 Exercises 149 4.3 Taylor Polynomials 149 4.3.1 Exercises 155 4.4 Riemann Sum and Denite Integrals 156 4.4.1 Exercises 162 4.5 Trapezoidal Rule for Numerical Integration 162 4.5.1 Exercises 170 4.6 Bisection Algorithm for Solving Equations 170 4.6.1 Exercises 179 4.7 Newton Raphson Algorithm for Solving Equations 179 4.7.1 Exercises 191 4.8 Polynomial Interpolation 192 4.8.1 Exercises 198 4.9 Linear Spline Interpolation 198 4.9.1 Exercises 202 4.10 Cubic Spline Interpolation 203 4.10.1 Exercises 212 4.11 SAGE for solving Differential Equations 212 4.12 Numerical Methods for Ordinary Differential Equations 215 4.12.1 Exercises 221 4.13 Numerical Methods for Partial Di&curren;erential Equations 222 4.13.1 Exercises 227 4.14 Scatter plots. Line of Best Fit and More 228 4.14.1 Exercises 236 4.15 Matrices Eigenvalues and Eigenvectors 236 4.15.1 Exercises 243 4.16 Solving Matrix Equations 243 4.16.1 Exercises 245 Bibliography 247 Index 249