D x (c) = 0 D x (x) = 1 D x (y) = 0 for y an independent variable D x (u+v) = D x (u) + D x (v) D x (uv) = u D x (v) + v D x (u) D x (u n ) = nu n-1 D.

Slides:



Advertisements
Similar presentations
Variables and Expressions
Advertisements

Exponents, Parentheses, and the Order of Operations.
6.001: Structure and Interpretation of Computer Programs Symbols Quotation Relevant details of the reader Example of using symbols Alists Differentiation.
Fall 2008Programming Development Techniques 1 Topic 10 Example: Symbolic Differentiation Section October 2008.
SICP Symbolic data Symbol: a primitive type Generalization Symbolic differentiation.
מבוא מורחב - שיעור 10 1 Symbols Manipulating lists and trees of symbols: symbolic differentiation Lecture 10.
Rules for Differentiating Univariate Functions Given a univariate function that is both continuous and smooth throughout, it is possible to determine its.
Functional programming: LISP Originally developed for symbolic computing First interactive, interpreted language Dynamic typing: values have types, variables.
 To add numbers in scientific notation: 1) Add the constants 2) Keep the exponent the same  Example: (2.1 x 10 5 ) + (3.2 x 10 5 ) = ( ) x 10.
How To Find The Reduced Row Echelon Form. Reduced Row Echelon Form A matrix is said to be in reduced row echelon form provided it satisfies the following.
6.001 SICP 1/ : Structure and Interpretation of Computer Programs Symbols Example of using symbols Differentiation.
Warm-ups 1.) 2 2.) 3 3.) 4 4.) (3460) = = 4222 = 822 = 162 = 32 Solve: = 333 = 93 = 27 = 4444 = 1644 = 644 = 256 = 1 Anything to the 0 power.
PRE-ALGEBRA. Lesson 4-7 Warm-Up PRE-ALGEBRA How do you multiply numbers with the same base? How do you multiply powers in algebraic expressions? Rule:
CS 152: Programming Language Paradigms February 17 Class Meeting Department of Computer Science San Jose State University Spring 2014 Instructor: Ron Mak.
Exponents An exponent is the number of times the base is multiplied by itself. Example 27 can also be written as 3 This means 3 X 3 X 3.
Monomials – Product and Quotient Remember your rules for multiplying and dividing variables…- When multiplying like variables, ADD your exponents When.
Distributive Property. The property that states that multiplying a sum by a number is the same as multiplying each addend in the sum by the number and.
1/38. 2/38 Tagged Data Tag: a symbol in a data structure that identifies its type Why we need tags Extended example: evaluating arithmetic expressions.
8-1 Adding and Subtracting Polynomials. Degree of a monomial: is the sum of the exponents of its variables. The degree of a nonzero constant is 0. Zero.
מבוא מורחב 1 Lecture #9. מבוא מורחב 2 Symbol: a primitive type constructors: (quote alpha) ==> quote is a special form. One argument: a name. selectors.
CS220 Programming Principles 프로그래밍의 이해 2002 가을학기 Class 6 한 태숙.
PROPERTIES OF EXPONENTS
SICP Tagged data Why do we need tags Concept of tags Extended example.
Grade 6. Expression: a set of numbers that are related to one another by the use of operator symbols that represent a mathematical situation Has no equal.
Techniques of Differentiation. We now have a shortcut to find a derivative of a simple function. You multiply the exponent by any coefficient in front.
Equations Inequalities = > 3 5(8) - 4 Numerical
Numbers Sets Natural Numbers – Counting numbers. Does not include 0 (example: 1,2,3,4…) Whole Numbers – All Natural numbers and the number zero (example:
Properties in Math. Commutative Property of addition Says that you can switch the addends around and still get the same sum. Ex: = Ex: 6 +
1/38 Tagged Data Tag: a symbol in a data structure that identifies its type Why we need tags Extended example: evaluating arithmetic expressions.
LESSON 4-7 EXPONENTS & MULTIPLYING. When we multiply terms with exponents  ADD exponents of like variables.
Degrees of a Monomial. Degree of a monomial: Degree is the exponent that corresponds to the variable. Examples: 32d -2x 4 16x 3 y 2 4a 4 b 2 c 44 has.
SICP Tagged data Why do we need tags Concept of tags Extended example.
Exponents and Monomials. Monomial is an expression that is a number, a variable, or a product of a number and variables. Constant is a monomial containing.
Properties of Real Numbers Ms. Gonzales’ Math Class.
5.3 Notes – Add, Subtract, & Multiply Polynomials.
1 Recursive Data Structures CS 270 Math Foundations of CS Jeremy Johnson.
2 Understanding Variables and Solving Equations.
Differential Equations
Addition Properties Associative Property of Addition
Tagged Data Tag: a symbol in a data structure that identifies its type
Combining Like Terms and using the Distributive Property
Exponent Rules: Continued
The number of times a number or expression (called a base) is used as a factor of repeated multiplication. Also called the power. 5⁴= 5 X 5 X 5 X 5 = 625.
Exponents and Monomials
6.001: Structure and Interpretation of Computer Programs
without changing the sum; a + b = b + a
Section 1-6: Multiplying Integers
Exponents and Monomials Lesson
Properties of Real Numbers
Objective - To recognize and evaluate variable expressions.
Exponents and Monomials
Commutative Properties
Lecture #9 מבוא מורחב.
1-9 Order of operations and distributive property
Making Equivalent Expressions By Combining Like Terms
Exponents and Monomials
2.7 The Distributive Property
1.2 Distributive Property & Combining Like Terms
8.3 The Addition Method Also referred to as Elimination Method.
7-2 Multiplying powers with the same base.
Warm Up Simplify
Parts of an Expression EE2b. Identify parts of an expression using mathematical terms (sum, term, product, factor, quotient, coefficient).
Changing Data: (Continued)
Evaluating Expressions
Exponents and Monomials
list data list 만들기 list 사용하기 nil : list link :  * list -> list
Dispatch on Type (one-less x) => x-1 if x is a <number>
Presentation transcript:

D x (c) = 0 D x (x) = 1 D x (y) = 0 for y an independent variable D x (u+v) = D x (u) + D x (v) D x (uv) = u D x (v) + v D x (u) D x (u n ) = nu n-1 D x (u) for n > 0

CONSTANTS: Type: Predicate: const? represented concretely as s VARIABLES: Type: Predicate: var? (same-var? v1 v2) represented concretely as s

SUM: Type: Predicate: sum? Accessors: sum-addend, sum-augend Constructor: make-sum Contract: If x = (make-sum a b) then (+ (sum-addend x) (sum-augend x)) = a + b PRODUCT: Type: Predicate: prod? Accessors: prod-multiplier, prod-multiplicand Constructor: make-prod Contract: If x = (make-prod a b) then (* (prod-multiplier x) (prod-multiplicand x)) = ab

EXPONENT: (^ a b) Type: Predicate: expt? Accessors: expt-base, expt-power Constructor: make-expt Contract: If x = (make-expt a b) then (^ (expt-base x) (expt-power x)) = a b

(define (deriv e (v )) (cond ((const? e) 0) ((var? e) (if (same-var? e v) 1 0)) ((sum? e) (make-sum (deriv (get-sum-addend e) v) (deriv (get-sum-augend e) v))) ((prod? e) (make-sum (make-prod (get-prod-multiplier e) (deriv (get-prod-multiplicand e) v)) (make-prod (deriv (get-prod-multiplier e) v) (get-prod-multiplicand e)))) ((expt? e) (make-prod (make-prod (get-expt-power e) (make-expt (get-expt-base e) (make-sum (get-expt-power e) -1))) (deriv (get-expt-base e) v)))))))

(define (make-sum x y) (list '+ x y)) (define (sum? x) (and (list? x) (= 3 (length x)) (eq? '+ (first x)))) (define (get-sum-addend x) (if (sum? x) (second x) (error "..."))) (define (get-sum-augend x) (if (sum? x) (third x) (error "...")))

(make-sum a b) ==> If a or b is zero, just return the other one If a and b are both numbers, add them. (make-product a b) ==> If a=0 or b=0, return 0 If a=1 or b=1, return the other. If both are numbers, multiply them. (make-expt a b) ==> If a=0 or a=1, return a If b=0, return 1 If b=1, return a If both are numbers, do the computation.

(define (make-sum x y) (cond ((and (const? x) (const? y)) (+ x y)) ((and (const? x) (= x 0)) y) ((and (const? y) (= y 0)) x) (else (make :addend x :augend y))))