Composition of Functions Suppose we have two money machines, both of which increase any money...

19
Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine B adds five dollars. The money that comes out is described by a(x) = 2x for Machine A and b(x) = x + 5 for Machine B, where x is the number of dollars inserted. The machines can be hooked together so that the money coming out of one machine goes into the other. There are two ways of hooking up the machines which result in the formulas shown below. The first formula is the composition of b with a, while the second formula is the composition of a with b. A B $ $: 5. 2x 5 a(x) b(a(x)) B A $ $ : 10. 2x 5) 2(x b(x) 2 a(b(x))

Transcript of Composition of Functions Suppose we have two money machines, both of which increase any money...

Page 1: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

Composition of Functions• Suppose we have two money machines, both of which

increase any money inserted into them. Machine A doubles our money while Machine B adds five dollars. The money that comes out is described by a(x) = 2x for Machine A and b(x) = x + 5 for Machine B, where x is the number of dollars inserted. The machines can be hooked together so that the money coming out of one machine goes into the other. There are two ways of hooking up the machines which result in the formulas shown below. The first formula is the composition of b with a, while the second formula is the composition of a with b.

• Which of these two compositions would you prefer? Why?

A B$ $: 5.2x 5a(x)b(a(x))

B A$ $: 10.2x 5)2(x b(x)2a(b(x))

Page 2: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

Decomposition of Functions

• Sometimes we reason backward to find the functions which went into a composition. This process is called decomposition, and there may be more than one way to do it.

• Problem. The vertex formula for the family of quadratic functions is p(x) = a(x – h)2 + k. Decompose the formula into three simple functions. That is, find formulas for u, v, and w where p(x) = u(v(w(x))). Solution. We work from the inner parentheses outward. Let w(x) = x – h. Let v(x) = x2 and let u(x) = ax + k. Now, let’s check our work: u(v(w(x))) = av(w(x)) + k = a(w(x))2 + k = a(x – h)2 + k. Thus, we have correctly decomposed the formula for p(x).

Page 3: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

Definition of Inverse Function

• We have previously studied inverse functions. For example, we defined the logarithm as the inverse function of the exponential function. We now give a more careful treatment of inverse functions.

• Suppose Q = f(t) is a function with the property that each value of Q determines exactly one value of t. Then f has an inverse function,

If a function has an inverse, it is said to be invertible.

• Example. Solve sin x = 0.8 using an inverse function. A calculator (set in radians) gives x = sin-1(0.8) 0.93.

f(t). Q ifonly and if t Q)(f -1 and f -1

Page 4: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

Finding a formula for an inverse function

• In the graph below, we have P = f(t) = 20 + 0.4t, and we want to graphically find

P

(25).f -1

Locate 25 on the P-axis

Read off the value of t corresponding to P = 25.

Page 5: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

• If we continue with the example from the previous slide, we may also solve algebraically for The equation to be solved is: 20 + 0.4t = 25, and we first subtract 20 from both sides to obtain 0.4t = 5. Upon dividing by 0.4, we have t = 12.5 .

• This same algebraic procedure can be carried for a general P to obtain the formula for We must solve 20 + 0.4t = P for t. We have 0.4t = P – 20, and thus,

That is,

(25).f -1

.f -1

50. P5.20.4

20P t

50. P5.2P)(f -1

Page 6: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

• Problem. Suppose we have a savings account which pays 4% interest compounded annually. The balance, in dollars, in the account after t years is given by B = f(t) = 500(1.04)t. The inverse function t = f -1(B) gives the number of years for the balance to grow to $B. Find a formula for t = f -1(B). Solution. We solve for t in terms of B in the given equation.

.1.04 log

log(B/500) B)(f t

1.04 logt500

Blog

)04.1(500

B

500(1.04) B

1-

t

t

Page 7: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

The Horizontal Line Test

• If there is a horizontal line which intersects a function’s graph in more than one point, then the function does not have an inverse. If every horizontal line intersects a function’s graph at most once, then the function has an inverse. The graph of the function q(x) = x2, which is shown below, fails the horizontal line test. Consider y = 4.

The line y = 4 intersects graph of q(x) = x2 twice.

Page 8: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

Evaluating an Inverse Function GraphicallyLet u(x) = x3 + x + 1. The graph of u(x) is shown below, and it looks as though u passes the horizontal line test. To find u-1(4), we can proceed graphically or we can use Maple.

u-1(4) 1.213

evalf(solve(x^3+x+1=4,x));1.213411663, -.6067058314 + 1.450612250 I, -.6067058314 - 1.450612250 I

Page 9: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

The Graph, Domain, and Range of the Inverse Function.

• Suppose f is an invertible function. Then outputs of f are inputs of f -1. Similarly, outputs from f -1 are inputs of f. It follows that:

Domain of f -1 = Range of f and

Range of f -1 = Domain of f.

• Example. The domain of f(x) = 10x is all real numbers while its range is all positive real numbers. Of course, we know that f -1(x) = log x, and the domain of f -1 is all positive real numbers while its range is all real numbers.

• It is known that the graph of f -1 can be obtained by reflecting the graph of f across the line y = x.

Page 10: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

A Property of Inverse Functions

• If y = f(x) is an invertible function and y = f -1(x) is its inverse, then • f -

1(f(x)) = x for all values of x for which f(x) is defined,• f(f

-1(x)) = x for all values of x for which f -1(x) is defined.

• Example. f(x) = x/(1+x) and f -1(x) = x/(1–x). We verify that the first property listed above holds for these functions:

x.

x)1/(1

x)x/(1

x)x)/(1x1(

x)x/(1

x)x/(11

x)x/(1

f(x)1

f(x) f(x))(f 1-

Page 11: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

Restricting the domain

• A function which fails the horizontal line test is not invertible. For this reason, f(x) = x2 does not have an inverse function. However, if we restrict the domain of f to the set of nonnegative x values, then the restricted graph does pass the horizontal line test. Thus, f(x) = x2 does have an inverse on its restricted domain,

• If we solve y = x2 for x, where we have that x = We note that is defined to be the nonnegative value whose square is y. Thus, f(x) = x2, restricted to has the inverse function f -1(x) = We note that the domain of f -1 is also Do you see why?

0.x

0,x .yy

0x .x

0.x

Page 12: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

The graph of f(x) = x2 restricted to and the graph of f -1(x) =

0,x .x

Page 13: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

Combinations of Functions

• Like numbers, functions can be combined using addition, subtraction, multiplication, and division. For addition, the sum of two functions is defined by adding the values of the two functions at each value of x where both functions are defined. Subtraction, multiplication, and division of two functions are handled similarly.

• Example. Let f(x) = x and g(x) = 1/x. Define h(x) = f(x) + g(x), for x > 0. Complete the table below for the values of h(x).

x 0.25 0.50 1.00 2.00 4.00

f(x) = x 0.25 0.50 1.00 2.00 4.00

g(x) = 1/x 4.00 2.00 1.00 0.50 0.25

h(x) = f(x)+g(x) ? 2.50 ? ? ?

Page 14: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

Graph of h(x) = f(x) + g(x), where f(x) = x and g(x) = 1/x, x>0.

x

y

Page 15: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

Factoring a Function’s Formula into a Product

• It is often useful to express a given function as a product of functions.

• Example. Find exactly all the zeros of

• We can factor out a common factor of 2x:

• Next, we factor the quadratic:

• The zeros are

since 2x is never zero.

.2x2x62p(x) 1xx2x

)2xx6(2p(x) 2x

2)x3)(12x(2p(x) x

3

2 x,

2

1x

Page 16: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

A function defined as a quotient of two functions

• If we let f(x) = sin x and g(x) = cos x, then

• The quotient function has all real numbers except odd multiples of /2 as its domain. That is, the values where g(x) = cos x is zero must be excluded from the domain.

. xcos

xsin

g(x)

f(x)x tan

y = tan x

Page 17: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

The sum of two even functions is even

Example.

.x g(x) cos(x),2 f(x) 221 g(x) f(x)

Page 18: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

The product of two odd functions is even

• Example.

sin(x). g(x) x,f(x) g(x)f(x)

Page 19: Composition of Functions Suppose we have two money machines, both of which increase any money inserted into them. Machine A doubles our money while Machine.

Summary of Compositions,Inverses, & Combinations of Functions

• Two functions form a new function when the output of one becomes the input of the other--this is composition.

• Decomposition of functions was also introduced.

• Suppose Q = f(t) is a function with the property that each value of Q determines exactly one value of t. Then f has an inverse function,

• We discussed: Finding a formula for f -1, the horizontal line test, domain and range of f -1, and the relation of the graphs of f and f -1.

• The compositions of f and f -1 were formed in both possible ways.

• Restricting the domain of f so that the resulting function has an inverse was investigated.

• Combining functions using addition, subtraction, multiplication, and division was studied.

f(t). Q ifonly and if t Q)(f -1