Introduction to Symbolic Computation Release 1.0.0

Introduction to Symbolic Computation Release 1.0.0

Introduction to Symbolic Computation Release 1.0.0 Jan Verschelde May 02, 2019 Contents 0 Preface 1 1 Part I: First Steps 3 1.1 Lecture 1: Welcome!...........................................3 1.1.1 What is Computer Algebra?..................................3 1.1.2 What is SageMath?.......................................4 1.1.3 Running SageMath.......................................4 1.1.4 Which systems in SageMath are used?.............................5 1.1.5 Assignments..........................................5 1.2 Lecture 2: the notebook – structuring and documenting work flow...................5 1.2.1 the Jupyter notebook in CoCalc................................6 1.2.2 Formatting a Notebook.....................................6 1.3 Lecture 3: Sage as a Calculator – getting Help.............................8 1.3.1 Getting Started.........................................8 1.3.2 Getting Help..........................................9 1.3.3 The Packages in Sage...................................... 10 1.3.4 Assignments.......................................... 11 1.4 Lecture 4: Exact and Floating-Point Numbers.............................. 11 1.4.1 Integer and Rational Numbers................................. 11 1.4.2 Floating-Point Numbers.................................... 13 1.4.3 Assignments.......................................... 13 1.5 Lecture 5: Complex and Algebraic Numbers.............................. 14 1.5.1 Complex Numbers....................................... 14 1.5.2 Algebraic Numbers....................................... 15 1.5.3 Assignments.......................................... 17 1.6 Lecture 6: Symbols, Variables, and References............................. 17 1.6.1 Expressions and Names..................................... 18 1.6.2 Verification of Solutions.................................... 18 1.6.3 Evaluation of Expressions................................... 19 1.6.4 References and Shared Values................................. 20 1.6.5 Assignments.......................................... 21 1.7 Lecture 7: Data Types and Data Structures............................... 21 1.7.1 Coercing to the Basic Number Types.............................. 21 1.7.2 Random Numbers........................................ 22 1.7.3 Components of Expressions.................................. 23 1.7.4 Storing Data with Functions.................................. 23 i 1.7.5 Assignments.......................................... 25 1.8 Lecture 8: Evaluation and Execution.................................. 25 1.8.1 Addition and Multiplication Tables............................... 25 1.8.2 Expression Trees........................................ 28 1.8.3 Assignments.......................................... 31 1.9 Lecture 9: Input/Output Formats – Saving Data............................. 31 1.9.1 Files in Python......................................... 32 1.9.2 Saving and Loading SageMath Objects............................. 32 1.9.3 Pickling Objects......................................... 33 1.9.4 Assignments.......................................... 34 1.10 Lecture 10: Code Generation with Cython............................... 34 1.10.1 A Motivating Example..................................... 35 1.10.2 Executing in Pure Python.................................... 35 1.10.3 Vectorization with numpy.................................... 36 1.10.4 Cython code........................................... 37 1.10.5 Assignments.......................................... 38 2 Part II: Polynomials and Expressions 39 2.1 Lecture 11: Univariate and Multivariate Polynomials.......................... 39 2.1.1 Polynomials as Expressions.................................. 39 2.1.2 Univariate Polynomials..................................... 40 2.1.3 Multivariate Polynomials.................................... 42 2.1.4 Assignments.......................................... 42 2.2 Lecture 12: Rational Functions and Conversions............................ 43 2.2.1 Rational Expressions...................................... 43 2.2.2 Conversions........................................... 44 2.2.3 Assignments.......................................... 45 2.3 Lecture 13: Representation of Expressions............................... 45 2.3.1 Expression Trees........................................ 45 2.3.2 Evaluation of Expressions................................... 48 2.3.3 Assignments.......................................... 50 2.4 Lecture 14: Substitution, Expansion, and Factorization......................... 50 2.4.1 Substitution........................................... 50 2.4.2 Expansion............................................ 52 2.4.3 Factorization.......................................... 53 2.4.4 Assignments.......................................... 53 2.5 Lecture 15: Normalizing Expressions.................................. 53 2.5.1 Normal and Canonical Form.................................. 54 2.5.2 Rewriting Multivariate Polynomials.............................. 54 2.5.3 A Numerical Test on Equality................................. 55 2.5.4 Assignments.......................................... 55 2.6 Lecture 16: Review of the First 14 Lectures............................... 56 2.7 Lecture 17: the First Midterm Exam................................... 56 2.7.1 Questions on the Spring 2017 First Midterm Exam...................... 57 2.7.2 Questions on the Fall 2018 First Midterm Exam........................ 57 2.7.3 Questions on the Spring 2019 First Midterm Exam...................... 58 3 Part III: Calculus 61 3.1 Lecture 18: Defining Mathematical Functions.............................. 61 3.1.1 Functions in Sage and in Python................................ 61 3.1.2 Step Functions......................................... 62 3.1.3 Piecewise Functions...................................... 63 3.1.4 Combining Functions...................................... 63 3.1.5 Assignments.......................................... 63 ii 3.2 Lecture 19: Recursive Functions..................................... 64 3.2.1 Memoization in Python..................................... 64 3.2.2 Memoization in Sage...................................... 67 3.2.3 Assignments.......................................... 68 3.3 Lecture 20: Working with Functions................................... 69 3.3.1 List Comprehensions...................................... 69 3.3.2 Composing Functions...................................... 70 3.3.3 Functions Returning Functions................................. 72 3.3.4 Assignments.......................................... 73 3.4 Lecture 21: Symbolic and Numeric Differentiation........................... 73 3.4.1 Symbolic Differentiation.................................... 74 3.4.2 Numerical Differentiation.................................... 74 3.4.3 Implicit Differentiation..................................... 75 3.4.4 Plotting the Tangent Line.................................... 75 3.4.5 Assignments.......................................... 77 3.5 Lecture 22: Integration and Summation................................. 77 3.5.1 Indefinite and Definite Integrals................................ 78 3.5.2 Assisting the Integrator..................................... 78 3.5.3 Symbolic Summation...................................... 80 3.5.4 Assignments.......................................... 80 3.6 Lecture 23: Series, Approximations, and Limits............................. 81 3.6.1 Taylor Series.......................................... 81 3.6.2 Taylor Series in SymPy..................................... 82 3.6.3 Power Series.......................................... 82 3.6.4 Approximations......................................... 83 3.6.5 Limits.............................................. 85 3.6.6 Assignments.......................................... 85 3.7 Lecture 24: Symbolic-Numeric Computation.............................. 86 3.7.1 Interval arithmetic........................................ 86 3.7.2 Constrained Optimization.................................... 88 3.7.3 Assignments.......................................... 90 4 Part IV: Plotting and Solving Equations 91 4.1 Lecture 25: Two Dimensional Plots................................... 91 4.1.1 Plotting Formulas and Functions................................ 91 4.1.2 Curves in the Plane....................................... 94 4.1.3 Assignments.......................................... 97 4.2 Lecture 26: Plotting in Three Dimensions and Beyond......................... 99 4.2.1 Surface Plots.......................................... 99 4.2.2 Space Curves.......................................... 100 4.2.3 Four Dimensional Plots with Colormaps............................ 106 4.2.4 Assignments.......................................... 110 4.3 Lecture 27: Animations......................................... 110 4.3.1 Animating Plots......................................... 110 4.3.2 Designing an Animation.................................... 112 4.3.3 Animating Surfaces....................................... 115 4.3.4 Assignments.......................................... 115 4.4 Lecture 28: Solving Equations...................................... 117 4.4.1 Polynomials in One Variable.................................. 117 4.4.2 Solving Systems of Polynomial Equations........................... 118 4.4.3 Groebner Bases......................................... 122 4.4.4 Assignments.......................................... 123 4.5 Lecture 29: Linear Algebra......................................

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    204 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us