From Hollywood, it's time now for Johnny dollar Oh What's the matter kid? I don't know. It's a feeling I get every time I hear your voice on the phone, Sam Now what does that mean? Well the last time you called I took a job and had to hawk my watch for cable fare in Hong Kong That's what it means. So I bought your new watch, didn't I? What's in your mind? Ed Julian so long saying This is important I need help if you're fooling around with somebody like Ed Julian you sure do need help go call a cop I'll see you after breakfast Sam tonight and every week day night Bob Bailey in the transcribed adventures of the man with the action-packed Expense account America's fabulous freelance insurance investigator yours truly Johnny dollar Expense account submitted by special investigator Johnny dollar to Samuel Rubin and associates insurance brokers majestic building Hartford, Connecticut The following is an accounting of expenditures during my investigation of the salt city matter I didn't know it was going to be that salt city. I mean, but I didn't know the name Ed Julian Every policeman in the country knew that name My first impulse was to hang up the phone on Sam, but I didn't Instead I spent 85 cents. That's my first item on cab fare to get me to Sam's office Welcome Johnny long time no see come on in sit down have a smoke Sam Rubin looked about the same as I remembered him He acted about the same.  Oh Johnny Johnny, I'd like to have you on my permanent payroll now. That'd be something are you making me an offer or just talking No, I suppose I'm just talking but you're good to look at you know, it gives me confidence No, a little outfit like I got here.  You'll pardon me Sam, but I don't feel sorry for you You're right about every kind of insurance has ever been issued. Oh well, yeah Sure, but nothing like those big operations that you're used to this is all little bitty companies Yeah, so I make a living the man having his own company running it by himself and of his own companies So it's ten times as much trouble though Listen, what do you know about Ed Julian Johnny? He had quite a name in Chicago and Los Angeles Hoboken I thought he was in jail these days who had no got himself out of jail must have been three four years ago Sure went into enterprises in Florida, California Very legitimate fellow. Oh sure he is. Let's get to the point Sam, but you're working for me, aren't you? I don't know whether I am or not. I haven't heard what it's all about about it's about Ed Julian That's what it's about. All right. I'll lay it right out for you here look at this $50,000 I gotta pay his widow if something happens to him you'll pardon me again Sam But when you collected that first premium on him and I take it you sold him $50,000 worth of life insurance You should have thought of this part of it. What does something happen to him? No, nothing's happened to him I'm afraid something's gonna happen to him. I'd have to get this money up I'm just gonna listen to you talk because it doesn't seem to do much good asking you questions So go ahead Sam talk talk. Maybe something will come all right, but Johnny don't be shrewd with me Huh? Now the policy was issued maybe a month ago. I personally I Personally I wouldn't sell a man like Ed Julian life insurance any kind of insurance He's not a calculated risk. He's a lousy long-sighted bet Man like that the enemies he makes He's a bad fellow all the way around, but here it is. It's on paper. I'm stuck if anything happens to him Now Johnny the man's living in San Francisco now and all I want is you go to him and ask him to cancel a policy, okay? Sam, how did you ever get the insurance? No, no Johnny, please. Why don't you go to San Francisco? Handle it yourself. Johnny I'll tell you why Because you know and I know there's no way for me or you or anybody else to approach Ed Julian and ask him to cancel out this policy What it amounts to is that you want me to go there and keep an eye on them until you can break the policy, isn't that it? Not necessarily Johnny. What do you mean not necessarily? All right. All right. So you're right listen I heard through the grapevine as a large collection of Ed's old friends visiting in and around San Francisco just a few days ago It makes me very nervous. I have already a blood pressure friends who might want to shoot him down. Yeah, that's the kind of people yes $50,000 payoff would hit me very hard this week. All right next week. Maybe not so hot But this week. Oh boy the market are you playing with company funds? No, no, it's a calculated risk I'm entitled to take with company funds. They entrust all right. All right Now will you please sit down and study this thing out with me? What's I'm always asking you to sit down You never do I also never study anything with you Sam How much? Well expenses $500 bonus. Bye Sam. No, no wait, wait, wait Johnny you're so impatient I'll make it a thousand thousand dollars bonus. Take care of yourself. Listen Johnny look look Johnny All you have to do is keep them alive till I break the policy responsibility. My lawyers can do that They told me it'll take a couple of days. I don't have to do anything Sam How'd you get that policy? It was in a bundle of stuff came in from the coast Ed Julian took this out under his real name at water soccer Betty No, who knows it's Ed Julian skip the justice and tell me how you do now Well my broker out in San Francisco. Her name is I don't know Straub at Street or something like that She sold it to him later on. She found out who he really was. She sent me a wire So a thousand's okay, huh? No So how much 2,500 you're crucifying that watch you gave me never kept all right. All right. All right 25 25 Expense account item to $168 and 73 cents airfare and incidentals Hartford to San Francisco. I arrived at 8 in the morning On the way in from the airport the fog began to roll in from the bay From my hotel room at the Fairmont I looked out in time to see the provision barge moving out toward Alcatraz before the fog closed in completely Somebody said the storm warnings were up all along the coast and somebody was right By 11 o'clock a light rain had begun to patter over the foreground Bay City Item 3 23 bucks one trench coat I was wearing it when I spent another buck item for kevver This time to get me from San Francisco's Fairmont hotel to Ed Julian's address on another part of San Francisco's knob hill There in the drizzling rain. I interviewed not Ed Julian But one of san francisco's older but more stable residents the uniform said he was a member of the property police Hey, hey you I just know that nobody lives there And I hope you're safe boy You ain't no jimmy artist because I got me a gun under this ring coat. I'm no jimmy artist I'm just trying to locate a man named Julian Julian. That's right Mr. Sarkavetti lived here. Well, according to my records, mr. Sarkavetti and mr. Julian are the same man Well, he ain't here now moved out back and back as a week 10 days ago. Whatever name you use Don't suppose you have any idea where he went to you. Nope. You having to see him move Yep, and his wife and their clothes left all their furniture, huh? Didn't have any to leave this place was furnished for him They're the kind of people who never own more than they could carry That's the way I figured them fast traveling and short acquaintances Now I once knew a fella up in king city. You see king city is about 45 miles north here That's how the adjunion matter stood on a rainy morning in san francisco Nothing out of the ordinary for adjunion Yet all around me. There seemed to be some sort of a dark threatening undertone that I couldn't quite put my finger on Whatever it was it troubled me standing on the rain talking to that old man It still troubled me when I made my way back down the hill and found to my surprise that the san francisco classified Telephone directory listed edward jr. Enterprises Expense account item 5 10 cents one phone call Hello, I'd like to talk to mr. Julian, please Secretary's out. Would you like to leave a message? Well, this is johnny dollar calling. He doesn't know me I'll leave the message for him. When do you expect him back? The rain was just starting up again as I stood in front of the floor level office at paul and hooker On the door it said edward jr. Enterprises incorporated and below it Said walk in I did Ed jr. He isn't around now. Maybe I can help you. Well, maybe you can I'd like to know something about his enterprises. Why? Why might want to invest some money Oh, what's funny about that you the guy that called me a little while ago. Yeah, I called I suppose you're the one I talked to what's your angle? I want to find jr. So do I so do a lot of people What's that name? Johnny dollar. I'm ray gumby. It's attorney. Come on in here. It's warmer I followed ray gumby to the back office of the two office suite Watched him as he stood in front of the gas heater medium-sized man 50 a soul wearing a tan sport coat a wool scarf eternal neck sweater Not exactly the conservative attire. I usually expected of members of the bar But then he looked happy about it Now sit down dollar have a drink. Thanks, mr. Gumby Cheers You ask about ed's enterprises Well, I'll tell you right now. They aren't much He has an oil field a piece of a gambling casino a piece of a racetrack and a part of a ship and part of a smelter works What does he do a couple of weeks ago? Yep, and unloads it all All right Had a little cold with all this weather we've been having Why do you want to find him to protect him that's cute Personally, I wish the bum would get pneumonia. He left me holding the sack here. How's that? And I formed these corporations for him and acted as chairman on all the boards Then he sold out from under me didn't even bother to say goodbye or pay me off You want to find him too then? You bet you I'm suing for proper fees think it'll do any good mr. Gumby No, I don't think so. I mean as far as me getting my money goes But if I can get him subpoenaed and he ignores the subpoenae the court will issue a warrant on contempt charges And throw his carcass in jail for a while If he was behind the bars and I went to visit him, maybe I could handle him The bars between us, of course, of course You want another knock? No, thanks. You go ahead That sounds pretty good. It is getting him in jail. Yeah, if I can get him served It's not gonna be an easy job getting those papers into his hands. Two of my regular boys have already tried and failed I'm a fool ever to accept such a man as a client never do such a thing again Well, if it makes you feel any better, mr. Grumpy the man I'm working for said practically those same words to me in Hartford yesterday. It doesn't make me feel any better. I wish it did and I wish you luck protecting him Hey, mr. Gumby Something just occurred to me. No, what's that? Well, no, maybe we could work this out together. Ah You want Julian to be served with a subpoenae so you can have the police pick him up I wanted to be safe and there's no safer spot than the city jail. Hey Where's that subpoena right here? And there's a fee in it if you can get it in his hands 200 maybe all right You say two of your men have already tried and failed to get to him. What happened to them? Been to his place on knob hill. How was there earlier today? He moved out I know But my men went up there to serve him both of them fell down two flights of stairs Seems like a myth Maybe it isn't living in such high places these days. I hope not for Your sake dollar Now here's our star to tell you about tomorrow's intriguing episode of this week's story tomorrow That's when I begin to find a myth can be stranger than fiction Join us, won't you? Yours truly johnny dollar Yours truly johnny dollar starring bob bailey is transcribed in hollywood written by john dawson It is produced and directed by jack john stone Be sure to join us tomorrow night same time and station for the next exciting episode of yours truly johnny dollar Roy roan speaking


Welcome to the session. In this session we shall first discuss about a random variable. A random variable is a real valued function whose domain is the sample space of a random experiment. Random variable is usually denoted by let's consider an experiment of tossing a coin two times in succession. In this case the sample space s would be equal to h h h t th t t. Let x be the number of heads obtained. So this x is the random variable. Now we shall find the value of this random variable x for each outcome. Value of x for the outcome h h would be equal to 2 since we have two heads in this case and x is the number of heads obtained. Then x for the outcome h t is equal to 1 since we have one head in this case. x for the outcome th is also 1 since there is one head in this case. Then x for the outcome t t is 0 since there is no head in this case. More than one random variable can be defined on the same sample space. Next we shall discuss probability distribution of a random variable. A description giving the values of the random variable along with the corresponding properties is called the probability distribution of the random variable x. So we say the probability distribution of a random variable x is the system of numbers random variable x with the values x1, x2 and so on up to xn with probabilities given by px as p1, p2 and so on up to pn. Where we have pi is greater than 0 and sigma pi i goes from 1 to n is equal to 1. The real numbers x1, x2 and so on up to xn are the possible values of the random variable x and pi is the probability of the random variable x taking the value xi. That is we have probability of x equal to xi is equal to pi. Let's consider the same example as discussed above in which we had the sample space s equal to hh, ht, th, tt and x is the number of heads obtained. This is the experiment when we tossed a coin two times in succession. Since x is the number of heads so x would get the values 0, 1, 2. As you can see in the sample space either we have no heads or we have one head or we have two heads. So x would take the value 0, 1, 2. Now probability when number of heads is 0 that is x is equal to 0 that is probability of the outcome tt would be equal to 1 upon 4. Then probability x equal to 1 is equal to probability of the outcome ht or th. In this case the probability would be equal to 2 upon 4 that is 1 upon 2. Then next we have probability when x equal to 2 that is probability of the outcome hh. In this case the probability would be 1 upon 4. So the probability distribution of x is given by x equal to xi with values 0, 1, 2. Then pi that is probability for each xi would be 1 upon 4, 1 upon 2 and 1 upon 4. That is when we have xi equal to 0 its corresponding probability is 1 upon 4, xi equal to 1 corresponding probability is 1 upon 2, xi equal to 2 corresponding probability is 1 upon 4. As you can see each pi is greater than 0 and sigma pi equal to 1 upon 4 plus 1 upon 2 plus 1 upon 4 is equal to 1. Next we have mean of a random variable. Basically mean is a measure of location or central tendency in the sense that it roughly locates a middle or average value of the variable. Now let's define the mean of a random variable. Let x be a random variable whose possible values x1, x2 and so on up to xn occur with probabilities p2 and so on up to pn respectively. The mean of x that is mean of the random variable x is denoted by mu which is equal to summation xi pi i goes from 1 to n. Mean of a random variable x is also called the expectation of x which is denoted by ex this is equal to mu equal to summation xi pi i goes from 1 to n which can also be written as x1p1 plus x2p2 plus and so on up to xnpn. Let's consider the same example that we had considered above in which we tossed a coin two times in succession. In that case the possible values of x that we got were x1 equal to 0, x2 equal to 1, x3 equal to 2. Now the corresponding probabilities that is probability when x1 equal to 0 is given by p1 equal to 1 upon 4. When x2 equal to 1 its probability p2 is given by 1 upon 2. When x3 equal to 2 its probability is given by p3 equal to 1 upon 4. Now the mean of the random variable x is given by mu equal to summation xi pi i goes from 1 to 3 in this case that is equal to x1 that is 0 multiplied by p1 1 upon 4 plus x2 1 multiplied by p2 that is 1 upon 2 plus x3 that is 2 multiplied by p3 that is 1 upon 4. This comes out to be equal to 1 that is mean of the random variable x given by mu is equal to 1. Next we discuss variance of a random variable. Now the mean of a random variable does not give us information about the variability in the values of a random variable. So the variability or the spread in the values of a random variable may be measured by variance. Now let's define the variance of a random variable. Let x be a random variable whose possible values x1, x2 and so on up to xn occur with probabilities px1, px2 and so on up to pxn respectively. Then variance of x denoted by variance x or sigma x2 is given by summation xi minus mu the whole square multiplied by p of xi where i goes from 1 to n. Or equivalently this could be written as sigma x2 is equal to expectation of x minus mu the whole square. Again we shall consider the same example where we had x1 equal to 0, x2 equal to 1, x3 equal to 2 and the corresponding probability is given by px1 equal to 1 upon 4, px2 equal to 1 upon 2 and px3 equal to 1 upon 4. Now the variance of x that is sigma x2 is equal to summation xi minus mu the whole square into pxi i goes from 1 to 3 in this case. Here mu that is mean of the random variable x is 1 that we have already found out in the above example. So now sigma x2 that is variance of x is equal to x1 that is 0 minus mu that is 1 the whole square into px1 that is 1 upon 4 plus x2 that is 1 minus mu that is 1 the whole square into px2 that is 1 upon 2 plus x3 that is 2 minus mu that is 1 the whole square into px3 that is 1 upon 4. This comes out to be equal to 1 upon 2 that is variance of the random variable x that is sigma x2 is 1 upon 2. Now the non-negative number that is sigma x is equal to square root of variance of x that is square root of summation xi minus mu the whole square into pxi i goes from 1 to n. This is called the standard deviation of the random variable x that is the sigma x is the standard deviation. We have one more formula for the variance of x given by expectation of x square that is ex square minus expectation of x the whole square. From the above example we have variance of x that is sigma x square is 1 upon 2. So the standard deviation given by sigma x is equal to square root of 1 upon 2 that is equal to 1 upon square root 2 which is equal to 0.707 that is the standard deviation is given by 0.707. This completes the session hope you have understood what is a random variable probability distribution of a random variable and how we find mean variance and standard deviation of a random variable.


Good to see you guys. Gentlemen, it's all gentlemen today. So, what did you guys think about the Bellman equation on Monday? Change of life? Why not? It's an amazing thing. Let me ask if you have any questions about it. So, I have a question. What's this value function thing that we've been talking about? What does it actually mean? Can I give you an intuition about what it is? And I think that I can. I'll do that today. The idea behind the value function is that it represents the costs under the optimal setting in which you're going to find yourself at some state. What is the best way that you can perform something given that you find yourself at this particular state? The best way would mean the value of that state. So, the value of a position on a chess board. You can think about it that way. So, you have the state on the chess board. How do you define a value associated with it? Well, on our game that we did on Monday, the value associated with any of those points was the minimum cost that you could incur from that point if you were to perform the best actions possible. So, the value function associated with the state represents the accumulation of the costs that you will incur under some optimum setting. It's as good as you could do if you find yourself at that state. That's what the value function is. And what we're going to be using that value function for in the context of control today is using the Bellman equation. So, the Bellman equation allows us to solve all kinds of problems in which there is something called a cost per step. It's called an alpha. And for today, we're going to imagine this cost per step to be an algebraic function, a quadratic function in nature. So, suppose that we have it like this. Now, I did not include cost of time in that step but you could just as well put a cost of time and the reason why I didn't include it in there is often that cost doesn't depend on you. Neither does it depend on X. So, because we're going to be finding derivatives of these things with respect to you and X, it doesn't really matter what the cost of time is. What it matters is comparing policies after we come up with some optimum policies. So, when we have this policy, we want to know, all right, this is the best policy for this particular duration P. The cost of time plays a role when we compare different durations because it asks us, okay, what's the best movement that I could do across all possible durations. But for now, let's put that aside. Let's put aside the cost of time and let's just concentrate on the basic notions of cost per step, which would have a cost of state and a cost of action. Now, what happens is that we imagine that we are at the final time point P and we say, okay, what's the optimum policy at X of P and that's the policy that minimizes this cost, alpha of P at X of P. I guess I should. Yeah, close my parenthesis here. Okay, so we evaluate our cost at the last time point for some X of P and we say, okay, what's the minimum that we could do and as we can see in this scenario, this is equal to zero.  So, what's the value associated with that policy? That's just equal to alpha of P at X of P and the optimum policy executed at that location. So, tell me what my cost is going to be from X of P, assuming that I did the optimum policy. That's going to be my value, right? Yeah, yep, X and U. U is unknown. Right? Does that make sense? I'm sorry, the nomenclature is probably not the best. I hope you get the intuition of what I'm speaking of, although mathematically I may not be writing it as elegantly as I could. So, what's the policy that I need to do at X of P minus one? That's the one that minimizes the cost per step at time point P minus one plus the value associated with the optimum policy, which means that if I were to execute my optimum policy, I would be generating from X of P minus one some command U, let's call it pi of X of P minus one. That would be the motor command that I generate. That's going to take me to some location X of P. And, of course, this is this, right? That's the value of where I end up. And so, what we do is that we start at the end. We assign a cost per step. We find the optimum policy. We then get a value. That value is critical for the next step because it allows us to ask, okay, what's the best thing that I could do so that I minimize the cost per step plus the cost associated where this step is going to take me to? So, what is this value function? This value function ends up accumulating all of the costs that you're going to incur from a given state, assuming that you perform the best actions possible. It's the value of that state under the best scenario. That's where the value function ends up being. Another way to think about it is the minimum cost to go. If you're at some state, the costs that are going to accumulate in the future depend on where you're starting at and the actions that you're going to perform. The minimum of that, the minimum cost to go is the value function. That's the value of that state. All right. So, let's do some examples. Any questions before I start? Yeah. So, you keep doing this until you get to x of 1. Mm-hmm. That's something you can write, or is the pi star of x1 something that you can write? Algebraically. Algebraically. We'll write it. You'll see. We'll get a recipe. We'll get a recipe. Now, we'll be able to get a recipe in scenarios where we can write these as functions. So, as you will see, in the case where our cost per step is quadratic, we will find that this value function is also going to be quadratic. And in that case, we can find derivatives and we can write the relationship between pi, which is the action that you want to perform, and the state. So, we're going to end up with scenarios where the optimum policy is going to be something that looks like this. Some matrix, which I'm going to show you what it is, that's going to multiply your state and that's going to give you the best action you can. Yeah. So, is this kind of like a discretized or the Lagrange equation, kind of?  The value function is a scalar function that's associated with the state. So, in that sense, it's a functional. It's a special function, though, because it is associated with... with not... it's not a function that says how good this state is. It's a function of saying how good this state is given that you can perform the absolute optimum things from here on. Not just at this state, at every state that it's going to take you to. Right? And so, I hope you begin to see that this is how machines learn to produce value associated with states so they can play games, just like our game on Monday. So, that was what we were doing was called dynamic programming. That's what we just did. We began at the end and we assigned the value to each state and we found the best action for that state. So, what we're going to do in optimal control is a special form of this where the costs are quadratic. The value functions, as I will show you, will end up being quadratic and then the policy will become a linear function of the state. It becomes a feedback controller. U is going to depend on some matrix G that depends on the state. So, what today we're going to do is we're going to find out how to represent the value function as a closed form equation that is a quadratic function of X. How to find the derivative of this sum with respect to U, therefore, get what's called G. So, the two things we're going to find is what's the value at any given time. What's the quadratic function of X? What's the gain associated with my feedback controller which is going to tell me how to produce actions given a particular state? How is this related to all the stuff that we learned before? Well, X here is state, right? So, you have to tell me where you are in order for me to produce the best actions. This is going to come from the Coleman filter. Your prior belief about how your previous actions have changed your state. So, this is going to be replaced by an X hat that tells you where you think you are. This is going to tell you what's the best action to produce at that state. In order to minimize some overall cost that's going to accumulate from beginning to the end. And the way we're going to work it is that we're going to begin at the end. We're going to find the best action. We're going to find the value function associated with that best action and that state. Then we're going to do it again and do it again. And what we'll see is that this is going to form a recipe and that recipe is going to be a bunch of matrix equations associated with finding V and G. So, we're going back in time to the early 60s now to thinking about how this is done. And the course that we're on is going to go from having no noise in our states to having Gaussian non-signal dependent noise in our states. We'll do that today. Then on Monday I'll show you the advances that were made in the last decade where signal dependent noise were introduced in the state and we'll see how that changes the policies and the feedback gains. But today we're going to do first no noise in the state update equation. So we're going to have this. This kind of functions. So, our simple state equation without noise. So let's do the Bellman equation for this problem, assuming that we have this cost per step. So, let's begin at time point P.  Not going to do anything. That's the minimum of this function. The U that minimizes this function. And so the value associated with this at X of P is going to be equal to X of P transpose TP X of P. So now let's move to step P minus one. We incurred two kinds of costs. We're going to incur a cost associated with our step. And we're going to incur a cost associated with the value function at that step. So, I need to find I need to find the minimum of the sum of these two with respect to U. And this U at time point P minus one. Right, because I'm at time point P minus one now. I want to find the derivative with respect to U P minus one. So, my cost is going to look like this. It's going to have alpha at time point P minus one plus value of the optimum policy at time point P given that I was at P minus one and I produced the motor command U P minus one. Well, let me just write it out. So this term is going to be this function is going to be A what's X of P?   Alright, I'm going to so this is alpha here at P minus one. This is the value function associated with the optimum policy at X X of P. Right, is that clear? I want to find the derivative with that function with respect to U of P minus one set of equal to zero, that would be my optimum policy. Let's do it. So, I will get that's the quadratic term here plus okay I'm going to introduce a matrix here that's going to be useful for us to continue. I'm going to represent the value function at time point P as not this T of P but I'm going to represent it as X of P transpose W of P X of P and obviously in this case W P is equal to T of P. The reason why I'm going to do that is because I'm going to show you that when I minimize this function with respect to U I get my optimum action U star and then when I compute the value of this state at this time point I'm going to get a quadratic function in terms of X. So I'm going to get another W but now that W is going to be at time point P minus one. That's where we're going. Alright, so let me so this is equal to this so far. Alright, so I'm going to find let me find the derivative of this function with respect to so I'm going to minimize this function with respect to U of P minus one. I get the following these are all scalar quantities so I get two times this transpose B plus this is going to be two times B transpose T of P U of P minus one and this is going to be two times L U of P minus one. That's the derivative of this function with respect to U of P minus one. Thank you. So set that equal to zero and I get L plus B transpose T of P times B P minus one is equal to minus this is wrong. Why is it wrong? Because it has to be a vector. It has to be a column vector. So that was the that was the derivative of this that I was trying to find. So this is going to be two D transpose T of P A X of P minus one. That's the derivative of this with respect to U. It has to be a column. Because it's a scalar quantity. When I find this derivative with respect to U when I find the derivative of a number with respect to U what I'm doing is find the derivative of that with respect to U one, U two, U three, all those things. So it's going to be just a column. For that to be a column this has to look like this. X has to be on the right. So this is equal to minus D transpose T of P A X of P minus one. So what that means is that U star at P minus one is equal to minus L plus B transpose T of P B times B transpose T of P A X of P minus one. So I have the U star as a function of X. This is a matrix that we're going to call G at time point P minus one. Minus G P minus one X times P minus one. So that's the best action that I can produce. Go ahead. Is G of P zero? Yes, good. G of P is zero. W of P is T. G of P minus one is this matrix. What's W at P minus one? So what I need to now do is find the value function associated with pi star at X of P minus one. What is that? This was the policy that I just found, right? Of pi star at X of P minus one. What's going to be that? It's alpha at P minus one evaluated at X of P minus one and the optimum policy at X of P minus one plus the value under the optimum policy of X of P given that you went to that you started at P minus one and you gave the optimum policy at that state. We can write this as an expected value or just a in this case, since these are deterministic, we can just write it like that. Alright, so this is going to be this function that I just wrote at U replaced with this G of P minus one times X of P minus one. This is going to be equal to the following.  That's going to be X of P minus one transpose G of P minus one transpose. That's U of P minus one B transpose T of P A X of P minus one plus, we have a quadratic equation now so we're going to have a plus here this is going to be X of P minus one transpose G of P minus one that's U of P minus one transpose B transpose T of P B G of P minus one X of P minus one plus X of P minus one transpose T P minus one X of P minus one I can write, I guess I'm just writing at the end here plus X of P minus one transpose G of P minus one transpose L G of P minus one X of P minus one if you look at this equation now you see that this is equal to X of P minus one transpose times a new matrix W of P minus one times X of P minus one it's quadratic in X yeah? okay let's simplify it a little bit so we get a recipe for what WP minus one is what does it represent in terms of W of P well this is W of P is T of P's so I'm going to write W here okay so let's see what we can simplify the things that become simplified have to do with the fact that there is an L here and there is a there's a B transpose WP transpose that times B here so this plus this you notice is this right? so that's in G that has this component into it so I can probably simplify things and you can see that there is a G here as well things are going to get a little bit easier if we put these together so let's bring together this term and this term let's see what we get so I have X of P minus one transpose G of P minus one transpose times L plus I have this term here B transpose WP times B times G of P minus one X of P minus one this term here has this as an inverse in it so that's going to cancel so this is going to be equal to X of P minus one T G of P minus one P times B transpose T of P A times X of P minus one let's see if I got that right yeah good let's call this W okay so we can get rid of this term and this term alright let me show you that we can also get rid of this term and let's see let me write it out so I have this value function this term is a scalar so I can write it as follows this I can write it as A transpose WP transpose B G minus one this term there and when I do that I have ATW times did I miss the transpose here there must be WPA one of them must be a transpose I can write this as A transpose W of P A minus two times transpose times B times G of P minus one plus X of P minus one transpose G of P minus one transpose B transpose WPA X of P minus one I'm sorry this isn't here yeah go ahead yes now I think there's one more simplification but I but I don't know where it is anyway it doesn't really matter because you see that I've written this in terms of a new WP so here's so here's a new W and this is now WP minus one and it's written in terms of WP and everything else that I know so I think there's one more simplification that we can do but I don't know where my I probably have a typo here someplace that I don't see it so the point being that I have taken my cost function at the last time point what I did is that I wrote my optimum policy and I have G of zero which is G of P which is zero and a value function described for that policy which is in terms of X and WP then what I did was I found the optimum policy for time point P minus one which also has a G in it and this G is now written in terms of the value function in time in time P this is W that's W of P so I can write the optimum policy in terms of the W that's associated with my value function in time point P and write my value of the policy in terms of a new WP minus one that's in terms of everything that I know which is W of P and G so it just depends on G of P minus one so basically what I've done is that I have a recipe now I can just for every time point I can say for whatever time point K I want I need to know what the W is for time point K plus one and I can tell you what the G is going to be for that time point and if I know the G for that time point I can compute the value function for that time point for that state and that time point which is going to be just W of P minus one yeah what does it mean right let's see if I can give you an intuition so let's begin with L which is the cost of generating a command so you can see that as that cost goes up you're going to generate smaller commands so it's inversely proportional to L more than that I'm not sure I can tell you because what this is doing is of course generating commands in such a way that minimizes the sum of the cost of the command plus the value of the state that is going to take you to right so that's what U star is going to be and so it's balancing how good is I'm going to be able to take you to which is going to be X of P plus one this is going to take me to a good state that the best state is the one that has my gold sitting at the bottom of it of that state right so I want to get there but to get there I might have to generate a lot of commands I have to balance the desire to getting there versus how big of a command I need and so I don't I don't know if that makes sense oh because it just happens to be that there's a whole lot more positives here than there are negatives so might as well define G to be positive it's just it's arbitrary right so I could have had G be the large thing in which case then this would be a positive and everything else would be and everything everywhere else you see G well I mean no it would change the signs I think all it would change would be the sign here everything else would remain the same because these are all quadratic in G so it doesn't matter if G is positive or negative in feedback control in feedback control what's done this is a form of negative feedback I mean it's just it says you move you produce actions in this case it's arbitrary G is just I just have a negative and this is the matrix I want to call it G that's all I mean so you see where that came from right it came from here alright so we end up with a recipe is the point that I wanted to make here and the recipe the idea here that you begin with cost at the end you find the policy that minimizes that cost you assign a value function to that policy next you move to the step behind and you say alright what's the cost per step and where is it going to take me to the place that it takes me to has a value what I want to minimize is the sum of the cost per the current step and that it gives me the motor command that's best to produce at the current time point alright so the rest of it is manipulating that equation there and adding noise to it so let's do it for the simplest case when we have the following X of where this has variance Q and this has variance Y and I'm going to do it for you today suppose that our cost per step alpha K is defined in terms of X if that's my cost per step then how this is going to affect things is I'm going to show you the final thing I'm going to show you is that when my cost per step has a form that looks like this if it's in terms of Y so I'm going to compare these two conditions and what's going to happen is that the noises are going to influence this time point this cost per step in this condition because Y is going to be a random variable whereas up there that cost per step is going to be affecting the value function associated with it because the value function now is going to be probabilistic because the state that you're going to go to given that you're at this state and generate this motor command U if just one state is going to be a state with some uncertainty associated with it so then we have to talk about not just the value of it but the expected value of the value function so that's the change that's going to produce this value function here this function here this value function value under the optimum policy if I generate the optimum motor command I'm going to go to potentially many places not just one because that's defined in the state update equation it has variance cubed so then that's going to make it so that value function of the optimum policy is no longer going to be deterministic it's going to be a stochastic thing so what I need to do is minimize the expected value of this sum of this sum and so the expected value it's not going to be a problem for us that's the only difference that's going to happen so let's do it so again at time point p I minimize the cost per step and that gives me the policy of zero that's the thing that minimizes alpha of k and the next and the value so this is going to be g of p times x of p where g of p is zero okay so the value associated with that step value of is going to be x of p is going to be just x of p transpose t of p x of p the value of the policy at x of p given that I'm x of p minus one and have done some action u of p minus one why is it that I need to have this well because this is what I need there right via pi star I need to know what this is what's this value function this value function is a x of p minus one plus b u of p minus one plus epsilon x that's the state that I'm going to go to times t of p so what I want to minimize when I want to find arg min of u of alpha of p minus one plus v of pi star of x of p given that I'm at x of p minus one and I did the optimum thing pi star of x of p minus one then this is going to be the expected value of this function I'm going to minimize the expected value of this so what we have to do is multiply this out and so we're going to get everything that we had before except two new terms so v of of x of p given that I'm x of p minus one and did u of p minus one is is going to be equal to all those things that are on the left side plus I'm going to have two new terms here associated with epsilon or sorry three new terms there's going to be epsilon x transpose t of p times a x of p minus one plus x transpose p times b u of p minus one plus epsilon x transpose t of p epsilon x so the expected value of this is going to be zero zero but this is not going to have a zero expected value right so the expected value of this function is going to be everything that I had before on that side plus what's the expected value of this what is it? okay so let's suppose I have this what's the expected value of x transpose a x where x is a random variable that's equal to the expected value of x transpose a times the expected value of x plus the trace of a times the variance okay so if that's the case then this is going to be equal to the expected value of epsilon x is zero so that first term is going to be zero the second term is not going to be zero it's going to be the trace of the variance of this tp times q okay so the value function it's going to be a stochastic random variable it's expected value in the case that we're talking about is going to be different from before because it has the trace of the variance of the random variable in it alright so what this means is that when I find the derivative of the sum right alpha plus the value function then that derivative is going to have no different than before right because this has no derivative with respect to u you see that the trace of the t times q has no derivative with respect to u the noise is independent of u what we care about is the derivative of the sum of the time the cost per step plus the value function so the expected value of the value function has no added elements that have u in them it has added something to it it has this trace of q but it doesn't have u in that so when you've added noise to the state equation and the observation equation you have not changed because the derivative of that cost function with respect to u hasn't changed the expected value has other terms in it but those terms don't depend on u so the kinds of functions that we've been solving are called linear quadratic regulator LQR linear quadratic regulator LQR problems have the characteristic where noise that is the classic kind of noise where the variance is independent of the mean the kinds of noise that you typically see in these linear systems it doesn't change the feedback controller and the value function the scalar at the end of it but who cares that scalar doesn't change the commands that we're going to have to produce because this expected value doesn't have an additional term that depends on u let me do this term let me do this thing for you suppose the cost per step depends on y not x so what is y y is equal to t of k plus epsilon y transpose t of k which is equal to that's by cost per step it's a random variable right because it has epsilon in it so the expected value of this is going to be equal to plus this expected value is zero this one on the other hand is going to be the trace of tk times variance of epsilon which is r plus u of k transpose l u of k okay so this function is a little bit different than this right just x transpose here do you have x transpose c transpose right but that's fine it's not a big deal just have one more matrix there let's do the why don't we do the why don't we do this problem so time point p my optimal policy at state x of p is going to be equal to zero because u star at time point p is equal to g of p minus times x of p where g of p is equal to zero the value associated with this at x of p is going to be equal to um alpha k alpha at time point p which is this function it's going to be a random variable the expected value of v at x of p is going to be equal to um x of k transpose c transpose t of p c x of k which is equal to x of k transpose w at time point p times x of k where w at time point p is going to be equal to c transpose t of p c okay so now at time point p minus 1 you want to minimize the expected value of the cost at our current time step which is this so the expected value of alpha at time point p minus 1 plus the expected value of the value function under the optimum policy it's going to take me to some state x of p given that I'm state x p minus 1 and I generate some command p minus 1 so this is going to be equal to this function here is going to be x of k transpose c transpose well let me just I'll write it like this x of p it's going to be x of p minus 1 transpose c transpose t p of minus 1 c x of p minus 1 plus u of p minus 1 transpose l u of p minus 1 plus this this function which is this it's going to be A x of p minus 1 plus B u of p minus 1 time plus epsilon x transpose w of p times A p minus 1 plus B u of p minus 1 plus epsilon x that's the value function associated with the state that I'm going right this is the value of time point it's it's x transpose w times xk and here's x written in terms of x of p minus 1 and x again so what I need to do is find the expected value of this and then sum this up and find the derivative with respect to u and so you can see that this expected value is going to have nonzero terms in there associated with epsilon x transpose w p epsilon x everything else is going to be zero and that derivative is not going to have any influence on our g that we computed here it's going to be the same same g as before g of p minus 1 is going to end up looking like this exactly like that well not exactly like that because I have it I have now this c here as well let's why don't we do it so we can see what it looks like so what I need to do is the derivative of this function with respect to u of p minus 1 and the only thing that I have that I didn't have before is epsilon x transpose that's the only random variable and that function its expected value is not going to have any influence on my derivative with respect to u so I can just ignore that so I get derivative of this u of p minus 1 that's what I want to minimize that's going to be equal to 2 times l u of p minus 1 that's this term plus I'm going to have the derivative of which is going to be that derivative I'm going to have so I'm going to get 2 of these and then I'm going to have the derivative of this b u of p minus 1 2l u of p minus 1 plus this so I have okay so we find the linear function of x again I think that's identical to what we had before isn't it it's just t there is w u that's all so the c makes no difference for us just we absorb it into w and we get a function of in terms of x and w the optimum policy for that time point p minus 1 okay so now you put that in to the value function and that gives you the value associated with that state under the optimal policy okay so let me just summarize the way it works our objective was to find the best action that we can do so that at the end of all of our steps we minimize the sum of cost per step that cost per step is defined up there and the way we do it is that we begin at the end we find the best action that's our policy that action is defined for every state then if we do that action, that best action we assign a value to that state that value tells us how good that state is assuming that we can do the best thing possible at that state then we go step back and say what's the best policy for any state and the way we define it is by saying well we're going to incur a cost for that state that you're at to perform, plus the value of the state that that action takes you to and the best action is the one that minimizes the cost per step plus the value of the state that you go to and that value function what it means is that the value of a state is basically the cost that you will incur if you had the best policy possible for that state that's the Melbourne equation first finding the best path for a given number of time steps and then finding the best number of time steps is that usually an independent or two separate optimizations? yes, yes because the time component is something that typically doesn't depend on the command, the cost of time but if it did we would have to put it in here so our problem is we don't know the length of time that would be optimum in producing our cost so because to compute the cost we have to know the actions so we begin with the notion of let's assume that we have a certain amount of time for that amount of time find the best policy and if I do that then I end up with over the entire time is going to be some number that's going to be the optimum cost that I have it's going to have some minimum then what I can do is if I now change my time to be a little bit longer do I get better in terms of my total accumulated cost or do I get worse? so there's no there's no relationship between yeah, no I mean there's no depends on how time affects this accumulation of the cost and typically there's no I mean I don't know how TK changes yeah depends on how TK changes but more importantly it depends on so what is the cost of time here so if the cost of time and it's actually something that it's it's it's not really well studied to be honest with you so if there's a cost of time it's going to depend on this K so I'm going to say J of K right so how if this cost is going to be a constant so if J of K is a constant B where I'm going to add maybe you are at the beginning or at the end this cost of time is increasing linearly is accumulating as a function of time but cost of time is linear now so that's one kind of cost and we've been talking about the kinds of costs that look like this these things are hyperbolic and so to give you a sense of why cost of time should be that way not this way, quadratic you might find in control theory books so if you think about biological systems when I ask you to so I want you to think about I want you to think about cost of time so what I'm going to ask you to imagine is a scenario where you're going to compare waiting suppose I ask you to imagine waiting 100 days versus 101 days okay suppose you have to wait for something 100 days versus 101 days for most people 100 and 101 days is about the same on the other hand let me ask you to compare waiting one day to two days waiting one day versus two days for most people the difference between one and two is a lot more than the difference between 100 and 101 right, so you know time is not measured linearly in your head the cost of time is not linear and it's not quadratic either if you were a quadratic time measure the difference between 100 and 101 is huge whereas the difference between one and two is tiny so 100 squared minus 101 squared is much bigger than 1 squared minus 2 squared so that's very clear so your brain is something that has cost of time that's increasing much slower than linearly what this function looks like is this function here is something that has something that looks like this so this like adding the cost of time component and it seems like that just like in terms of the brain computations makes like the idea of like movement planning and incorporating that like incredibly difficult because now you actually have to compute trajectory for every single possible time that it can find like an optimum in that whole space exactly exactly but if you think about physics if you ask this question earlier suppose that there is a cost associated with action and so how do we do it so f is equal to ma where does that come from well it's minimizing a cost and it's the integral of what's called the Lagrangian which is difference between kinetic and potential energy so but you know objects in space move do they compute that cost before they move no it's so the reason why that equation is important it doesn't give us any insight into how physical systems do it it's a way to describe at the macro scale the way things move so it's quite far from describing how biology makes you move but it's a way to describe movements of biological systems it's the same way as f is equal to ma is a description of how planets move around you know each other but it's not probably telling us much about how you know at some atomic level gravity is generated that's making this thing they're not computing anything that looks like that function but it's a way to describe the motion that's the way I think about it alright good see you guys Monday


Hi everyone, Joe for jasmiescasewrakes.com coming at you with 2023 Panini and Mosaic football choice edition. Just five quick little boxes, this is pick your team number six and if you get at least two teams you got a chance at the Colts if you follow the instructions right here. So big thanks to this group for getting into it, appreciate it. Here's everybody right there. So basically if you buy two teams, you get one entry, four teams, two entries buy an even number of teams and half of those become entries. So I'm going to alphabetize by your first names, it's a little bit easier this way. So you can see Chris has ten teams. You can see on the bottom right hand corner the count right there. So ten teams, so five of those become entries, keep track of it right there. Cliff got two teams that's an entry, Lance got two teams that's an entry, Michael only got one. Omar got two teams that's an entry, Patrick got four teams that's two entries, Ryan got two teams that's an entry, and William bought eight teams, so four become entries. So that's a total of 15, so it's a one in, it is a one in a 15 chance to get the Colts. Let me just spot check this again. So we got Chris, Cliff, Lance, Omar, Patrick, Ryan, and William, all right. Now let's go to a new dice, new list. Name on top gets the Colts after five, three to two, five times. One, two, three, four, and fingers crossed. Good luck, fifth and final time, Patrick Colts going your way after five. Leave the column that's re-alphabetized by team name, and let's print and rip. Mosaic choice reserved for YouTube, let's pop that open, let's pop that open. Now it's an empty box. We're going to make stacks of five. One, two, three, four, five. One, two, three, four, five. One, two, three, four, five. That messy stick pile over there, one, two, three, four, and five. All right, so there we go. Now, you can see right here we have one, two, three, four sets of five. One, two, three, four, five. We're going to roll the die, and we're going to go for the each stack. One, two, three, four. All right, if I roll a five or a six, we'll just roll again. And it's one, so it's that far stack right there, pretty easy. Let's gather up all of these, set these over here for some other time, probably tomorrow, and I'll put these in my cabinet over there. I think these are the only Mosaic choices we have in the store anyway, so they won't get mixed up with anything else. And one autograph per box on average, plus a bunch of different exclusive parallels that are what we're looking for. Good luck, everybody. Thanks, everybody, for making it happen. I feel like I don't really get a good focus on this, or the ink is too light. It means my eyes. But there you go. Thanks, everybody. And good luck. Let's see where the autograph spot is. Looks like it's going to be right there. We'll show you these first. Show you Tim Brown first. Tim Brown, three out of 80. Lance with my Raiders. Alec Pierce to 80. That's for Patrick and the Colts. We've got Derek Henry National Pride, one out of eight. Nice low number there. Lucas Van S, and we've got a Christian Gonzalez. Looks like Derek Henry not going to get traded. I think there was like a deadline to restructure a contract. That had passed, and that essentially sealed his non-trade fate. Let's see if I can slide this card out here. There's Emmett Smith, Hall of Fame. And behind Mike Williams is going to be Bailey Zappy. For the Patriots, that's going to be for William in the pass. And I don't see a number there, not a number. The Sordian shipping team will top load those. Next. All right, we've got Lou Keekley. Oh, a Peacock parallel coming up. Love those short prints. There's Clark Phillips to 80 for the Falcons. That'll be for William. And we've got a National Pride, another Derek Henry for the Titans. That's for Chris Butler, and the Peacock is Jaden Reed. That Derek Henry is out of 80. Jaden Reed, Packers. That's going to be Chris Butler. There you go, Chris. And then we've got Phyllis Anduike, Uzoma. And we've got Rookie Will Leviss. I'll bet Valleys have jumped a little bit on this guy. I mean, he was always going to be rated fairly high, right? Rookie quarterbacks. But now, after his 4TD performance, Chris Butler and the Titans, I'm sure it's a nice time to hit that rookie card. I feel like Jaden Reed has also been showing some glimpses of what he can do for the national football league. Chris Butler also has the Packers. There might be some wide receiver injuries that might open up some space for him. There's Chris Carter behind Chris. It is Tavius Robinson, rookie auto for the Ravens. Chris Butler, last bot Mojo. Another choice box. Good luck. All right, there's Darius Slay. We've got Calvin Ridley and Breece Hall to 80. Jaguars is William. Jets is William. We've got Joey Porter Jr. to 80. Steelers, that'll be for William. And another Joey Porter Jr., different parallel. Not numbered and Colisea Cansey for the Buccaneers. Not numbered. All right, behind Aaron Rodgers National Pride is Gardner. Nice sauce gardener for the Jets. And that's going to be for William. All right, two boxes to go. White Juice Johnson, Billy White Juice Johnson out of 80. I think I saw him on a Peyton's Places episode. There's another Will Leviss to 80 this time. Chris Olavi Peacock, a couple of these players right here. Nice, Chris Olavi Peacock for the Saints. William with Nolens, New Orleans, the Big Easy. And nice time to get that Will Leviss. Chris Butler, Tennessee Titans to 80. And then behind Devon White for the Buccaneers is another sauce gardener. But this time in focus, autographed sauce gardener. All that sauce. William with the Jets, Final Choice Box, lays it. What? Did we get an extra pack? This is the pack I opened. Love it. I'll take a bonus. All right, there's Tank Dell, Rookie Silver. Cameron Johnson to 80 for the Saints. William got Richard Dent to 80 for the Bears. That's for Michael. Got Tyler Scott, Rookie Card out of eight. And then we got Diahenly and Sean Clifford, non-numbered. Nice low number on this one. Richard Dent also going to the Bears. This is for Michael and Cam Jordan for the Saints. Once again, William. All right, and the bonus autograph behind Jalen Ramsey is LeGarret Blunt. Bonus. You know what? I don't think that even felt heavier. Maybe I just didn't notice it. Only until I grabbed the box again that I realized. All right, Buccaneers. That's going to be Chris Butler. Last spot, Mojo strikes again. And the final box. You think there's a box in there that's empty? Because of the bonus? In that case, I don't know. Maybe there's a box somewhere in the world that is missing a pack. All right, there's Byron Young, 12 out of 80. Sean Alexander is 17 out of 80. Byron Young for the Rams. That'll be for William. The Sean Alexander for Seattle. That'll be for Patrick. Dante Hall to 80. That'll be for the Chiefs. That's going to go to Lance, Miles Murphy, and DeMarvian Overshown. These up here. Behind Zach Martin is a in-focus autographed Cooper Rush Cowboys. Dallas Cowboys, that's going to go to Cliff and the boys. No, no extra pack in here. There you go, gang. So we got one, two, three, four, five, six autographs. That bonus pack gave us the sixth. There you have it, ladies and gentlemen. The next five boxes in the store. Now, listen, we saw some nice stuff here, but we did not see any of the top rookie autos, which is a possibility, right? Or maybe some really low-numbered cards of the top rookies, maybe some Anthony Richardson's, more Will Leviss's, so on and so forth. Next five boxes in the store right now. Jaspy's casebreaks.com. I'm Joe. I'll see you for some more mosaic choice next time. Bye-bye.


Welcome back to our lecture series Math 1050, College Algebra for Students at Southern Utah University. As usual, I'll be your professor today, Dr. Andrew Misseldine. In section 5.2 in our series, we're going to be talking about rational graphs. That is, we want to graph rational functions, which we introduced in the previous lecture here. Now, in order to do that, we have to have a baseline. When it came to graphing polynomials, we compared polynomials to monomial graphs. So we started off by graphing things like y equals x squared, y equals x cubed, y equals x to the fourth. We want to do the same basic thing for rational functions. Now, our baseline is going to be the reciprocals of these monomial functions. We want things like y equals 1 over x, y equals 1 over x squared, y equals 1 over x cubed, 1 over x to the fourth, 1 over x to the fifth, 1 over x to the sixth, keep on going. So it turns out just like monomials that there's going to be a parity argument, that those with an even power are going to behave very differently than those with an odd power. So I want to illustrate this by flipping over to Desmos for a second. So imagine we have the following graph in front of you right here. This right here is the function y equals 1 over x. And so this is the standard reciprocal function. Some things to notice in this graph right here is that the point 11 lives on the graph. The point negative one, negative one, likewise lives on this graph. These were points of importance when we talked about odd monomials previously. Now, something that is different here is that the point 00, the origin, is not a point on the graph. It actually lives outside of the function's domain. Because if you try to plug in x equals zero, you get 1 over zero, which is undefined. And so our function, our rational function here is not defined at x equals zero. So it's definitely not the origin, but it's nothing. There's nothing there. And so something we see on rational functions is you're gonna see the presence of vertical asymptotes. So in fact, there is this vertical line, which in this case coincides with the y-axis, that our function seems to avoid. That as we closer and closer to x equals zero, either on the right or on the left, your function is going off towards infinity, like on the case from the right, or you also get the y approaches negative infinity in the case of the left. And so our function, it's not defined at x equals zero, and we see there's this asymptotic behavior. This is what we meant in our previous lecture about vertical asymptotes. We talked about how we can algebraically find those vertical asymptotes. And so now we can see that in fact, there is this geometric interpretation. We see what happens as we approach this point outside the domain. This is something we'll investigate more for more complicated graphs. But our function also has a so-called horizontal asymptote that in this case it coincides with the y-axis. That as x approaches infinity, we're gonna see that y approaches zero. And as x approaches negative infinity, that as you go to the left side of the graph, y likewise approaches zero. Now to try to distinguish between these two pictures, you'll notice that on the right-hand side that as we get closer to the x-axis, it's from above. And so we're gonna denote this as zero plus, the little superscript of plus means that we're approaching zero from above. We're approaching it from the positive side. But then on the left-hand side as we approach zero, in this case, we see that as we approach zero, we're approaching it from below. That is, we're approaching it from the negative side. And so we're gonna denote this as zero negative in the superscript. So these are not exponents, just a little bit of notation. We're borrowing from calculus to indicate that we're approaching zero from above on the right and we're approaching zero from below on the left. And it turns out that for the most part, this behavior I've described to you can describe any odd monomial function. So as we, right now you see one over x to the first on the screen, as we then switch this to be one over x cubed, right? So that's what we're looking at right now, one over x cubed here is our y-coordinate. Notice what happened as we went back and forth that some things stayed the same, right? This graph still passes through one, one and negative one, negative one. So those two points were the same. The horizontal and vertical asymptotes were the same. And notice where did the vertical and horizontal asymptotes intersect? They intersect at the origin, right? So that's the significance of the origin here. It's not a point on the graph. This is where the asymptotes intersect each other. So as you go between one over x and one over x cubed, that behavior stays the same. As you go off towards infinity, you're still approaching zero from above on the right and you're still approaching zero from below on the left. That part's the same. So the in behavior is the same.  As you go off towards, as you approach the vertical asymptote from the left, you're gonna get negative infinity there. And so again, a bit of notation here. Let me mention that we would say that as x approaches zero from the right, y approaches positive infinity. In this case, as x approaches zero from the left, y will approach negative infinity. So the behavior near the asymptote is the same in both of these situations. Basically the only thing that changed as we went from one over x to one over x cubed here is the steepness. That when you are close to the vertical asymptote, it gets steeper. And when you get farther away, you're actually getting closer to the horizontal asymptote faster. That is, it's more shallow when you get past one and negative one, but when you're between one and negative one, it gets steeper. And this will happen as we increase the power. So we have one over x to the fifth, one over x to the seventh, one over x to the ninth, and to the 11th, all the way up to the 19th power, right? What happens is when you get close to the origin, it gets steeper right here. And when you get far away from the origin, it gets even more shallow right there. And so that's what happens when you have these odd monomial functions. And so I want to summarize that for a second. So some things we should mention that if you have an odd, not monomial, an odd reciprocal function, y equals one over x to the n, where n is an odd number, like one, three, seven, et cetera. Some things to note here is that the graph is symmetric with respect to the origin. This is what we called an odd function. Let's switch back over for a second, right? Notice that this function is in fact odd, that if we rotate around the origin by a half spin, we get back the exact same picture. Or another idea, if we take the line through the origin, we find a point equidistant on the other side. So this is an example of an odd function. It's symmetric with respect to the origin. The domain is gonna be all real numbers except for zero. We saw that there actually was a vertical asymptote at that point. The range is also all real numbers except for zero. We can get any number coming out of this reciprocal function except for zero itself. We mentioned there was a vertical asymptote at x equals zero, horizontal asymptote at y equals zero. It goes to the points one, one, and negative one, negative one. As the exponent increases, it got steeper near the origin and it got flatter when you're away from the origin. We mentioned that. And then we also mentioned the behavior near the asymptote that you have your vertical asymptote. It'll approach from the right-hand side as x approaches zero from above, y will approach infinity. And as it'll go down like this, as x approaches zero from the left, y will approach negative infinity. So we can determine the asymptotic behavior near the vertical asymptote. That's the same for all of these odd reciprocal functions. And then as, if you think of your horizontal asymptote, as you go to the far right as x approaches infinity, y will approach zero from above. And as you go to the far left, as x approaches negative infinity, y will approach zero from below. And so with the in behavior and the asymptotic behavior of our functions, determined just by this parity, just by it being odd. Now let's talk about even ones for a second. So let's switch this thing up. We're gonna go from two to say 20 this time. And I'll start off at two. So some important things to see here that the behavior of the graph did change a lot. So first of all, the point one one is still on the graph, but negative one, negative one's not on the graph, which isn't so surprising because for even monomials, negative one, negative one was never a point on the graph. Instead, the point that we won't want would actually be negative one, positive one, which you can see right there. That was a point that was typical for our even monomials, like if you take y equals x squared for a moment, you see this parabola here on the screen. Those points go in the same, they go in the same on both graphs right there. You see both of them present. Now, one thing that's interesting to mention here, I'm gonna switch the color to make it a little bit more clear on the screen. Now, the parabola is the orange one, that these functions are reciprocal to each other. So as one number gets big, the other ones have to get small. And so you see what happens that when the parabola gets small, that's getting close to zero, then the reciprocal function has to get big, going off towards infinity. Now, as the parabola gets big, going off towards infinity, its reciprocal has to get small because that's what reciprocation's all about. When one gets big, the other gets small. All right? So coming back to the graph right here, the even reciprocals will go through one, one and negative one, negative one. They don't go through zero, zero, the origin, but they do have a vertical asymptote at x equals zero and a horizontal asymptote at x equals zero. As the power gets bigger, right? You're gonna see the same thing about steepness, right? As we go up bigger, bigger, bigger, bigger, bigger, bigger, right? It's getting steeper when you're close to the origin and you get flatter when you're away from the origin, the exact opposite of what our monomial functions did. Okay, we're gonna go back to one over x squared here. Another thing important to remember, let's look at this asymptotic behavior. So as you get close to the origin, as you get close to the vertical asymptote, the graph right here is x approaches zero from the right. You're gonna see that y approaches positive infinity. That was the exact same truth statement for the odd reciprocals. But in this situation, notice that as x approaches zero from the left, the function still approaches positive infinity and this is something we see all the time that with the odd powers, you'll see sign switching. You had positive versus negative, but with even powers, you don't see the sign switch, right? Negative one squared is actually a positive one, but like negative one cubed is in fact a negative one. Odd powers will keep the negatives, even powers will make them positive and we see that same feature happening right here. As x goes off towards infinity, as x goes to infinity, we see that y will approach zero from above, it's positive, but as on the left-hand side, as x approaches negative infinity, let me fix that, as x approaches negative infinity here, notice that y will still approach zero from above. It approaches it from the positive side. So when we take even powers of negative numbers, it makes them positive and in fact, this is an even function is symmetric with respect to the y-axis there. All right, so let's go back to our picture. Oh, sorry, let's summarize what we've discovered here about these even reciprocal functions. So they are even functions, so they are symmetric with respect to the y-axis. Their domain is gonna be all real numbers except for zero. I do need to make a little, that's not correct what it says about the range. The range in this situation is actually gonna be zero to infinity. It's only gonna be non-negatives. And I also have to make one more amendment there. Sorry about that. It should be zero to infinity. Zero is not included in that situation. It does have a vertical asymptotodance, the x equals zero and a horizontal asymptotodate y equals zero. That part's the same. You go through the point one, one, which is the same, but you also go through the point negative one, one, which is different from the odd case. The magnitude will get, the graph gets steeper when you're near the origin and it gets flatter when you're away from the origin. That part was the same with the odd ones. The asymptotic behavior near the vertical asymptote is, well as x goes from the positive side, y would go to infinity, that part was the same. But as you approach negative infinity, excuse me, as you approach zero from the left, it's still positive, that differed. And then the end behavior is a little bit different as well. So basically when it comes to your odd degree functions, you basically get something like the following, your odd reciprocals. Essentially, again, this is the basic picture. You're gonna get to be something like this what you see here in blue.  The power gets bigger, bigger, bigger. You wanna make it steeper and flatter. And this pivot point basically is around x equals one and x equals negative one. That's the idea for the odd case. For the even case, what we're saying is basically the following. Here's your asymptotes. For the even case, it basically looks like the following. This is the basic picture where again, there's no sharp corners here, but this will kind of pivot around the point x equals one and x equals negative one. You get this basic shape for the even reciprocal functions. This is in contrast to the even monomials which kind of looks like a bucket and the odd monomials which have this type of shape right here. So let me give you an example how we can graph irrational function using transformations. So if you have something like the following, let's graph the function r of x equals one over x minus two squared plus one. I want you to notice that fundamentally, we've just taken the graph y equals one over x squared and we transformed it. y equals one over x squared, that's one we were playing around with before. It'll look something like this. What are the transformations in play here? Well, the denominator here, this is our horizontal zone. Do, do, do, do, do, do. We're replacing x with x minus two. This will suggest there's a shift right by two units. And then, and so that's gonna take this picture and move it to the right by two units. So we go one, two. The point one, one will come over by two. So now it's gonna be the point right here at three, one. And then the point negative one, one will come over two units. So it actually becomes the point one, one. But this also moves the asymptotes. So the vertical asymptote at the y-axis, it'll come over by two. And it becomes now the axis x equals two. Notice that the horizontal asymptote's not affected by a horizontal shift. If a horizontal line shifted to the two, it's, it's, it didn't change, right? But that's what this minus two does inside right here. What does the plus one do? Well, the plus one is gonna shift the graph up by one. So everything goes up by one. So the point here, this point here at three, one will go up by one. It becomes the point now three comma two. This other point right here, it's at one, one. It's gonna shift up by one. So it now becomes the point one comma two as well. Your vertical asymptote, when you shift everything up by one, it's, it's still a vertical line. It's not gonna change. So your vertical asymptote stays at x equals two. Notice that when you look at this function, the problem with the domain is gonna be what makes the denominator go to zero, right? So you take x minus two squared equal to zero. That would imply x equal x minus two equals zero. Take the square root. So x equals two. So the problem with the domain coincides exactly with where this vertical asymptote ended up. But notice when you shift things upward that also will move the horizontal asymptote up by one. And so now we got a horizontal asymptote at y equals one. So using transformations, we can transform these reciprocal functions like so. And this is the first step to graphing rational functions. Now, in order to graph more complicated rational functions, we're gonna need some more advanced techniques, just like with the polynomial graphs we did before. The monomials, we could graph all of these monomial functions using transformations, but general polynomials, we need a little bit more. We need some more information. But graphing monomials was still important. The in behavior, for example, the behavior near a root, turns out that the polynomials were approximately monomial functions when you went towards infinity or when you got close to an x intercept. The same is also gonna be true for rational functions that as we go to the extremes, we go to the in behavior, or if we get close to an x intercept or we get close to a vertical asymptote, turns out our rational functions will be approximately the same thing as monomials or reciprocal functions. And that's why we need to know these graphs.