Mattingly "AI & Prompt Design: The Basics of Prompt Design"
Lesson 9: The Product and Quotient Rule
1. Section 3.2
The Product and Quotient Rules
Math 1a
February 22, 2008
Announcements
Problem Sessions Sunday, Thursday, 7pm, SC 310
Office hours Tuesday, Wednesday 2–4pm SC 323
Midterm I Friday 2/29 in class (up to §3.2)
2. Outline
The Product Rule
Derivation of the product rule
Examples
The Quotient Rule
Derivation
Examples
More on the Power Rule
Power Rule for nonnegative integers by induction
Power Rule for negative integers
3. Recollection and extension
We have shown that if u and v are functions, that
(u + v ) = u + v
(u − v ) = u − v
What about uv ? Is it u v ?
5. Is the derivative of a product the product of the
derivatives?
NO!
Try this with u = x and v = x 2 .
6. Is the derivative of a product the product of the
derivatives?
NO!
Try this with u = x and v = x 2 . Then uv = x 3 , so (uv ) = 3x 2 .
But u v = 1(2x) = 2x.
7. Is the derivative of a product the product of the
derivatives?
NO!
Try this with u = x and v = x 2 . Then uv = x 3 , so (uv ) = 3x 2 .
But u v = 1(2x) = 2x.
So we have to be more careful.
8. Mmm...burgers
Say you work in a fast-food joint. You want to make more money.
What are your choices?
9. Mmm...burgers
Say you work in a fast-food joint. You want to make more money.
What are your choices?
Work longer hours.
10. Mmm...burgers
Say you work in a fast-food joint. You want to make more money.
What are your choices?
Work longer hours.
Get a raise.
11. Mmm...burgers
Say you work in a fast-food joint. You want to make more money.
What are your choices?
Work longer hours.
Get a raise.
Say you get a 25 cent raise in
your hourly wages and work 5
hours more per week. How
much extra money do you
make?
12. Money money money money
The answer depends on how much you work already and your
current wage. Suppose you work h hours and are paid w . You get
a time increase of ∆h and a wage increase of ∆w . Income is
wages times hours, so
∆I = (w + ∆w )(h + ∆h) − wh
FOIL
= wh + w ∆h + ∆w h + ∆w ∆h − wh
= w ∆h + ∆w h + ∆w ∆h
14. A geometric argument
Draw a box:
∆h w ∆h ∆w ∆h
h wh ∆w h
w ∆w
∆I = w ∆h + h ∆w + ∆w ∆h
15. Supose wages and hours are changing continuously over time. How
does income change?
∆I w ∆h + h ∆w + ∆w ∆h
=
∆t ∆t
∆h ∆w ∆h
=w +h + ∆w
∆t ∆t ∆t
16. Supose wages and hours are changing continuously over time. How
does income change?
∆I w ∆h + h ∆w + ∆w ∆h
=
∆t ∆t
∆h ∆w ∆h
=w +h + ∆w
∆t ∆t ∆t
So
dI ∆I dh dw
= lim =w +h +0
dt t→0 ∆t dt dt
17. Supose wages and hours are changing continuously over time. How
does income change?
∆I w ∆h + h ∆w + ∆w ∆h
=
∆t ∆t
∆h ∆w ∆h
=w +h + ∆w
∆t ∆t ∆t
So
dI ∆I dh dw
= lim =w +h +0
dt t→0 ∆t dt dt
Theorem (The Product Rule)
Let u and v be differentiable at x. Then
(uv ) (x) = u(x)v (x) + u (x)v (x)
19. Example
Apply the product rule to u = x and v = x 2 .
Solution
(uv ) (x) = u(x)v (x) + u (x)v (x) = x · (2x) + 1 · x 2 = 3x 2
This is what we get the “normal” way.
21. Example
Find this derivative two ways: first by FOIL and then by the
product rule:
d
(3 − x 2 )(x 3 − x + 1)
dx
Solution
(i) by FOIL:
d FOILd
(3 − x 2 )(x 3 − x + 1) = −x 5 + 4x 3 − x 2 − 3x + 3
dx dx
= −5x 4 + 12x 2 − 2x − 3
(ii) by the product rule:
dy d d 3
= (3 − x 2 ) (x 3 − x + 1) + (3 − x 2 ) (x − x + 1)
dx dx dx
= (−2x)(x 3 − x + 1) + (3 − x 2 )(3x 2 − 1)
= −5x 4 + 12x 2 − 2x − 3
23. One more
Example
d x
Find xe
dx
Answer
y = e x + xe x
24. Mnemonic
Let u = “ho” and v = “hi”. Then
(uv ) = uv + vu = “ho dee hi plus hi dee ho”
25. Outline
The Product Rule
Derivation of the product rule
Examples
The Quotient Rule
Derivation
Examples
More on the Power Rule
Power Rule for nonnegative integers by induction
Power Rule for negative integers
27. The Quotient Rule
What about the derivative of a quotient?
u
Let u and v be differentiable and let Q = . Then u = Qv . If Q
v
is differentiable, we have
u = (Qv ) = Q v + Qv
u − Qv u uv
Q = = − 2
v v v
u v − uv
=
v2
28. The Quotient Rule
What about the derivative of a quotient?
u
Let u and v be differentiable and let Q = . Then u = Qv . If Q
v
is differentiable, we have
u = (Qv ) = Q v + Qv
u − Qv u uv
Q = = − 2
v v v
u v − uv
=
v2
This is called the Quotient Rule.
29. Examples
Example
d 2x + 5
1.
dx 3x − 2
d 2x + 1
2.
dx x 2 − 1
d t −1
3. 2+t +2
.
dt t
30. Examples
Example
d 2x + 5
1.
dx 3x − 2
d 2x + 1
2.
dx x 2 − 1
d t −1
3. 2+t +2
.
dt t
Answers
31. Examples
Example
d 2x + 5
1.
dx 3x − 2
d 2x + 1
2.
dx x 2 − 1
d t −1
3. 2+t +2
.
dt t
Answers
19
1. −
(3x − 2)2
32. Examples
Example
d 2x + 5
1.
dx 3x − 2
d 2x + 1
2.
dx x 2 − 1
d t −1
3. 2+t +2
.
dt t
Answers
19
1. −
(3x − 2)2
2 x2 + x + 1
2. −
(x 2 − 1)2
33. Examples
Example
d 2x + 5
1.
dx 3x − 2
d 2x + 1
2.
dx x 2 − 1
d t −1
3. 2+t +2
.
dt t
Answers
19
1. −
(3x − 2)2
2 x2 + x + 1
2. −
(x 2 − 1)2
−t 2 + 2t + 3
3.
(t 2 + t + 2)2
34. Mnemonic
Let u = “hi” and v = “lo”. Then
u vu − uv
= = “lo dee hi minus hi dee lo over lo lo”
v v2
35. Outline
The Product Rule
Derivation of the product rule
Examples
The Quotient Rule
Derivation
Examples
More on the Power Rule
Power Rule for nonnegative integers by induction
Power Rule for negative integers
36. Power Rule for nonnegative integers by induction
Theorem
Let n be a positive integer. Then
d n
x = nx n−1
dx
37. Power Rule for nonnegative integers by induction
Theorem
Let n be a positive integer. Then
d n
x = nx n−1
dx
Proof.
By induction on n. We have shown it to be true for n = 1.
d n
Suppose for some n that x = nx n−1 . Then
dx
d n+1 d
x = (x · x n )
dx dx
d d n
= x xn + x x
dx dx
= 1 · x n + x · nx n−1 = (n + 1)x n
38. Power Rule for negative integers
Use the quotient rule to prove
Theorem
d −n
x = (−n)x −n−1
dx
for positive integers n.
39. Power Rule for negative integers
Use the quotient rule to prove
Theorem
d −n
x = (−n)x −n−1
dx
for positive integers n.
Proof.
d −n d 1
x =
dx dx x n
d d
x n · dx 1 − 1 · dx x n
=
x 2n
0 − nx n−1
= = −nx −n−1
x 2n