Functions in Maple 教授:蔡桂宏 博士 學生:柯建豪 學號: 95356026 95503 統資軟體課程講義.

Slides:



Advertisements
Similar presentations
8.2 Integration by parts.
Advertisements

Beginning Programming for Engineers
Eng Ship Structures 1 Hull Girder Response Analysis
Chapter 11: Symbolic Computing for Calculus
數值方法 2008, Applied Mathematics NDHU 1 Nonlinear systems Newton’s method The steepest descent method.
Unit 7 Symbolic Processing 中華技術學院電子系 副教授 蔡樸生 副教授 林盈灝.
CSE 123 Symbolic Processing. Declaring Symbolic Variables and Constants To enable symbolic processing, the variables and constants involved must first.
MA Day 24- February 8, 2013 Section 11.3: Clairaut’s Theorem Section 11.4: Differentiability of f(x,y,z) Section 11.5: The Chain Rule.
TECHNIQUES OF INTEGRATION
Copyright © Cengage Learning. All rights reserved. 6 Inverse Functions.
Maple’s Evaluation Rules 教授 : 蔡桂宏 博士 學生 : 林佳慧 學號 : 統資軟體課程講義.
95503 統資軟體課程講義 銘傳大學應用統計資訊學系 蔡桂宏 製作 1 符號數學運算軟體 統資軟體課程講義 銘傳大學應用統計資訊學系 蔡桂宏 製作 2 MAPLE 軟體簡介.
INTEGRALS The Substitution Rule In this section, we will learn: To substitute a new variable in place of an existing expression in a function,
7 INVERSE FUNCTIONS.
1 Chapter 7 Transcendental Functions Inverse Functions and Their Derivatives.
In this handout, 4. 7 Antiderivatives 5
Inverse Trig. Functions & Differentiation Section 5.8.
8.2 Integration By Parts.
9.4 Properties of Logarithms. Since a logarithmic function is the inverse of an exponential function, the properties can be derived from the properties.
Lesson 3-8 Derivative of Natural Logs And Logarithmic Differentiation.
Copyright © 2005 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Transcendental Functions.
Derivative of the logarithmic function
The Natural Logarithmic Function
BY PARTS. Integration by Parts Although integration by parts is used most of the time on products of the form described above, it is sometimes effective.
CHAPTER Continuity Integration by Parts The formula for integration by parts  f (x) g’(x) dx = f (x) g(x) -  g(x) f’(x) dx. Substitution Rule that.
More U-Substitution February 17, Substitution Rule for Indefinite Integrals If u = g(x) is a differentiable function whose range is an interval.
5.5 The Substitution Rule In this section, we will learn: To substitute a new variable in place of an existing expression in a function, making integration.
5.4 Exponential Functions: Differentiation and Integration The inverse of f(x) = ln x is f -1 = e x. Therefore, ln (e x ) = x and e ln x = x Solve for.
7.3* The Natural Exponential Function INVERSE FUNCTIONS In this section, we will learn about: The natural exponential function and its properties.
Ch8: STRATEGY FOR INTEGRATION integration is more challenging than differentiation. No hard and fast rules can be given as to which method applies in a.
Section 4.4 Indeterminate Forms and L’Hospital’s Rule Applications of Differentiation.
Techniques of Differentiation. I. Positive Integer Powers, Multiples, Sums, and Differences A.) Th: If f(x) is a constant, B.) Th: The Power Rule: If.
CHAPTER 5 SECTION 5.5 BASES OTHER THAN e AND APPLICATIONS.
Antiderivatives: Think “undoing” derivatives Since: We say is the “antiderivative of.
5.4 Fundamental Theorem of Calculus. It is difficult to overestimate the power of the equation: It says that every continuous function f is the derivative.
Substitution Rule. Basic Problems Example (1)
INTEGRALS The Substitution Rule In this section, we will learn: To substitute a new variable in place of an existing expression in a function,
Copyright © Cengage Learning. All rights reserved. 5 Integrals.
To compute the derivatives of the inverse trigonometric functions, we will need to simplify composite expressions such as cos(sin −1 x) and.
Numbers, Expressions, and Simple Programs. Today’s Goals Discipline! Order! Developing programs requires care! Programs are useful but delicate entities.
CHAPTER 6: DIFFERENTIAL EQUATIONS AND MATHEMATICAL MODELING SECTION 6.2: ANTIDIFFERENTIATION BY SUBSTITUTION AP CALCULUS AB.
The Indefinite Integral
Dr. Omar Al Jadaan Assistant Professor – Computer Science & Mathematics General Education Department Mathematics.
TECHNIQUES OF INTEGRATION Due to the Fundamental Theorem of Calculus (FTC), we can integrate a function if we know an antiderivative, that is, an indefinite.
Review Calculus (Make sure you study RS and WS 5.3)
Section 15.6 Directional Derivatives and the Gradient Vector.
Sec 7.5: STRATEGY FOR INTEGRATION integration is more challenging than differentiation. No hard and fast rules can be given as to which method applies.
Write the derivative for each of the following.. Calculus Indefinite Integrals Tuesday, December 15, 2015 (with a hint of the definite integral)
Definition Section 4.1: Indefinite Integrals. The process of finding the indefinite integral of f(x) is called integration of f(x) or integrating f(x).
5.a – Antiderivatives and The Indefinite Integral.
Mathematics. Session Indefinite Integrals -1 Session Objectives  Primitive or Antiderivative  Indefinite Integral  Standard Elementary Integrals 
8 TECHNIQUES OF INTEGRATION. Due to the Fundamental Theorem of Calculus (FTC), we can integrate a function if we know an antiderivative, that is, an indefinite.
Differentiate:What rule are you using?. Aims: To learn results of trig differentials for cos x, sin x & tan x. To be able to solve trig differentials.
Monday 8 th November, 2010 Introduction. Objective: Derive the formula for integration by parts using the product rule.
7 TECHNIQUES OF INTEGRATION. As we have seen, integration is more challenging than differentiation. –In finding the derivative of a function, it is obvious.
INTEGRATION & TECHNIQUES OF INTEGRATION
Laplace Transforms.
7.1 Integration By Parts.
Review Calculus.
Warm Up.
6.6 Inverse Trigonometric Functions
4.9 – Antiderivatives.
More U-Substitution: The “Double-U” Substitution with ArcTan(u)
A function is given by a formula. Determine whether it is one-to-one
Exponential Functions
An algebraic expression that defines a function is a function rule.
integration is more challenging than differentiation.
Packet #25 Substitution and Integration by Parts (Again)
Unit 2 Lesson 1 Function Definitions.
Function Notation and Evaluating Functions
Presentation transcript:

Functions in Maple 教授:蔡桂宏 博士 學生:柯建豪 學號: 統資軟體課程講義

1.1 Introduction Understanding functions in Maple is also a good starting point for our discussions about Maple programming. There are two distinct ways to represent mathematical functions in Maple. That is Maple expression ( := ) and a Maple function ( -> ).

1.2 Functions in Mathematics the formula has as its domain the set of all real numbers, its codomain is the set of all positive real numbers. the formula has as its domain the set of all positive real numbers, its codomain is the set of all positive real numbers. the formula has as its domain the set of all negative real numbers, its codomain is the set of all positive real numbers.

the function f is not invertible. The inverse of the function g is. The inverse of the function h is. So f, g, and h all have the same formula (i.e., rule) but they are not the same function. The domain and codomain are important parts of the definition of a mathematical function.

1.3 Functions in Maple These two ways of representing mathematical functions are not equivalent. And it is subtle and non-obvious. A Maple function is something defined using arrow notation ( ->). A Maple expression is something defined using ( := ). x -> x^2; x -> a*x^2; (x,a) -> a*x^2;

. Maple will treat all unassigned names (i.e., all unknowns) as variables. The mathematical function. g := x -> x^2 – 1; g(2); g(x) := x^2-1; g(2);

g := cos + ln; k := x -> cos(x) + ln(x); g(Pi); k(Pi); h := cos + (x -> 3*x-1); h(z);

f := x -> (1 + x^2)/x^3; g := (1 + (x -> x^2))/(x -> x^3); h := (1 + (z -> z^2))/(y -> y^3); f(1); g(1); h(1); m := x -> (1 + exp(x))/x^3; n := (1 + exp)/(x -> x^3); m(1); n(1);

f := x^2; g := x -> 2 * x^3 * f; g(x); g(2); f := x -> x^2; g := 2 * (x -> x^3) * f; g(x); g(2);

1.4 Expressions vs. functions: Some puzzles The following examples are meant to show that there are still a lot of subtle things to learn about variables and functions and how Maple handles them.

Puzzle 1 f1 := x^2+1; f2 := y^2+1; f3 := f1 + f2; f3 is a function of two variables. g1 := x -> x^2+1; g2 := y -> y^2+1; g3 := g1 + g2; g3(x); g3 is not a function of two variables.

Puzzle 2 x:='x': a:=1: b:=2: c:=3: a*x^2+b*x+c; f := unapply( a*x^2+b*x+c, x ); g := x -> a*x^2+b*x+c; f(x); g(x); D(f); D(g); p := x^2 + sin(x) + 1; p(2); p := unapply(p,x); p(2);

Puzzle 3 plot( x^2, x= ); plot( x->x^2, ); plot( x^2, ); plot( x->x^2, x= );

x := 5; plot( x^2, x= ); plot( x->x^2, );

Puzzle 4 f := x^2; f := x*f; f; g := x -> x^2; g := x -> x*g(x); g(x);

Puzzle 5 x^2; f := %; plot( f, x=-3..3 ); x^2; g := x -> %; plot( g, );

1.5 Working with expressions and Maple functions (review) g := x -> x^2-3*x-10; g(x); g; print(g); eval(g); op(g);

plot( a*x^2, ); plot( x->a*x^2, ); plot3d( (x,a)->a*x^2, -5..5, );

We wanted to evaluate our mathematical function at a point, say at 1. f := x^2 - 3*x-10; g := x -> x^2-3*x-10; subs( x=1, f ); eval( f, x=1 ); g(1); f(1); subs( x=1, g );

eval( f, x=1 ); subs( x=1, f ); Think of reading eval( f, x=1) as " evaluate f at x=1" and think of reading subs (x=1,f) as " substitute x=1 into f". factor( f ); factor( g(x) ); factor( f (x) ); factor( g );

diff( f, x ); D( g ); diff command needed a reference to x in it but the D command did not. D( f ); diff( g, x );

Let us do an example of combining two mathematical functions f and g by composing them to make a new function. For the expression: f := x^2 + 3*x; g := x + 1; h := subs( x=g, f ); subs(x=1, h);

For the function: f := x -> x^2 + 3*x; g := x -> x + 1; h := h(x); h(1);

Let us do an example of representing a mathematical function of two variables. Here is an expression in two variables. f := (x^2+y^2)/(x+x*y); g := (x,y) -> (x^2+y^2)/(x+x*y); subs( x=1, y=2, f ); eval( f, {x=1, y=2} ); g(1,2); simplify( f ); simplify( g(x,y) );

Here is how we compute partial derivatives of the expression. diff( f, x ); simplify( % ); diff( f, y ); simplify( % ); D[1](g); simplify( %(x,y) ); D[2](g); simplify( %(x,y) );

1.6 Anonymous functions and expressions (review) Here we define an anonymous function and then evaluate, differentiate, and integrate it. (z -> z^2*tan(z))(Pi/4); x -> x^3 + 2*x; %(2); D( % ); int( (%%)(x), x );

These next two commands show again that defining a function and naming a function are two distinct steps. z -> z/sqrt(1-z); f := %;

f := ((x,y) -> x^2) + ((x,y) -> y^3); f(u,v); f(2,3); g := (x -> x^2) + (y -> y^3); g(u,v); g(2,3);

plot(w^3+1, w=-1..1); plot( ((x,y)->x^3-y^3)(w,-1), w = ); plot( w->(((x,y)->x^3-y^3)(w,-1)), );

1.7. Functions that return a function (optional) f := a -> ( y->a*y ); f(3); f(3)(4);

f := (x,y) -> 3*x^2+5*y^2; f(x,3); fx3 := x -> f(x,3); fx3(x); slice_f_with_y_fixed := c -> ( x->f(x,c) ); fx3 := slice_f_with_y_fixed(3); fx3(x);

The End ! Thank you for your listening !