This is sorta the theoretical part of class. It's not too theoretical but it's a little theoretical.
So remember a function takes an element in the domain and maps it to an element of the range
That takes an input and puts it onto an output-- a function is just an operation that does that.
So you need to have well-defined domains and ranges. So we need to be clear what's going in and clear what you get out.
Okay, you can't just say some number in some graph, you have to have some rule so it is obvious what's the input and output
Another thing you can do to help visualize functions, is you can graph them.
So you guys've all done graphing, a lot. So what we'll introduce for a minute or two, think about what a graph does.
A graph, if you had a graph like a line, what you are doing is taking the domain and you are matching it to an element in the range.
and you are making a mark that says "that's where those two go together."
And then another element of domain and another element of range make a mark and you say that's where those two go, and you connect all those dots
and that's a picture
So when we use graphs it helps us visualize what's gong on and that's why you can use a vertical line test or a horizontal line test
So the key for graphs is if you want to think whether something is a function of x, the vertical line test will tell you
You need to be able to draw a vertical line anywhere on the graph and never get the graph twice
You can not hit the graph at all (ie, miss it entirely), but no vertical line can intersect the graph in more than one place.
So again, no vertical line can intersect the graph more than once
Could be less than once --it could be zero-- but it can't be more than once
Yes?
No?
Look at this and say wow I can draw a line and touch the graph more than once.
Here, I can draw the lines and no matter what I do I'm only going to hit the graph once.
I think next week we go into one-to-one functions. One-to-one functions also have to go through the horizontal line test
and a one-to-one function has to pass both the vertical and horizontal line test.
Now another thing to think about with graphs, which we're going to do
May or may not get recorded on the exam, I'm not sure.
What's called translation of a graph
Makes you move the graph around
okay but I don't want to talk about that to much. Today I want to talk about
Composition of functions. So composition of functions, means one function is inside of another function.
We will do a lot of that. There's a lot of of algebra involved in it.
The idea is how they function f(x).
And you can do different things if you have a second function, like g(x).
So let's say f(x) equals x squared plus 3
g(x) equals 1 over x.
Nice simple function
Okay, so what is (f+g)(x)?
Should be pretty obvious
*Student is answering question*
Well it is f(x) plus g(x), right but what is that?
So (f+g)(x) is obvious..
There you go. Have more candy to throw up there.
Okay all you're doing is literally adding them.
She asked that striaght forward, we are doing an algebra of function. What we are saying is you can do rules of functions
So (f-g)(x)
Gets more fun.
Okay and by the way, what happens is you'll have a domain of f(x) and a domain of g(x)
So the domain of f(x) is all real, so you can put any number you want, square it and add three to anything you want.
Domain of g(x) is not all reals, because you can't have a zero
You can't have a zero in the domain
If you put in zero, you'll get one over zero and that's undefined
The domain of (f+g) of x will also be all reals except zero.
So when you have two domains the more more restricted one is going to win.
because the domain of g(x) is more restricted than the domain of f(x).
So when we combined them the restriction doesn't go away
So you couldn't put zero in this one so you can't put zero in this one either, same here..
(f times g)(x)
Is write like that
x squared plus 3 times one over x
Question: Can you put zero in this one?
Why not?
You can put zero? You can't? To me you can't put zero in that because you can't have zero in the denominator.
And you still have a denominator
So the problem doesn't go away just because you put two functions togeher
So far so good?
Okay so when you have f plus g you add them, we have f minus g you subtract them.
f divided by g
(f/g)(x), this one is kind of entertaining, because now you have a denominator
So you could say to yourself, now I can flip that x. Right? That 1 over x?
and we get x squared plus 3 times x.
Then the problem goes away doesn't it?
I make it this..
And now I don't have the zero in the denominator problem anymore, right?
Wrong.
If you couldn't have it in the original function, you can't have it in the combined function.
You still can't have zero here.
Okay, you can flip that over as long as x is not zero.
We are more likely, what's happens if f(x) is x squared plus 3, g(x) is x squared minus 1. Right now both domains are fine.
But if you have f(g(x))
The domain of f(g(x))
Now x can't be one
How we doing so far? This isn't very hard, right?
The real reason you need to know what a domain is when you do a function because you really need to know what are you doing, what are you putting in?
This will show up at other aspects of life, not necessary mathematically.
Now for the fun part.
When you put functions inside functions
So now when you do f(g(x)).
Which is sometimes written "f o g" of x.
f(g(x)), what does that mean?
Well, before we had f(x). What the x means, where you see x in the equation plug something in, yes?
So what does g(x) mean?
This says go to f and wherever we have x, replace it with g(x)
Also known as "fog" of x, so the circle means composite. So f(g(x)).
Means..take x and now replace it with g(x).
g(x) is 1 over x.
We genuinely don't care if you simplify, well there are a few problems you'll have to simplify. But on a test I wouldn't expect you to simplify something that defined
And notice before domain x can't be zero so it can't be zero.
What is g(f(x))?
Well now, I am going the other way..
Now I take f(x), and put it in g(x). So it'd be 1 over f(x), which is 1 over x squared plus 3
So far so good? This is what we mean by composition of functions
So let's say I say f(x)
I have those two functions.
And I want to find f(4).
You all know how to do f(4) right?
Just plug in 4.
4 cubed minus 4 plus 2.
Which is 62.
So far so good
Easy.
What if I ask for f(g(4))?
How do you do f(g(4))?
Well..
First, you figure out what g(4) is then you take that answer and plus it into f.
So if f(g(4)) equals question mark
We'll say well g(4) is 2 times 4 plus 1 equals 9.
So this is now going to ask for f(g(4)) means find f(9)
Which is 9 cubed minus 9 plus 2, which is 722.
You can all do it in your head right?
Maybe not in your head
You guys don't know 9 cubed?
Same as 3 to the 6?
Okay let's do another one of these
We got the idea, this isn't very hard, right?
You learned this back when you did algebra the last time or the time before.
So if asked f(a), it would just be a^2 + 2a + 1. If I asked f(b), it would be b^2 + 2b + 1
What if i asked for f(x+h)?
What would it be?
but we take x and replace it with x+h.
So we get x plus h squared, plus 2 x plus h, plus 1.
Now heres the fun part.. this we might ask you to simplify
So heres a couple handy things to memorize
few good ones to memorize
I'll put it on this board, walk over to the other side and put it on that board
x plus h squared, we will foil that out and we get x squared plus 2xh plus h squared.
And the other one is x plus h cubed.
and that one is x cubed plus 3 times x squared h, plus 3xh squared, plus h cubed. So the pattern for the second one, see the power of x goes down each time?
goes from 3 to 2 to 1to 0. And the power of h goes up each time, goes from 0 to 1 to 2 to 3.
It also happened here, x goes from 2 to 1 to 0 and h goes from 0 to 1 to 2
Coefficients come from Pascals Triangle, or you can find them in Pascals Triangle
So how am I going to memorize these, because theses are going to sow up a couple of times in this class and a whole bunch of times in calculus
If you aren't memorizing them thats fine, you just take x plus h and multiply iy by x plus h.
and then you multiply it by x plus h again if you have to
So here..
x plus h squared is x squared, plus 2xh plus x squared, plus 2x plus 2h plus 1
Cant really do anything with that so we stop
This is something you might see over the next few days on webassign
Lets practice one of these
To find f(x+h) use f(x) and replace it by x+h.
So it's 3 x plus h, squared, minus x plus h, plus 4
Now you multiply out the x plus h
and you get x squared plus 2xh plus h squared
I'm going to rewrite that
So you'll multiple out the x plus h, minus x, minus h, plus 4 and then distribute the 3
and you get 3x squared, plus 6xh, plus 3h squared, minus x minus h plus 4
Okay, so f(x+h) minus f(x).
. Now you're going to take this and subtract f(x)
So you're gonna take 3x squared, plus 6xh, plus 3h squared, minus x minus h plus 4
Minus 3x squared minus x plus 4
Notice what happens..
All the terms on the left that do not contain and h are going to cancel all the terms on the right.
Because here you have 3x squared, and here you have minus 3x squared.
Here you have minus x, here you have minus minus x
and here you have 4, and here you have minus 4. You are now left with 6xh plus 3 h squared minus h
So a clue, when we give you a problem in the form of f(x+h) minus f(x) you want to look for cancelations, you'll get a bunch of those.
-Everyone see that?
Lets do another one
to make sure you get the hang out it
Okay ready for the last touch?
So do what you were doing before, to get the answer divided it by h.
So you are going to do this a bunch of times in calculus. So we are practicing it now to make sure, that's why this course is called introduction to calculus
First do the hard part. Got to find f(x) plus h Well, f(x+h), is (x plus h)cubed plus 4 x plus h minus 1.
Okay, so if we multiply that out thats x cubed plus 3x squared h, plus 3x h squared, plus h cubed plus 4x, plus 4h minus 1
So far so good?
How do we know this…
Because that's this one, make sure you memorize that. I'll put it up later
So f(x+h) - f(x), is going to be this minus this.
So it's going to be x cubed plus 3 x squared h, plus 3 x h squared, plus h cubed plus 4 x plus 4 h minus 1, minus x cubed, 4x, minus 1
Now we can cancel.. I got x cubed, minus x cubed.I got 4x and minus 4x, and minus 1 minus minus 1.
So now i am left with 3 x squared h, plus 3x h squared, plus x cubed, plus 4h.
Finally, I am going to take that..
and divide it by h.
Some of you guys saw this in precalc or whatever in high school
How do you solve this? Factor and h out of everything
Take an h out of each of the terms on top, they each contain an h and now you can cancel that h And you get 3 x squared, plus 3xh,plus h squared plus 4
You're going to see something like this on webassign, and a good chance you can see this on an exam. Can't say a hundred percent but we are practicing it for a reason
When you did this with polynomials, all the terms on the right will cancel on the left, every time.
Let's take x and replace it with x plus h
So f(x + h)
1 over x plus, plus 2
These are composite functions, okay, get the function x plus h and then you put that inside the function f.
and you get out 1 over x plus h, plus 2
and now we do a little algebra on it, you take this function and subtract that function.
This is going to be one over x plus h, plus 2 minus..
1 over x, plus 2. The 2's cancel
And you get 1 over x plus h, minus 1 over x.
Now you might be tempted to just leave it like that, but you can actually simplify this
When we have two fractions what do we have to do to combined them? Common denominator.
Right, you got to do that
Common denominator could be x times x plus h
so you multiply the left by x, top and bottom
You take the right one and multiply it by x plus h.
That becomes x minus, x plus h
over x times, x plus h
Now distribute that minus sign and notice the x's cancel and you're left with minus h over x times, x plus h
We could distribute the x on the bottom but it doesnt get you anywhere
Simplifying is to make things simpler. So the problem with distributing it is here you know that zero is zero and zero is negative
When you multiply out, it makes it less obvious.
So that's my problem with the phrase simplify. I'm not sure this is really simpler than this
Theres an advantage for the second form when we want to do more operations on it
These are composite functions, okay, get the function x plus h and then you put that inside the function f.