Winfried Auzinger, Dirk Praetorius (SS2012)

Size: px
Start display at page:

Download "Winfried Auzinger, Dirk Praetorius (SS2012)"

Transcription

1 Computer Algebra using Maple Part V: Extensions, some special topics. Didactical aspects Winfried Auzinger, Dirk Praetorius (SS2012) restart: 1 Polynomial equations and systems For polynomial equations up to order 4, solve finds the exact solution. p:=x^3+x^2+1; solve(p,x); evalf([%]); p:=x^4+x+1; sol:=solve(p,x); In more complicated cases, you may get a RootOf object representing the solution in an implicit way. allvalues tries to evaluate explicitly: allvalues([sol]);

2 evalf([%]); For higher degree, you cannot expect to obtain a solution in general. p:=x^5+x^3+1; sol:=solve(p,x); allvalues([sol]); Applying evalf to RootOf objects usually finds numerical values: evalf([sol]); Systems of polynomial equations are even more complicated. The algorithm implemented in solve tries to reduce the problem to a single polynomial equation by special elimination techniques. Success is not guaranteed. p1:=x^2+x*y+y^2; p2:=x^3-x*y^2+1; solve([p1,p2],[x,y]); sol:=allvalues(%);

3 nops([sol]); 6 evalf([sol]); Application: Find an approximation to the solution of a differential equation y'(t) = f(y(t)) starting from y(0) which only uses evaluation of f but no differentiations. Think of a short interval [0,t] (in practice, this is repeated iteratively over several intervals). First we compute the Taylor polynomial of y(t) up to degree 2 about t=0, and express it using derivatives of f (chain rule). tay_y := convert(taylor(y(t),t=0,3),polynom); Here, due to y'=f(y) we have y'(0)=f(y(0)) and y''(0) = (d/dt)f(t,y(t)) at t=0. d1y := f(y(0)); d2y := diff(f(y(t)),t); d2y := subs(diff(y(t),t)=f(y(t)),d2y); # use differential equation! d2y := subs(t=0,d2y); This gives the following Taylor expansion: tay_y := subs(d(y)(0)=d1y,(d@@2)(y)(0)=d2y,tay_y); The derivative of D(f) (or even higher derivatives) is not available in many practical situations. For approximation, we use the following ansatz: appr := y(0) + a[1]*t*f(y(0)) + a[2]*t*f(y(0)+a[3]*t*f(y(0))); and try to determine optimal parameters a[1], a[2] and a[3]. Taylor expansion about t=0 gives tay_appr:=convert(taylor(appr,t=0,3),polynom); Now we consider the difference between these two Taylor expanions, and collect, i.e., arrange with respect to powers of t: difference:=collect(tay_appr-tay_y,t); Extract coefficients: coe[1],coe[2]:=coeff(difference,t,1),coeff(difference,t,2); coe[1]:=simplify(coe[1]/f(y(0))); coe[2]:=simplify(coe[2]/(d(f)(y(0))*f(y(0)))); solve([coe[1],coe[2]],[a[1],a[2],a[3]]); This is the general set of solutions (1 free parameter). This case is very simple; requiring higher approximation orders gives rather complicated systems of polynimial equations in the parameters a[i]. (-- so-called Runge-Kutta methods.) 2 Differential equations Maple can exactly (or numerically) solve differential equations and systems of differential equations. The basic solver is dsolve. Here are two examples:

4 Example: A nonlinear first order equation de := D(y)(t) = t*y(t)^2; dsolve(de,y(t)); Or with a given initial values: ic := y(0)=1; dsolve([de,ic],y(t)); # solution blows up to infinity at t=sqrt(2) assign(%); plot(y(t),t=0..1.4,thickness=4); t Example: Describing a 3D spiral via a system of 3 differential equations A:=Matrix([[0.2,2,3],[-2,0.2,1],[-3,-1,0.2]]); # 0.1*identity + antisymmetric de:=seq(d(y[i])(t)=add(a[i,j]*y[j](t),j=1..3),i=1..3); var:=seq(y[i](t),i=1..3); ic:=y[1](0)=1,y[2](0)=1,y[3](0)=0; dsolve([de,ic],[var]); map(assign,%); # 'map' is explained in more detail below y[1](t),y[2](t),y[3](t); plots[spacecurve]([y[1](t),y[2](t),y[3](t)],t=0..10,thickness=4,axes= boxed,numpoints=1000);

5 3 Some more useful commands restart; 3.1 map, map2 The command map applies an single operation on all elements of a data structure. Examples: map(t-t^2,[1,2,3]); map(exp,vector([x,y,z])); If there is one more argument to be passed, use map2. Example: map2(diff,{u(t),v(t),w(t)},t); 3.2 collect, coeff For ordering polynomial expressions and extracting coefficients. p:=mul((x-i),i=1..5); p:=collect(p,x); seq(coeff(p,x,i),i=0..5); 3.3 subs, more generally subs to some extent can replace subexpressions by others. taylor(f(x(t)),t=0,2); subs(x(0)=1,d(x)(0)=2,%); 4 Interactive input Use readline(terminal) to enter data interactively. (readline can also read from an external data file, see help.) A call to readline produces a string. This can be converted using sscanf. Note that sscanf produces a list. Example: invert:=proc() uses LinearAlgebra: description "generate nxn random matrix; n entered by user"; local A,i,n,s: print("enter dimension n "): s:=readline(terminal): # this produces a string n:=sscanf(s,"%a")[1]: print(n): return RandomMatrix(n,n): end proc: invert(); "Enter dimension n O" 2

6 5 Flexible argument lists For a procedure containing no formal arguments, after calling it, _passed will contain arguments actually passed, and _npassed contains the number of arguments passed. Example: p:=proc() local i; printf("%d ",_npassed); for i from 1 to _npassed do printf("%a ",_passed[i]) end do; printf("\n"); end proc: p(); p(a); p(a,b); 0 1 a 2 a b Moreover, optional parameters, keyword parameters, etc., are supported. See: #? using_parameters? _passed Didactical aspects What are the benefits, and also dangers, when using a computer algebra system for teaching purposes? We dicuss several aspects. 6 The pocket calculator 1/3*2+2/4*7; 25 6 < If you cannot evaluate this by hand, you have a big problem. At this state, return to elementary school. evalf(sqrt(7)); < Do you know how to manually compute square roots numerically? I do not remember exactly, but I would do it by Newton iteration. Generally, the optimal situation when using Maple as a calculator is that you know what algorithm is (probably) used, such that, in principle, you could do the calculation by hand. On the other hand, I do not want to compute this by hand: / ; but I can estimate the result by counting digits. There are also situations where most people do not know how the result is computed. exp(5.); The function exp (and other mathematical standard functions) rely on argument reduction and rational approximation techniques. This is not trivial and a Numerical Analysis topic. But what is more important here is that you know what the exponential function means and what their mathematical properties are. Numerical computation by hand is not a real issue. 7 The algebraic calculator Do you know how the following result is obtained? normal((x^5-y^5)/(x-y)); If it is not important in your context, you may just accept it. But understanding is always better. Look at (x-y)*(x^4+y*x^3+y^2*x^2+y^3*x+y^4); expand(%); In this form it is not difficult to understand, and you understand how the general case works. This formula is necessary to understand why a polynomial p(x) can be divided by (x-a), for the case where a is a zero of p(x). Actually, using Maple as an experimental laboratory may help for finding solutions to a mathematical question. But this should not be done in a brute force way - always try to keep online, trying to interpret what you see. But there are also situations where one has no chance to understand, without further detailed investigation. Combinatoral questions can be especially messy, even if they look simple at first sight. Example: Consider the following recursion:

7 p:=proc(m) option remember: if m=0 then return (exp(z)-1)/z; else return 1/z*(add(p(k)/(m-k),k=0..m-1)-1); end if: end proc: p(5); 1 simplify(%); The recursive code is very simple; an explicit formula for general m exists but is very difficult to find. You have no chance of finding it by looking at some special cases. 8 The analytic calculator As in discrete mathematics, also in analysis many symbolic computations are nontrivial, and you may not know how they are obtained. Example: sol:=dsolve([(d@@2)(u)(t)/t^2+c^2*u(t)=0,u(0)=0,u(1)=1],u(t)); There are two possibilities: - If you just want to solve a given problem, accept the solution. Checking the answer (if possible) is always a good idea: u:=unapply(rhs(sol),t): u(t); u(0),u(1); simplify((d@@2)(u)(t)/t^2+c^2*u(t)); 0 - If you want to understand, you have to study a text on singular differential equations. 9 The numerical calculator Many numerical approximation methods are built in into Maple. Actually, exp(2.0); is the result of a numeical algorithm, i.e., an algorithm which only uses elementary floating-point arithemetic. Not all numerical algorithms are realiable. Those implemented usually are, but without expertise in numerical analysis you may run into problems. Example: Suppose you have a function given by discrete functions values only. For approximating the derivative at some point t, you approximate the derivative (differential quotient) by a difference quotient. Suppose we know that, at t=-2 and at t=-2+1e-8, the following function values (10 digits): Digits:=10; f1:= e-1; # function value at t=-2 f2:= e-1; # function value at t=-2+1e-8 Approximation for the derivative at t=-2 (difference quotient): (f2-f1)/1e-8;

8 Actually, the underlying function is f:=t-exp(-t^2); with derivative evalf(d(f)(-2)); In the above result, only 1 of 10 digits is correct. If you have studied numerical analysis, you will know that this cannot work correctly. In the numerical (especially the hfloat version) of the LinearAlgebra library, many state-of-the art numerical algorithms are implemented. However, most of these algorithms may fail in extreme situations, for different reasons. Therefore, the existence of such a standard library does not mean that you always can use them without being aware what you are doing. For instance, Gram-Schmidt orthogonalization of a set of vectors which are nearly linearly independent may give disastrous numerical results. You should know that trying this is a very bad idea. If you encounter such a situation, something has gone wrong on beforehand. 10 The visualization tool Visulization may be a source of misunderstanding if not carefully used. Example: f:=t-t^3-t/100; plot(f(t),t=-1..1,thickness=4); 0 1 t < This plot does not reflect the precise behavior near t=0. plot(f(t),t= ,thickness=4);

9 t 0 Example: A polynomial of degree 2 p:=x-x^2-11*x+24; plot(p(x),x=-1..1,thickness=4); x Looks very simple, but completely misses the global behavior: plot(p(x),x=-1..10,thickness=4);

10 x 3d plots may even be much more messy to interpret in some cases. 11 Final remarks -- For the mathematician, programming solutions is the major benefit you draw from a system implementing computer mathematics. Instead of performing the same computation again and again (which was trained in education in early years), write a code for its solution and refine and extend it if necessary. Do it as genererally as necessary and reasonable. Coding an algorithm usually also helps in understanding it. -- Standard methods from analysis and algebra should still be taught and learned in a conventional way, doing them by hand. Whether computer algebra is used in parallel or later is not essential, but not form the very beginning, completely replacing handwork. (Different models are used at different universities.) As soon as you know and understand, you can resort to computer algebra as you advance. -- In general, memorizing details of a more complicated formula or an algorithm is usually not very useful, What is really useful is that you understand what is behind. -- Use Maple for all kinds of tasks and extend your knowledge. You will benefit. If you want to solve a problem, try check if a solution methods is available or what needs to be done. -- Symbolic and numerical algorithms are not completely separated worlds. Often a symbolic computation serves as a prepocessor to a numerical calculation, e.g. for generating coefficients of an approximation formula used in the sequel. -- As you have seen, Maple performs symbolic as well as numerical, or mixed, computations. The MATLAB system (which you also study in 'Computer Mathematics') is an alternative with a strong emphasis on numerical compuation and visualization, especially numerical linear algebra, and it comes with may special packages, called toolboxes. Furthermore, a computer algebra kernel (mupad) has recently been integrated. This enables you to do certain symbolic manipulations (e.g. differentiation using symbolic variables) also in MATLAB. == End of Part V ==

Solve, RootOf, fsolve, isolve

Solve, RootOf, fsolve, isolve Solve, RootOf, fsolve, isolve Maple is capable of solving a huge class of equations: (the solution tells us that can be arbitrary). One may extract the solutions using the "[ ]" notation (we will learn

More information

Troubleshooting Maple Worksheets: Common Problems

Troubleshooting Maple Worksheets: Common Problems Troubleshooting Maple Worksheets: Common Problems So you've seen plenty of worksheets that work just fine, but that doesn't always help you much when your worksheet isn't doing what you want it to. This

More information

Computer Algebra using Maple Part IV: [Numerical] Linear Algebra. Winfried Auzinger, Dirk Praetorius (SS 2016)

Computer Algebra using Maple Part IV: [Numerical] Linear Algebra. Winfried Auzinger, Dirk Praetorius (SS 2016) Computer Algebra using Maple Part IV: [Numerical] Linear Algebra Winfried Auzinger, Dirk Praetorius (SS 2016) restart: with(linearalgebra); 1 Vectors and Matrices Long and short forms: Vector([a,b,c]),

More information

Mathematics for chemical engineers

Mathematics for chemical engineers Mathematics for chemical engineers Drahoslava Janovská Department of mathematics Winter semester 2013-2014 Numerical solution of ordinary differential equations Initial value problem Outline 1 Introduction

More information

16.69 TAYLOR: Manipulation of Taylor series

16.69 TAYLOR: Manipulation of Taylor series 859 16.69 TAYLOR: Manipulation of Taylor series This package carries out the Taylor expansion of an expression in one or more variables and efficient manipulation of the resulting Taylor series. Capabilities

More information

Reals 1. Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method.

Reals 1. Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method. Reals 1 13 Reals Floating-point numbers and their properties. Pitfalls of numeric computation. Horner's method. Bisection. Newton's method. 13.1 Floating-point numbers Real numbers, those declared to be

More information

Choose the file menu, and select Open. Input to be typed at the Maple prompt. Output from Maple. An important tip.

Choose the file menu, and select Open. Input to be typed at the Maple prompt. Output from Maple. An important tip. MAPLE Maple is a powerful and widely used mathematical software system designed by the Computer Science Department of the University of Waterloo. It can be used for a variety of tasks, such as solving

More information

Lesson 4: Numerical Computations; Newton's method

Lesson 4: Numerical Computations; Newton's method Lesson 4: Numerical Computations; Newton's method restart; Catastrophic cancellation in the quadratic formula One case where roundoff error can be severe is if you subtract two numbers that are very close

More information

Winfried Auzinger, Dirk Praetorius (SS2012)

Winfried Auzinger, Dirk Praetorius (SS2012) Computer Algebra using Maple Part IV: [Numerical] Linear Algebra Winfried Auzinger, Dirk Praetorius (SS2012) restart: with(linearalgebra); 1 Vectors and Matrices Long and short forms: Vector([a,b,c]),

More information

The Bisection Method versus Newton s Method in Maple (Classic Version for Windows)

The Bisection Method versus Newton s Method in Maple (Classic Version for Windows) The Bisection Method versus (Classic Version for Windows) Author: Barbara Forrest Contact: baforres@uwaterloo.ca Copyrighted/NOT FOR RESALE version 1.1 Contents 1 Objectives for this Lab i 2 Approximate

More information

Dynamics and Vibrations Mupad tutorial

Dynamics and Vibrations Mupad tutorial Dynamics and Vibrations Mupad tutorial School of Engineering Brown University ENGN40 will be using Matlab Live Scripts instead of Mupad. You can find information about Live Scripts in the ENGN40 MATLAB

More information

Ordinary differential equations solving methods

Ordinary differential equations solving methods Radim Hošek, A07237 radhost@students.zcu.cz Ordinary differential equations solving methods Problem: y = y2 (1) y = x y (2) y = sin ( + y 2 ) (3) Where it is possible we try to solve the equations analytically,

More information

LECTURE 0: Introduction and Background

LECTURE 0: Introduction and Background 1 LECTURE 0: Introduction and Background September 10, 2012 1 Computational science The role of computational science has become increasingly significant during the last few decades. It has become the

More information

Most nonzero floating-point numbers are normalized. This means they can be expressed as. x = ±(1 + f) 2 e. 0 f < 1

Most nonzero floating-point numbers are normalized. This means they can be expressed as. x = ±(1 + f) 2 e. 0 f < 1 Floating-Point Arithmetic Numerical Analysis uses floating-point arithmetic, but it is just one tool in numerical computation. There is an impression that floating point arithmetic is unpredictable and

More information

4 Visualization and. Approximation

4 Visualization and. Approximation 4 Visualization and Approximation b A slope field for the differential equation y tan(x + y) tan(x) tan(y). It is not always possible to write down an explicit formula for the solution to a differential

More information

Introduction to Computational Mathematics

Introduction to Computational Mathematics Introduction to Computational Mathematics Introduction Computational Mathematics: Concerned with the design, analysis, and implementation of algorithms for the numerical solution of problems that have

More information

YOGYAKARTA STATE UNIVERSITY MATHEMATICS AND NATURAL SCIENCES FACULTY MATHEMATICS EDUCATION STUDY PROGRAM

YOGYAKARTA STATE UNIVERSITY MATHEMATICS AND NATURAL SCIENCES FACULTY MATHEMATICS EDUCATION STUDY PROGRAM YOGYAKARTA STATE UNIVERSITY MATHEMATICS AND NATURAL SCIENCES FACULTY MATHEMATICS EDUCATION STUDY PROGRAM TOPIC 1 INTRODUCING SOME MATHEMATICS SOFTWARE (Matlab, Maple and Mathematica) This topic provides

More information

Lesson 29: Fourier Series and Recurrence Relations

Lesson 29: Fourier Series and Recurrence Relations Lesson 29: Fourier Series and Recurrence Relations restart; Convergence of Fourier series. We considered the following function on the interval f:= t -> t^2; We extended it to be periodic using the following

More information

Computer Algebra using Maple Part III: Data structures; Procedures in more detail; Data output

Computer Algebra using Maple Part III: Data structures; Procedures in more detail; Data output Computer Algebra using Maple Part III: Data structures; Procedures in more detail; Data output Winfried Auzinger, Dirk Praetorius (SS 2013) 1 Tables restart: A table is an associative array, i.e., indices

More information

Maxima CAS presentation Chelton Evans

Maxima CAS presentation Chelton Evans Maxima CAS presentation 2015-12-01 Chelton Evans Abstract Maxima is a popular copyleft CAS (Computer Algebra System) which can be used for both symbolic and numerical calculation. Chelton Evans will present

More information

Polymath 6. Overview

Polymath 6. Overview Polymath 6 Overview Main Polymath Menu LEQ: Linear Equations Solver. Enter (in matrix form) and solve a new system of simultaneous linear equations. NLE: Nonlinear Equations Solver. Enter and solve a new

More information

Chapter 1. Math review. 1.1 Some sets

Chapter 1. Math review. 1.1 Some sets Chapter 1 Math review This book assumes that you understood precalculus when you took it. So you used to know how to do things like factoring polynomials, solving high school geometry problems, using trigonometric

More information

University of Alberta

University of Alberta A Brief Introduction to MATLAB University of Alberta M.G. Lipsett 2008 MATLAB is an interactive program for numerical computation and data visualization, used extensively by engineers for analysis of systems.

More information

Lesson 3: Solving Equations; Floating-point Computation

Lesson 3: Solving Equations; Floating-point Computation Lesson 3: Solving Equations; Floating-point Computation restart; A hard equation Last time we were looking at this equation. eq := * sin() = Pi/2; (1.1) Maple didn't know the solutions. solve(eq,,allsolutions);

More information

Introduction to Programming for Engineers Spring Final Examination. May 10, Questions, 170 minutes

Introduction to Programming for Engineers Spring Final Examination. May 10, Questions, 170 minutes Final Examination May 10, 2011 75 Questions, 170 minutes Notes: 1. Before you begin, please check that your exam has 28 pages (including this one). 2. Write your name and student ID number clearly on your

More information

Math 133A, September 10: Numerical Methods (Euler & Runge-Kutta) Section 1: Numerical Methods

Math 133A, September 10: Numerical Methods (Euler & Runge-Kutta) Section 1: Numerical Methods Math 133A, September 10: Numerical Methods (Euler & Runge-Kutta) Section 1: Numerical Methods We have seen examples of first-order differential equations which can, by one method of another, be solved

More information

16.50 RANDPOLY: A random polynomial generator

16.50 RANDPOLY: A random polynomial generator 743 16.50 RANDPOLY: A random polynomial generator This package is based on a port of the Maple random polynomial generator together with some support facilities for the generation of random numbers and

More information

Natasha S. Sharma, PhD

Natasha S. Sharma, PhD Revisiting the function evaluation problem Most functions cannot be evaluated exactly: 2 x, e x, ln x, trigonometric functions since by using a computer we are limited to the use of elementary arithmetic

More information

DOWNLOAD PDF BIG IDEAS MATH VERTICAL SHRINK OF A PARABOLA

DOWNLOAD PDF BIG IDEAS MATH VERTICAL SHRINK OF A PARABOLA Chapter 1 : BioMath: Transformation of Graphs Use the results in part (a) to identify the vertex of the parabola. c. Find a vertical line on your graph paper so that when you fold the paper, the left portion

More information

Make Computer Arithmetic Great Again?

Make Computer Arithmetic Great Again? Make Computer Arithmetic Great Again? Jean-Michel Muller CNRS, ENS Lyon, Inria, Université de Lyon France ARITH-25 June 2018 -2- An apparent contradiction low number of paper submissions to Arith these

More information

MAT 003 Brian Killough s Instructor Notes Saint Leo University

MAT 003 Brian Killough s Instructor Notes Saint Leo University MAT 003 Brian Killough s Instructor Notes Saint Leo University Success in online courses requires self-motivation and discipline. It is anticipated that students will read the textbook and complete sample

More information

Introduction to Simulink

Introduction to Simulink Introduction to Simulink There are several computer packages for finding solutions of differential equations, such as Maple, Mathematica, Maxima, MATLAB, etc. These systems provide both symbolic and numeric

More information

Interpolation. TANA09 Lecture 7. Error analysis for linear interpolation. Linear Interpolation. Suppose we have a table x x 1 x 2...

Interpolation. TANA09 Lecture 7. Error analysis for linear interpolation. Linear Interpolation. Suppose we have a table x x 1 x 2... TANA9 Lecture 7 Interpolation Suppose we have a table x x x... x n+ Interpolation Introduction. Polynomials. Error estimates. Runge s phenomena. Application - Equation solving. Spline functions and interpolation.

More information

The following information is for reviewing the material since Exam 3:

The following information is for reviewing the material since Exam 3: Outcomes List for Math 121 Calculus I Fall 2010-2011 General Information: The purpose of this Outcomes List is to give you a concrete summary of the material you should know, and the skills you should

More information

Arithmetic expressions can be typed into Maple using the regular operators:

Arithmetic expressions can be typed into Maple using the regular operators: Basic arithmetic Arithmetic expressions can be typed into Maple using the regular operators: (type "3 + 4" and then press "[Enter]" to start the evaluation of the expression) 7 (1.1) 5 (1.2) 21 (1.3) (type

More information

Mathematica CalcCenter

Mathematica CalcCenter Mathematica CalcCenter Basic features Wolfram Mathematica CalcCenter is based on Mathematica Professional and it is primarily designed for technical calculations. Information about this product can be

More information

CS 450 Numerical Analysis. Chapter 7: Interpolation

CS 450 Numerical Analysis. Chapter 7: Interpolation Lecture slides based on the textbook Scientific Computing: An Introductory Survey by Michael T. Heath, copyright c 2018 by the Society for Industrial and Applied Mathematics. http://www.siam.org/books/cl80

More information

MST30040 Differential Equations via Computer Algebra Fall 2010 Worksheet 1

MST30040 Differential Equations via Computer Algebra Fall 2010 Worksheet 1 MST3000 Differential Equations via Computer Algebra Fall 2010 Worksheet 1 1 Some elementary calculations To use Maple for calculating or problem solving, the basic method is conversational. You type a

More information

Sample tasks from: Algebra Assessments Through the Common Core (Grades 6-12)

Sample tasks from: Algebra Assessments Through the Common Core (Grades 6-12) Sample tasks from: Algebra Assessments Through the Common Core (Grades 6-12) A resource from The Charles A Dana Center at The University of Texas at Austin 2011 About the Dana Center Assessments More than

More information

East Penn School District Secondary Curriculum

East Penn School District Secondary Curriculum East Penn School District Secondary Curriculum A Planned Course Statement for Analytic Geometry and Calculus (BC) AP Course # 360 Grade(s) 12 Department: Math ength of Period (mins.) 41 Total Clock Hours:

More information

Lesson 16: Integration

Lesson 16: Integration Lesson 16: Integration Definite integrals When Maple can find an antiderivative of a function, it should have no trouble with definite integrals of that function, using the Fundamental Theorem of Calculus.

More information

x 2 + 3, r 4(x) = x2 1

x 2 + 3, r 4(x) = x2 1 Math 121 (Lesieutre); 4.2: Rational functions; September 1, 2017 1. What is a rational function? It s a function of the form p(x), where p(x) and q(x) are both polynomials. In other words, q(x) something

More information

Exercises: Instructions and Advice

Exercises: Instructions and Advice Instructions Exercises: Instructions and Advice The exercises in this course are primarily practical programming tasks that are designed to help the student master the intellectual content of the subjects

More information

UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER

UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER UNIVERSITI TEKNIKAL MALAYSIA MELAKA FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER FAKULTI KEJURUTERAAN ELEKTRONIK DAN KEJURUTERAAN KOMPUTER BENC 2113 DENC ECADD 2532 ECADD LAB SESSION 6/7 LAB

More information

Spreadsheets as Tools for Constructing Mathematical Concepts

Spreadsheets as Tools for Constructing Mathematical Concepts Spreadsheets as Tools for Constructing Mathematical Concepts Erich Neuwirth (Faculty of Computer Science, University of Vienna) February 4, 2015 Abstract The formal representation of mathematical relations

More information

6.001 Notes: Section 8.1

6.001 Notes: Section 8.1 6.001 Notes: Section 8.1 Slide 8.1.1 In this lecture we are going to introduce a new data type, specifically to deal with symbols. This may sound a bit odd, but if you step back, you may realize that everything

More information

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS

STEPHEN WOLFRAM MATHEMATICADO. Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS STEPHEN WOLFRAM MATHEMATICADO OO Fourth Edition WOLFRAM MEDIA CAMBRIDGE UNIVERSITY PRESS Table of Contents XXI a section new for Version 3 a section new for Version 4 a section substantially modified for

More information

Maximizing an interpolating quadratic

Maximizing an interpolating quadratic Week 11: Monday, Apr 9 Maximizing an interpolating quadratic Suppose that a function f is evaluated on a reasonably fine, uniform mesh {x i } n i=0 with spacing h = x i+1 x i. How can we find any local

More information

Rational functions, like rational numbers, will involve a fraction. We will discuss rational functions in the form:

Rational functions, like rational numbers, will involve a fraction. We will discuss rational functions in the form: Name: Date: Period: Chapter 2: Polynomial and Rational Functions Topic 6: Rational Functions & Their Graphs Rational functions, like rational numbers, will involve a fraction. We will discuss rational

More information

Curriculum Map: Mathematics

Curriculum Map: Mathematics Curriculum Map: Mathematics Course: Honors Advanced Precalculus and Trigonometry Grade(s): 11-12 Unit 1: Functions and Their Graphs This chapter will develop a more complete, thorough understanding of

More information

MAT128A: Numerical Analysis Lecture One: Course Logistics and What is Numerical Analysis?

MAT128A: Numerical Analysis Lecture One: Course Logistics and What is Numerical Analysis? MAT128A: Numerical Analysis Lecture One: Course Logistics and What is Numerical Analysis? September 26, 2018 Lecture 1 September 26, 2018 1 / 19 Course Logistics My contact information: James Bremer Email:

More information

The Interpolating Polynomial

The Interpolating Polynomial Math 45 Linear Algebra David Arnold David-Arnold@Eureka.redwoods.cc.ca.us Abstract A polynomial that passes through a given set of data points is called an interpolating polynomial. In this exercise you

More information

1.1 calculator viewing window find roots in your calculator 1.2 functions find domain and range (from a graph) may need to review interval notation

1.1 calculator viewing window find roots in your calculator 1.2 functions find domain and range (from a graph) may need to review interval notation 1.1 calculator viewing window find roots in your calculator 1.2 functions find domain and range (from a graph) may need to review interval notation functions vertical line test function notation evaluate

More information

An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s.

An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s. Using Monte Carlo to Estimate π using Buffon s Needle Problem An interesting related problem is Buffon s Needle which was first proposed in the mid-1700 s. Here s the problem (in a simplified form). Suppose

More information

AN INTRODUCTION TO MAPLE

AN INTRODUCTION TO MAPLE AN INTRODUCTION TO MAPLE CHRISTOPHER J HILLAR Introduction This document introduces Maple, a commercial computer program for mathematical computation. You can learn about Maple from its website http://www.maplesoft.com/.

More information

Lesson 10. Student Outcomes. Lesson Notes

Lesson 10. Student Outcomes. Lesson Notes Student Outcomes Students understand that a function from one set (called the domain) to another set (called the range) assigns each element of the domain to exactly one element of the range and understand

More information

MAT128A: Numerical Analysis Lecture Two: Finite Precision Arithmetic

MAT128A: Numerical Analysis Lecture Two: Finite Precision Arithmetic MAT128A: Numerical Analysis Lecture Two: Finite Precision Arithmetic September 28, 2018 Lecture 1 September 28, 2018 1 / 25 Floating point arithmetic Computers use finite strings of binary digits to represent

More information

Ordinary Differential Equations

Ordinary Differential Equations Next: Partial Differential Equations Up: Numerical Analysis for Chemical Previous: Numerical Differentiation and Integration Subsections Runge-Kutta Methods Euler's Method Improvement of Euler's Method

More information

Euler s Methods (a family of Runge- Ku9a methods)

Euler s Methods (a family of Runge- Ku9a methods) Euler s Methods (a family of Runge- Ku9a methods) ODE IVP An Ordinary Differential Equation (ODE) is an equation that contains a function having one independent variable: The equation is coupled with an

More information

A Short Maple Primer

A Short Maple Primer A Short Maple Primer Krister Forsman, Dept. of Electrical Engineering Linköping University, S-581 83 Linköping, Sweden email: krister@isy.liu.se 199-0-8 Preface Maple is a nice and powerful computer algebra

More information

dy = dx y dx Project 1 Consider the following differential equations: I. xy II. III.

dy = dx y dx Project 1 Consider the following differential equations: I. xy II. III. Project 1 Consider the following differential equations: dy = dy = y dy x + sin( x) y = x I. xy II. III. 1. Graph the direction field in the neighborhood of the origin. Graph approximate integral curves

More information

Numerical Solutions of Differential Equations (1)

Numerical Solutions of Differential Equations (1) Numerical Solutions of Differential Equations (1) Euler method Sources of error Truncation Round-off error Error balance in numerical integration Euler Method Many differential equations don't have an

More information

Computer Algebra using Maple Part III: Data structures; Procedures in more detail; Data output. Winfried Auzinger, Dirk Praetorius (SS 2018)

Computer Algebra using Maple Part III: Data structures; Procedures in more detail; Data output. Winfried Auzinger, Dirk Praetorius (SS 2018) Computer Algebra using Maple Part III: Data structures; Procedures in more detail; Data output Winfried Auzinger, Dirk Praetorius (SS 08) Tables restart: A table is an associative array, i.e., indices

More information

Let denote the number of partitions of with at most parts each less than or equal to. By comparing the definitions of and it is clear that ( ) ( )

Let denote the number of partitions of with at most parts each less than or equal to. By comparing the definitions of and it is clear that ( ) ( ) Calculating exact values of without using recurrence relations This note describes an algorithm for calculating exact values of, the number of partitions of into distinct positive integers each less than

More information

Contents. Implementing the QR factorization The algebraic eigenvalue problem. Applied Linear Algebra in Geoscience Using MATLAB

Contents. Implementing the QR factorization The algebraic eigenvalue problem. Applied Linear Algebra in Geoscience Using MATLAB Applied Linear Algebra in Geoscience Using MATLAB Contents Getting Started Creating Arrays Mathematical Operations with Arrays Using Script Files and Managing Data Two-Dimensional Plots Programming in

More information

Integrated Mathematics I Performance Level Descriptors

Integrated Mathematics I Performance Level Descriptors Limited A student performing at the Limited Level demonstrates a minimal command of Ohio s Learning Standards for Integrated Mathematics I. A student at this level has an emerging ability to demonstrate

More information

An Introduction to Numerical Analysis

An Introduction to Numerical Analysis Weimin Han AMCS & Dept of Math University of Iowa MATH:38 Example 1 Question: What is the area of the region between y = e x 2 and the x-axis for x 1? Answer: Z 1 e x 2 dx = : 1.9.8.7.6.5.4.3.2.1 1.5.5

More information

Floating-point numbers. Phys 420/580 Lecture 6

Floating-point numbers. Phys 420/580 Lecture 6 Floating-point numbers Phys 420/580 Lecture 6 Random walk CA Activate a single cell at site i = 0 For all subsequent times steps, let the active site wander to i := i ± 1 with equal probability Random

More information

Numerical Aspects of Special Functions

Numerical Aspects of Special Functions Numerical Aspects of Special Functions Nico M. Temme In collaboration with Amparo Gil and Javier Segura, Santander, Spain. Nico.Temme@cwi.nl Centrum voor Wiskunde en Informatica (CWI), Amsterdam Numerics

More information

Lagrange Multipliers and Problem Formulation

Lagrange Multipliers and Problem Formulation Lagrange Multipliers and Problem Formulation Steven J. Miller Department of Mathematics and Statistics Williams College Williamstown, MA 01267 Abstract The method of Lagrange Multipliers (and its generalizations)

More information

f( x ), or a solution to the equation f( x) 0. You are already familiar with ways of solving

f( x ), or a solution to the equation f( x) 0. You are already familiar with ways of solving The Bisection Method and Newton s Method. If f( x ) a function, then a number r for which f( r) 0 is called a zero or a root of the function f( x ), or a solution to the equation f( x) 0. You are already

More information

1. Practice the use of the C ++ repetition constructs of for, while, and do-while. 2. Use computer-generated random numbers.

1. Practice the use of the C ++ repetition constructs of for, while, and do-while. 2. Use computer-generated random numbers. 1 Purpose This lab illustrates the use of looping structures by introducing a class of programming problems called numerical algorithms. 1. Practice the use of the C ++ repetition constructs of for, while,

More information

HW DUE Floating point

HW DUE Floating point Numerical and Scientific Computing with Applications David F. Gleich CS 314, Purdue In this class: Understand the need for floating point arithmetic and some alternatives. Understand how the computer represents

More information

Towards Intelligent Summarising and Browsing of Mathematical Expressions

Towards Intelligent Summarising and Browsing of Mathematical Expressions Towards Intelligent Summarising and Browsing of Mathematical Expressions Ivelina Stoyanova I.Stoyanova@alumni.bath.ac.uk Department of Computer Science University of Bath, Bath BA2 7AY United Kingdom Abstract.

More information

ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits

ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits Solving ODEs General Stuff ODEs occur quite often in physics and astrophysics: Wave Equation in 1-D stellar structure equations hydrostatic equation in atmospheres orbits need workhorse solvers to deal

More information

A-SSE.1.1, A-SSE.1.2-

A-SSE.1.1, A-SSE.1.2- Putnam County Schools Curriculum Map Algebra 1 2016-2017 Module: 4 Quadratic and Exponential Functions Instructional Window: January 9-February 17 Assessment Window: February 20 March 3 MAFS Standards

More information

Exponent Properties: The Product Rule. 2. Exponential expressions multiplied with each other that have the same base.

Exponent Properties: The Product Rule. 2. Exponential expressions multiplied with each other that have the same base. Exponent Properties: The Product Rule 1. What is the difference between 3x and x 3? Explain in complete sentences and with examples. 2. Exponential expressions multiplied with each other that have the

More information

Skill 1: Multiplying Polynomials

Skill 1: Multiplying Polynomials CS103 Spring 2018 Mathematical Prerequisites Although CS103 is primarily a math class, this course does not require any higher math as a prerequisite. The most advanced level of mathematics you'll need

More information

1. Fill in the right hand side of the following equation by taking the derivative: (x sin x) =

1. Fill in the right hand side of the following equation by taking the derivative: (x sin x) = 7.1 What is x cos x? 1. Fill in the right hand side of the following equation by taking the derivative: (x sin x = 2. Integrate both sides of the equation. Instructor: When instructing students to integrate

More information

Computer Algebra using Maple Part III: Data structures; Procedures in more detail; Data output. Winfried Auzinger, Kevin Sturm (SS 2019)

Computer Algebra using Maple Part III: Data structures; Procedures in more detail; Data output. Winfried Auzinger, Kevin Sturm (SS 2019) Computer Algebra using Maple Part III: Data structures; Procedures in more detail; Data output Winfried Auzinger, Kevin Sturm (SS 2019) 1 Tables restart: A table is an associative array, i.e., indices

More information

VARIABLES Storing numbers:

VARIABLES Storing numbers: VARIABLES Storing numbers: You may create and use variables in Matlab to store data. There are a few rules on naming variables though: (1) Variables must begin with a letter and can be followed with any

More information

Lesson 10: Representing, Naming, and Evaluating Functions

Lesson 10: Representing, Naming, and Evaluating Functions : Representing, Naming, and Evaluation Functions Classwork Opening Exercise Study the 4 representations of a function below. How are these representations alike? How are they different? TABLE: Input 0

More information

Exercises for a Numerical Methods Course

Exercises for a Numerical Methods Course Exercises for a Numerical Methods Course Brian Heinold Department of Mathematics and Computer Science Mount St. Mary s University November 18, 2017 1 / 73 About the class Mix of Math and CS students, mostly

More information

MATLAB. Advanced Mathematics and Mechanics Applications Using. Third Edition. David Halpern University of Alabama CHAPMAN & HALL/CRC

MATLAB. Advanced Mathematics and Mechanics Applications Using. Third Edition. David Halpern University of Alabama CHAPMAN & HALL/CRC Advanced Mathematics and Mechanics Applications Using MATLAB Third Edition Howard B. Wilson University of Alabama Louis H. Turcotte Rose-Hulman Institute of Technology David Halpern University of Alabama

More information

Surfaces and Partial Derivatives

Surfaces and Partial Derivatives Surfaces and Partial Derivatives James K. Peterson Department of Biological Sciences and Department of Mathematical Sciences Clemson University November 9, 2016 Outline Partial Derivatives Tangent Planes

More information

COURSE: NUMERICAL ANALYSIS. LESSON: Methods for Solving Non-Linear Equations

COURSE: NUMERICAL ANALYSIS. LESSON: Methods for Solving Non-Linear Equations COURSE: NUMERICAL ANALYSIS LESSON: Methods for Solving Non-Linear Equations Lesson Developer: RAJNI ARORA COLLEGE/DEPARTMENT: Department of Mathematics, University of Delhi Page No. 1 Contents 1. LEARNING

More information

Course Number 432/433 Title Algebra II (A & B) H Grade # of Days 120

Course Number 432/433 Title Algebra II (A & B) H Grade # of Days 120 Whitman-Hanson Regional High School provides all students with a high- quality education in order to develop reflective, concerned citizens and contributing members of the global community. Course Number

More information

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li.

Fall CSCI 420: Computer Graphics. 4.2 Splines. Hao Li. Fall 2014 CSCI 420: Computer Graphics 4.2 Splines Hao Li http://cs420.hao-li.com 1 Roller coaster Next programming assignment involves creating a 3D roller coaster animation We must model the 3D curve

More information

Drawing curves automatically: procedures as arguments

Drawing curves automatically: procedures as arguments CHAPTER 7 Drawing curves automatically: procedures as arguments moveto lineto stroke fill clip The process of drawing curves by programming each one specially is too complicated to be done easily. In this

More information

New Mexico Tech Hyd 510

New Mexico Tech Hyd 510 Numerics Motivation Modeling process (JLW) To construct a model we assemble and synthesize data and other information to formulate a conceptual model of the situation. The model is conditioned on the science

More information

Classroom Tips and Techniques: Stepwise Solutions in Maple - Part 2 - Linear Algebra

Classroom Tips and Techniques: Stepwise Solutions in Maple - Part 2 - Linear Algebra Introduction Classroom Tips and Techniques: Stepwise Solutions in Maple - Part 2 - Linear Algebra Robert J. Lopez Emeritus Professor of Mathematics and Maple Fellow Maplesoft In the preceding article Stepwise

More information

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives.

OpenGL Graphics System. 2D Graphics Primitives. Drawing 2D Graphics Primitives. 2D Graphics Primitives. Mathematical 2D Primitives. D Graphics Primitives Eye sees Displays - CRT/LCD Frame buffer - Addressable pixel array (D) Graphics processor s main function is to map application model (D) by projection on to D primitives: points,

More information

Integrated Math I. IM1.1.3 Understand and use the distributive, associative, and commutative properties.

Integrated Math I. IM1.1.3 Understand and use the distributive, associative, and commutative properties. Standard 1: Number Sense and Computation Students simplify and compare expressions. They use rational exponents and simplify square roots. IM1.1.1 Compare real number expressions. IM1.1.2 Simplify square

More information

A Brief Introduction to Mathematica

A Brief Introduction to Mathematica A Brief Introduction to Mathematica Objectives: (1) To learn to use Mathematica as a calculator. (2) To learn to write expressions in Mathematica, and to evaluate them at given point. (3) To learn to plot

More information

Getting to Know Maple

Getting to Know Maple Maple Worksheets for rdinary Differential Equations Complimentary software to accompany the textbook: Differential Equations: Concepts, Methods, and Models (00-00 Edition) Leigh C. Becker Department of

More information

The Cantor Handbook. Alexander Rieder

The Cantor Handbook. Alexander Rieder Alexander Rieder 2 Contents 1 Introduction 5 2 Using Cantor 6 2.1 Cantor features....................................... 6 2.2 The Cantor backends.................................... 7 2.3 The Cantor Workspace...................................

More information

Some Highlights along a Path to Elliptic Curves

Some Highlights along a Path to Elliptic Curves Some Highlights along a Path to Elliptic Curves Part 6: Rational Points on Elliptic Curves Steven J. Wilson, Fall 016 Outline of the Series 1. The World of Algebraic Curves. Conic Sections and Rational

More information

Computer Simulations

Computer Simulations Computer Simulations A practical approach to simulation Semra Gündüç gunduc@ankara.edu.tr Ankara University Faculty of Engineering, Department of Computer Engineering 2014-2015 Spring Term Ankara University

More information

Ohio Tutorials are designed specifically for the Ohio Learning Standards to prepare students for the Ohio State Tests and end-ofcourse

Ohio Tutorials are designed specifically for the Ohio Learning Standards to prepare students for the Ohio State Tests and end-ofcourse Tutorial Outline Ohio Tutorials are designed specifically for the Ohio Learning Standards to prepare students for the Ohio State Tests and end-ofcourse exams. Math Tutorials offer targeted instruction,

More information

Section 1.8. Simplifying Expressions

Section 1.8. Simplifying Expressions Section 1.8 Simplifying Expressions But, first Commutative property: a + b = b + a; a * b = b * a Associative property: (a + b) + c = a + (b + c) (a * b) * c = a * (b * c) Distributive property: a * (b

More information