Stony Brook MAT 122 Fall 2017
Lecture 24: Curve sketching of difficult functions
October 23, 2017

Start   2x/(1+x^2) is that the paper homework?
I think we had this one, right?
Graph that. So all the fun stuff involved in this, some of you already had recitation, but let's go through this.
By the way, the paper homework problems are harder than the exam problems and that's generally my philosophy, is the hardest thing I give you is paper homework.
0:31So when you went in to any of these graphs, you want to find minimum, maximum, points of inflection, the matching y coordinates and then you want to draw the graph.
And with the minimum and maximum and increasing and decreasing, and concave up and concave down, so you can find a lot of stuff with just a couple of derivatives.
Also you should look at this and say to yourself since it's a rational expression from the numerator and denominator, what happens when x goes to infinity?
1:01So what's the limit of this as x goes to infinity?
Huh. You should know this.
Give it a shot.
Good guess.
So, bottom power is bigger is bigger than the top power, So when x approaches infinity, this is going to approach 0. So it's going to have a horizontal asymptote at the x axis.
Ok? So let's take the first derivative. So the first derivative we need the quotient rule, bottom*derivative of top-top*derivative of bottom, over the bottom squared.
1:48Now normally, we wouldn't bother simplifying if all I asked you for was the derivative.
But since we're going to need to find 0's, and we're going to need to find a second derivative, we're going to want to simplify this.
2:00So this is (2+2x^2-4x^2)/(1+2x^2)^2 Which is (2-2x^2)/(1+2x^2)^2.
Alright, so that's the first derivative, we'll come back to that in a minute.
Now let's do the second derivative.
2:41We've got the bottom function* derivative of the top - top function*derivative of the bottom, (which is 2(1+x^2)(2x)) over the bottom squared.
3:14Everybody know's there's a midterm a week from today?
8:45, same room as last time.
Ok, don't forget.
We only have one more topic to cover before the midterm.
So I guess I'll squeeze a little bit more of this in today.
3:32Alright, now we have to simplify that, that's a mess. But notice something, this is (1+x^2)^2, so it has a term of 1+x^2, this has a term of 1+x^2, and this has 4 of them. So I could take 1+x^2 out of the numerator and the denominator.
Then I'd be left with ((1+x^2)(-4x)-(2-2x^2)(4x))/(1+x^2)^3
4:18Ok? So I took (1+x^2) out of here, I took (1+x^2) out of here, and I canceled them with a (1+x^2) in the denominator.
Ok? So I factored that out and I canceled it, that's why I only have cubed left.
4:32Got that? So now let's simplify that, that's ((-4x-4x^3-8x+8x^3)/(1+x^2)^3) Which is 4x^3-4x/(1+x^2)^3
5:02Did I do everything correctly? I feel like something's a little wrong here. Eh, I guess that's ok.
So now we have to find some 0's. So the denominator is never 0. 1+x^2 is always going to equal 1.
So go back to the top, and to find where this is 0, just set the numerator equal to 0.
5:31You get x= -1 or +1.
Ok, and here, you can take, and again, that bottom is always positive, So we just have 4x(x^2-1)=0, where x=0, +/- 1.
Now we can go to the number line,
6:06and test some values.
I'm getting something funny going on here.
These numbers are wrong. So I did some arithmetic error in here.
So (1+x^2)^2 -4x, ....
6:40Ah, found my mistake, I'm glad none of you spoke. Cause that would hurt.
Ok, that makes more sense.
So I take out 4x, and I've got x^2-3, so this is 12.
7:03Speak up, we just found an error, so this has 0's at x=0, and +/- (sqrt)3. there we go alright.
So now, minimums and maximums. Pick a number less than -1.
Like -2 and plug it in here. So the bottom is always positive, so you just ignore it. At -2, the top is negative, so this function is going down.
7:32At 0, the top is positive, And at +2 it's negative, so we have a minimum here, and maximum there.
So far so good? Ok?
Now let's check the second derivative for concavity.
8:04So the bottom again is always positive, Pick a number to the left of -(sqrt)3, like -2, you get a negative, so this is negative, so concave down, Try a number like -1, you get positive, so it's concave up.
Positive 1 is negative, so it's concave down,
8:30And at 2, everything is positive, so concave up.
How are we doing so far.
Ok, last thing is we're going to need some y coordinates.
And y coordinates we always go back to the original equation. So you plug in -1, you get -2/2 which is -1,
9:05When you plug in +1 you get 2/2, which is 1.
When you plug in -(sqrt)3, you get -2(sqrt)3/4, so that's -(sqrt)3/4, about .8.
You plug in 0, you get 0.
And the square root of 3 you get (sqrt)3/2.
9:34Ok?
Ready to graph it?
So lets see. It goes through the origin, (--1, -1), (1,1) ((sqrt)3, (sqrt)3/2)
10:05(-(sqrt)3, -(sqrt)3/2)) Function is decreasing until it gets to -1, and it starts concave down, and switches to concave up.
Then it's concave up until you get to the origin, then it switches to concave down again.
10:31It'll stay concave down until it gets to here, and there ya go.
Isn't that a fun graph? Now as I told you guys, use a calculator, so you can get a picture of the graph first.
And see all the various pieces you can get out of there. Take a minute to absorb that. Yes that's this point right here, Point of inflection.
Good? The other graph is easier. Yes, is that a question? Just stretching and yawning? I do that to people, feel free to ask questions.
11:10As I said, I wrote the exam and I don't have anything that hard on the exam. I wouldn't do that to you guys.
But you should be able to do something like that. The more important thing is you understand a graph like this.
So like what is a graph like this doing? Forget the left part, you reach some peak, come down, and the just sort of flatten back out.
11:33Ok? You don't go up forever, you don't dive down, it flattens out, so there's cost functions that might look like that, or more likely cost functions.
So you get to a maximum profit and the your cost starts to get bigger and bigger Cause at some point, you're not making any money. Your profit and your cost just sort of cancel each other out.
So you would want to figure out where is this spot that's the best spot to be?
12:00But you have questions? Could we do another one? Can I go over the other problem?
Sure, well let's review this again for another minute to make sure we understand the importance of algebra, ok?
So first thing you do when doing a graph, is you want to find the first derivative and the second derivative.
So you get the first derivative, you use the quotient rule.
And then you can simplify the first derivative, and you can find 0's, so when you have a rational expression, you're going to find a fraction.
12:34You only have 0's when the numerator is 0, ok?
Cause when the denominator, you can't have a 0 in the denominator.
And you would care about 0's, because that could be place where it could change from increasing to decreasing, but the denominator is never 0.
x^2 is always greater than 0 and then you're adding 1. So, we only care where the numerator is 0 and that turns out to be +/- 1.
Now you go to the second derivative, this helps find concavity.
13:02So you take the derivative again, using quotient rule, which is a bit messier, and you can simplify it.
One of the tricks to simplifying these types that will always work when you have a rational expression to a power in the denominator, is you can factor out one of those terms.
I take the derivative of the derivative. That's the second derivative, the second derivative finds concavity.
Ok? Concavity. Like [?] on my tooth. That would be a concavity. See if you're listening.
13:38Pull out a (1+x^2), clearly that wasn't that funny, now you get down to (1+x^2)^3.
And simplify this again, and that's a 12 ok?
And again, you can find the 0's if you set the numerator equal to 0, and you get 0, +/- (sqrt)3.
Now you just have to test the values, so where the first derivative is negative, the function is going down, and where the first derivative is positive, the function is going up.
14:05Where the second derivative is negative, it's concave down, and where the second derivative is positive, it's concave up.
So now you found increasing and decreasing, you figured out maximum and minimums, these are called points of inflection, this is where the second derivative changes signs, You need the y coordinates and then you need to figure out what the graph looks like.
So how do I know what the graph looks like? Well I plot the points, and I know there's a horizontal asymptote because I know eventually I've got to get out to 0.
14:33And that this is a max, if that's a maximum, it'd have to end up back here, I'd have to come back down some how.
And if I don't switch concavity, I'll go down this way.
So I have to go back to concave up so I can flatten out at the axis. Same on this side. Another question?
I always plug into the original equation for the y coordinates. Because this equation is y=, or f(x)=.
15:02That's a derivative. So for y values, I have to use y=, that's why it's in the original equation.
So far so good? I only made 2 people leave.
I'm going to erase this in a second, so make sure you've got it. Ok.
Let's move on to the other one.
15:48Well that's true, but of course I can factor that into your grade.
So I wouldn't worry about the 100 part, I'd worry about the understanding part. But sure I can do something similar.
16:03I have something for everybody.
A lot of you guys worry a lot about these homework's, and these computer assignments, and you forget what a small fraction of your overall grade that is.
Sorry? So, you know, 1 computer homework, with a 0 is still not going to affect your grade very much.
16:30Let's do something similar to the homework, but not the same.
Let's say we had y= x^2(1-x)^2 There's a couple of things you should say in your head. That's a 4th power.
So that's going to look like a w probably.
Maybe with some fun going on because there's a square in here.
and a square right there. Now you could multiply that out and take the derivative if you wanted,
17:04but it's in factored form so you might want to leave it this way.
But if you wanted to multiply it out, that's not too hard to do.
The problem is if you do, when you take the derivative you'll be left with a cubic.
Cubics are not fun to factor unless you're a good factor-er.
So let's just take the derivative.
So we have the left function* derivative of the right + the right function * derivative of the left. (remember the chain rule)
17:46Now how would we find when that's 0? Well there's a couple of little tricks you can do for yourself.
Notice, this contains a (1-x), and a (1-x)^2, so you could pull a (1-x) out of this.
18:01And you're left with -1*2, so (1-x)(-2x^2+2x(1-x)) This is (1-x)(-2x^2+2x-2x^2
18:31Or (1-x)(-4x^2+2x) So that'll be easier to find 0's and that won't be that hard to take the second derivative of.
So again, see what I did. I took (1-x) out of both terms. So here I'm only left with (-1)(2)(x^2) and here I'm left with one more (1-x) and the 2x, and then I combine that, and simplify that.
19:08Which -2x? There's 2 of them.
I don't know who asked me, but there's 2 of them.
Here you have -2*x^2, and here you have 2x*(1-x), so 2x(1) and 2x(-x) So this is what I'm going to want to take the derivative of for the second derivative.
19:41So first function* derivative of the second function, which is (-8x+2), + the second function * the derivative of the first function which is (-1) That is 1(-8x)+8x^2+2-2x+4x^2-2x
20:16Which is, 12x^2-12+2.
Now I have easy 0's, one of the problems I told you guys last class, either you get easy 0's for the first derivative, or not the second, or the other way around. It's very hard to make everything come out easy.
20:40Alright? The other way you could have done the second derivative is you could have foiled this out and then taken the derivative.
21:06And when you do the exam, make sure you're very careful that you get all these steps correct.
Ok. I think we got it.
Ok, so 0's.
We can pull x out of here, in fact we can take a -2x out.
21:30So we've got 0's at 1, 0 and 1/2.
This is going to require the quadratic formula. So we can divide through by 2, So that's gonna be,
22:01And you whip out the calculator so you can see what the graph looks like.
We could simplify that radical if we wanted to.
(sqrt)12 is somewhere between 3 and 4.
22:32Alright, let's do some sign tests.
Pick a number less than 0. -1, I like that one.
So let's see. That was my derivative. I get 2* a negative, that's a negative. So it's going down.
23:07Pick a number between 0 and 1/2, like 1/4. Positive, and let's see that's a -1+1/2, so that's still negative.
So that means 0 is probably not a maximum or a minimum. It's just a flat spot.
23:31Now pick a number between 1/2 and 1, like 3/4.
positive * -9/16 + 3/4, positive, it's going up now.
So that's a min, minimum.
And pick a number bigger than 1, like 2. negative*negative, is positive, so again, flat spot.
24:06Why is that happening by the way? Because of the squared.
Ok? So squaring is telling you something funny is gonna happen.
Alright, this I could simplify, but I don't really have to, I've got (6-(sqrt)12)/12 and (6+(sqrt)12)/12.
24:31You want to get a feeling for how big those are. (sqrt)12 is about 3.5.
So this will be a small fraction, so 0 will work.
This is between, this is 6- this number, and this is 6+ this number, over 12, so 1/2 would be a good test value And for a number bigger than this we could use any number we want, like 10.
So you go to the second derivative, you plug in 0 you get + so it's concave up.
25:04You plug in 1/2 and it's negative so it's concave down.
And then concave up again.
25:31Alright, y coordinates.
Well at x=0, y=0, and at x=1, y=0.
And at x=1/2, you get 1/4*1/4=1/16.
I'm not going to try to find the y coordinates for the points of inflection, it's too hard.
I mean you can do it, but it's annoying.
26:06So wait, what do we know is happening? Well we have a minimum here at 0.
And, I'm sorry, at 1/2.
Is that right? Yeah.
Hm. Graph makes no sense.
26:34Cause it's 0 at 0, and at 1/2 its 1/16. It should be a negative number.
Maybe I made a calculation error. See if I can figure it out.
Let's look at my notes. Everybody check your phone for 30 seconds. That's positive.
That's what I did wrong.
27:00Ok.
Alright, it's doing that. So that's a minimum, a maximum, and a minimum. As I said, that's why you use calculators.
So that means the graph looks something like that.
Ok? And these are your points of inflection, so this is (6+(sqrt)12)/12, and this is (6-(sqrt)12)/12.
27:37As I said, you should feel free to use your calculator, to have a feeling of what the graph looks like, to help you find points, all that stuff.
You guys are all numb from me? Boy, calculus got hard in a hurry didn't it?
This is the worst part. As I said, the graphs won't be quite as bad on the midterm. I don't want to freak all of you out.
You don't look happy.
28:03If anyone has any questions you can send me a sign up link. If you have any questions later, you should have asked them now.
Ok? So it's very important when you test, don't always trust doing it in your head, make sure that you test it so that you get the signs correct. Yes?
You have to ask. That's up to them.
28:31That was a really irrelevant question, but it's a good question. It's ok, I mean yeah, they're supposed to help you, ok?
I think homework is a learning exercise, It's not about the grade, it's about learning from the homework.
Ok? So feel free to go to the learning center and have them help you. I wouldn't feel uptight about that at all. I don't have any issues with that.
29:05Other questions? No? You guys are all packing up. So you're assuming I'm done.
Ok, I can be done. So we're doing something new on Wednesday, so get this down. See you Wednesday.