Stony Brook MAT 122 Fall 2017
Lecture 35: Average Value
November 17, 2017

Start   So people had some questions on the homework? So why don't we go over them.
Well I can't do all of them, we have stuff to do. But we can do some of them.
So let's find the integral from 0-log(4) of (e^x+e^-x)/2 ok?
0:39This is your reward for coming to class, which Melissa doesn't deserve, but is going to get anyway.
Oh didn't see you there. Alright.
So first, ignore the limits and just do the integration.
So if this is e^x+e^-x/2, so this is really (1/2)*(e^x+e^-x)
1:02But one of the things you can do to make the integration easier, is pull any constant out of the integral.
So now the 1/2 is outside the integral. So it's easier to work with.
Ok? Because it tends to confuse people when you have a thing over 2. Or you could have made it (e^x/2)+(e^-x/2) There's 3 or 4 different ways you could write that.
I suspect everyone here will write it the same way now. Alright.
1:30So what is the anti-derivative of e^x? e^x.
And the anti-derivative of e^-x is e^-x/-1, because you divide by the derivative of -x.
So that comes out to -e^-x.
Again, remember, when you do the anti-derivative or integral of e to a function, Right, so if you're doing the integral of e to the something*x,
2:05it's e^kx/k, so here, you're dividing by -1, because of the negative right there.
Ok? And you're going from 0-ln(4), what is e^ln(4)?
Yup. So this becomes, (1/2)[(e^ln(4)-e^-ln(4))-(e^0-e^-0)
2:43Even if you don't know what e^0 is, it's 1, those are going to cancel so that whole right hand term is going to go away, and e^ln(4) is 4.
This is 1/2[4-(1/4)]
3:02Remember what a negative power means. You could stop there, or you could make that 15/8.
Ok? Questions? That's not so bad.
I mean on the final you should expect to have to do a couple integrals. I'd say that's sort of the upper limit of difficulty, but you know, something like that. You'll have practice final problems.
3:34Let's practice another one. Those we had, let me see, We're not going to use that eraser.
The integral from 1-4 of (x+ (1/(sqrt)x))^2 dx, I suspect more than one of you had trouble with this.
4:20So you want to, yes?
Oh yeah, well e^0 is 1, 1-1 is 0. So this right term, it goes away.
4:41So before you do the integration, you have to put the integral in a position that you can integrate it. So, (x+(1/(sqrt(x)))^2 is (1+(1/(sqrt)x))*(1+(x+(1/(sqrt)x)), which is x^2+ (2x/(sqrt)x))+(1/x)
5:29Ok. What is x/(sqrt)x? Well that's 1, that's 1/2, what do you do to the powers?
5:43Come on, what do you do to the powers when you're dividing? You have 2 choices, add or subtract.
Subtract, boy you guys were really reluctant to guess. It's ok to be wrong.
So you get x^2+2x^(1/2)+(1/x)
6:07Ok? Again, this is x^1, this is x^1/2, you subtract, you get 1/2.
Ok, so now we're integrating.
(^2+2x^(1/2)+1/x)dx
6:31Ok. The integral of x^2 is x^3/3 + 2(x^(3/2)/(3/2))+ln|x| from 1-4.
7:02And now you just have to plug in.
So we get, let's see, 64/3, what is 4^(3/2), well let's see, it's the square root of 4^3, so we get 32/3 + ln|4|, Minus, I don't know how I'll squeeze that in, 1/3+4/3+0
7:48So let's see you get, 91/3 + ln|4|
8:01How's that?
You like that one? So you see what I did again? So you just foil it out, you take the integrals of the pieces, this is slightly annoying, but not too bad. Remember dividing by 3/2 is like multiplying by 2/3.
So 2(x^(3/2))/(3/2) is 4/3(x^(3/2)), which is (sqrt)(x^3)
8:36Ok, there was another thing we had questions on.
We had, The growth model for an app is given by that. Find the total number of apps downloaded
9:04This is on the other homework, I guess this is homework 7.
So we give you that um, dy/dt = 1-e^-3t, and y(0) = 11.
So if you're given the derivative, you want to work backwards and find the total you're going to integrate.
9:32So you're going to integrate 1-e^-3t dt and then this information will help us find the constant.
Ok? Ok. So the integral of 1 is t, the integral of e^-3t is e^-3t/-3.
+ a constant, which becomes t+e^-3t/3+C.
10:07And remember what e^-3t means. 1/e^3t, so you could also make this t + 1/3e^3t+ C, you don't need this step, but it's useful.
10:32So we have the y(0)=11, why 11? I don't know. Why not.
So it tells us that when t= 0, y=11. So 11= 0-1/3e^3(0)+C, so C= 32/3.
11:02And therefore, our equation is y = t+1/3e^3t + 32/3.
I think the question is to find the total number, it should really say find the expression for the total number.
Oh and in 10 days, I'm sorry, now you just have to plug in 10.
11:3310+1/3e^3(10)+32/3, which is basically 0, so 32/3. Ok?
You plug in 10, and you plug it into the calculator.
Yeah. You plug in 10, this will give you 10, this will be 1/3e^30, which would basically be 0, +32/3.
So you'll get 122/3 and a smidge. So far so good?
12:07Good? This is helping, yes?
Is it possible I could do the other problem? I mean I don't need to do all the homework for everybody but sure. The other word problem? Anybody have it right here in the front row?
I'm not going to do the entire homework but, ok. Last one.
12:46You all saw there's another my math lab right? Ok, glad you're paying attention.
The marginal cost of producing a widget is C'(x) = -.04x^3+34x^2+6x-5000, ok?
13:18Where x is the number of widgets and c is the cost, find the total cost of producing 10,000, if c(0)=1,000.
So again, if we ask for total when we've given you derivative, you're going to do the integral.
13:33So you get the cost is the integral of (-.04x^3+24x^2+6x-5000)dx We know c(0)=1000 And is x in thousands?
14:02Yeah, x is the number of widgets in thousands.
So x is the number of widgets in thousands means it means at the end to find 10,000, you're going to plug in x=10, not x=10,000.
Ok? So for those of you who plugged in 10,000 and got this ginormous number, do some business thinking. If you had to make 10^20 widgets, if you make them at the rate of 1 a second, It'll take a very very very long time.
14:33That'll put you at thousands of years. Which is a long time. Right? There won't be a solar system at that point, there may not be a galaxy at that point, so that's not going to happen.
And you say, well we'll have to make them faster. Yes, you'll have to make them a lot faster.
Alright, so um, let's integrate that it's -.04x^4/4+24x^3/3+6x^2/2-5000x + C.
15:15So that's -.01x^4+8x^3+3x^2-5000x + C
15:30We know that when x=0, C = 1000.
So 1000=-.01(0)^4+8(0)^3+3(0)^2-5000(0)+C. So C = 1000.
16:07-.01, still comes out to 0. But thank you.
So the cost of producing x widgets is -.01x^4+8x^3+3x^2-5000x+1000.
And now find C(10).
16:32So you plug in 10 and you get -.01(10)^4+8(10)^3+3(10)^2-5000(10)+1000 Well, it's going to be pretty cheap to make 10,000 of them because of that 5000x there.
But that's ok, that's what happens when you cope from the book because you don't want to get it wrong. So let's see.
17:13-$490,600 I think that's right, it doesn't really matter you have a calculator, so you can figure that last piece out.
So it's a negative cost, is that realistic? Of course not.
17:30Ok? So I probably should have written + 5000x, but that's the way it goes. The point is, it's math, it doesn't have to be real world.
How do we feel about these integrals? Eh? It's not that exciting right?
You say 'when am I going to use these?' Jared, ask me "when am I going to use these?" Never.
Ok. It's not really true, you'll use them maybe once and a while.
As I keep saying, you don't know what type of business you're going to go into.
18:04You know, I was at the bank this morning, all those people went to college. Some of them were business majors.
You know whenever I go into businesses, and there's people there, they have business degrees, not everybody is going to be trading bonds and the Jake Morgan bond debt.
Which is a guy who traded in the bankers trust bond that can contest that it's overrated. (?) You do get rewarded, but it's overrated. Ok?
So, some of you will definitely find yourselves in the number intensive parts of your jobs.
And when that comes, you'll be good.
18:32It'll take you a little time, but you'll relearn how to do these things. The key is to understand the numbers and know when you're getting nonsense.
That's probably the most important thing that you're doing and what your boss will reward you for the most.
Is if you look at it you can say something doesn't make sense, assuming you're right.
Ok? So if you can't catch something, don't be on the look out for it, but if you're looking at something and you say 'This doesn't make sense, we're doing something wrong here' and you're correct, You will be heavily rewarded. I know, I was in that lucky position when I was about 25.
19:04Just sheer luck. I mean, so, I wasn't very well rewarded, but I got more than a turkey for thanksgiving.
So there you go, alright, so let's do a little but more stuff today, because I know how excited you are to learn more, eager young minds waiting to be filled with knowledge.
19:33I'm just going to do one sort of topic.
Ok, so, business statistics, you're going to see average.
So when we compute averages in general, we will be computing by adding up and bunch of things and dividing by a number.
But you can also find average for things that are continuous, in other words, have a smooth continuum of values.
20:00Not merely individual numbers and, when you want to average things you would say, 'Well how do I average them up?' Let's take a small digression, I don't know if you guys are following the debate on the tax bill that's going through congress right now, but when they want to be deceptive, they throw numbers around like average.
20:34Average doesn't always tell you a lot, because after all, if you take the average income between me, J-easy and bill gates, ok? You get a very large number and you say, 'Look how much money we're making on average!' Yeah, right.
Or Lebron and I average 50 points the other day at the basketball game. he contributed 49.9999 of them, and you contributed the rest right?
21:03So average is deceptive, but average is important, it shows up in lots of business contexts obviously, average profit, average loss, average this, average that.
So how do we find the average? Well suppose you had some curve, And you know, you want to do the average thing. You could say well, I need to find the area under the curve, and I know that if that's a and b, remember I said before, I know the area is less than that rectangle, I mean bigger than that rectangle.
21:36Because I'm leaving out the part above the rectangle. And I know it's less than this rectangle.
And the are of a rectangle the base, b-a, times the height. So somewhere in the middle here there's gotta be some point where I can get exactly the area under the curve.
Ok? Somewhere between the area below, and the area above.
22:02And that number, we called C* for some reason, that is called the average value.
Ok, so, Let's make sure I'm describing this exactly correctly, so if you want to find the average value, That C* is what we call the average value.
That's the number where if we took C and we multiplied it by b-a, we'd get the area. b-a is this.
22:33C is that, that will be the area of some rectangle, and that will be exactly the same as the area under the curve. So what we call the average value, is then going to be (1/b-a) and the area from a-b because then that's going to be c*.
23:01Why is that true? Hang on let's put that over there for a second.
Ok? I'll move it back in a second. So this height, Times this, will give me the area under the curve. So if I divide by b-a, I get the average value.
Ok? So if I do (1/b-a)*(integral from a-b) of f(x)dx, That will equal the average value of f(x) on a-b.
23:40For example,
24:14So suppose I want to find the average value of y=x^2 from x=1 to x=3.
All you have to do is 1/(3-1)* the integral of 1-3 of x^2dx
24:32So what is that? Oh we can integrate that. This is 1/2 * x^3/3 from 1-3 That is (1/2)[27/3-1/3] = 26/3*1/2 = 13/3
25:00I expect you to be able to handle that level of arithmetic.
Not harder than that but that level. You should. It's part of what's necessary.
So let's do an example, here we'll do the book's example.
So we have some business, and the marginal revenue per day, that's the amount you make on the nth day, or nteenth day, the marginal revenue is 100e^t. Where,
25:48starting revenue is 0, and the cost per day which fortunately is linear, this is not realistic by the way, because at some point, it's a very big marginal.
26:06Ok? Find the total profit for the first 10 days, Well, sure.
26:55Ok, so I give you some company, and I tell you their revenue and I tell you the cost.
27:09But I didn't ask for revenue, I didn't ask for cost, I asked for profit.
How are you supposed to find profit? [?] How would you find the profit?
There you go, revenue minus cost.
Obviously, revenue is what you're bringing in, cost is what you spend.
27:30The profit will be P=R-C.
So we're going to have to do the integral of 100e^tdt - 100-2tdt.
28:14That is point 2 I believe.
Yes. 0.2.
Ok, integral of 100e^t is 100e^t+C.
28:36And 100-2t is 100t-t^2+C1.
point, you're right, sorry.
That would be .1t^2.
29:03Ok, so, when R(0) = 0, so we could say 0=100e^0+C, e^0 is 1, so C=-100 So our revenue equation is 100e^t-100
29:30Our cost equation is also C(0)=0, so 100(0)-.1(0)^2+c1, So C1 is 0.
So our cost equation is 100t-.1t^2
30:03Ok, now we have our profit equation.
Ok, so profit is revenue-cost, so you plug in 10 here and you plug in 10 here and you subtract.
Ok? And when you plug in 10, you get some crazy number, you get P(10)= R(10)-C(10),
30:38Um which is, $2,201,556.58 And now if we wanted the average, remember the only difference between the total and the average, so the average would be (1/10-0) * integral from 0-10 of the profit.
31:13In other words, you take this number and divide it by 10. Which makes sense right? Because remember what average is.
The average is the total divided by number of things.
So it will be the total divided by 10 days, which will be $220155.66 rounding to the nearest penny.
31:40We all understand that? Or course it can make easy average problems, We launched some music site.
32:09and we find that our revenue per month where x is number of months is find the average revenue for first 4 months. I'm going to change that, to a 3.
32:45Ok? Find the average revenue for the first 4 months.
So in theory what you're going to learn in operations is where that equation comes from.
ok? Because we just give you the equations. It's magic, heres the equation.
Right, but what you really should be asking is where does that equation come from? It doesn't make any sense.
33:07Most of the time in business it's not real, you don't really come up with equations and stuff, as I said you can just track it.
But, you can graph and look at it's behavior. And then there's programs that will fit a graph for you, rather accurate.
So if you watch that your profit is doing that, you can say hey it kind of looks cubic, do some magic and make a cubic equation appear and then you can make some predictions about the future.
33:34When you do, as I said, operations research, one of the things you'll do is timed series analysis.
Which is a very fancy sounding name for, imagine you're a sales business and you're selling appliances.
And you look at how much you sell in January and what you sell in February and what you sell in March, Now you can make a guess as to what you're going to sell in April. It could be the average of the previous 3 months, That's called a moving average, and if every month you use the previous 3 months, so if in April you use January, February, March,
34:05and in May you use February, March, April, in June you use March, April, May, that's called a moving average.
You could just keep adding to the average, you could say this April should look like last April, You could do a bunch of different things, so that's the kind of stuff you typically will do in the business world when you're projecting. You'll do that in finance, you'll say how much is the business going to make because you want to know how much you should pay to buy the business.
34:32You could look at what they made the last time, and then that's a good guess for the next time.
You know, the past is an excellent predictor of the future. Sort of.
Not really, sort of. It's like the best guess for the weather on any day is that it will be just like the previous day.
And you'll be right about 2/3 of the time.
Which is not bad. Better than they are on TV.
Ok? And then you'll be wrong when the weather changes but then you'll be right for a couple of days, and then you'll be wrong when the weather changes.
So that's true with business.
35:02The business climate, the best guess for how many TVs will sell in June, is you look at how many TVs you sold in May, You can look at how many you sold the previous June, but things change a lot in a year.
So anyway, average revenue, all this is is gonna be (1/4-0)* the integral of (x^3-3x^2+100)dx from 0-4
35:41Ok, that's (1/4)[x^4/4-x^3+100x] from 0-4
36:01That is 1/4 of, you plug in 4, and you get 64-64+400 - (0-0+0), so you get $100.
Or $100,000 or $100,000,000 I don't know what the units are. It's 100, how'd we do on that one? Were we able to get 100? That makes me very happy.
Alright, I'm looking forward to seeing some of you on Monday, have a nice weekend. And to those of you I don't see, have a Happy Thanksgiving.