Hello everyone, welcome to the talk on Caspian, the Carbon Aware Scheduling and Placement talk. First, let me congratulate you on your endurance and tenacity that you're coming and attending the very last session, almost last session in the conference. Let me introduce myself first. My name is Asir Tantawi. I'm with IBM Research and my colleague. Hello everyone, my name is Sayebeb Bahraini. I'm a postdoc researcher in IBM Research. All right, so we'll walk you through this activity or project that we started. It's not in CNCF, but we're planning to be there. We're going to talk about scheduling, we're going to talk about dispatching, we're going to talk about jobs, multi-clusters, cuing, coops teller, but most importantly, carbon and energy. So what is Caspian? The motivation for us getting onto this project is obviously that the world is trying to get greener and greener and we all know that in data centers and in clusters and Kubernetes clusters, especially now, we have a lot of GPUs and we have a lot of training jobs running and they consume obviously a lot of GPU cycles for very long periods of time, minutes, hours, days and months in some cases. So what we're trying to do is schedule jobs so that we can minimize the carbon footprint of running those jobs on those power hungry devices. There are many things one could do. We can make the devices more efficient, you can make better cooling, better this and that. We're going to try with this project something very simple, which is schedule jobs at the right time at the right place and I'll go through what do I mean by that and that's what Caspian is all about. So I don't have to remind you of the amount of the carbon footprint due to running these LLM training and so on and so forth. They're usually equivalent to, I don't know, the account, how many round trips and how many car trips in the lifetime and so on. You all know that. The problem is that it's increasing. It's getting worse by the day. Okay. The good thing however that we're exploiting in this project is that if you look at the generation of electricity that goes into these data centers come from various or a mix of supplies, of energy supplies, some of them are renewable, some of them are not and this mix you see here on the left depends on the geography of where the data center is. Some geographies have more renewable percentage of mix than others that you can see here. This is real data from Canada for example in Toronto. They have a lot of nuclear in this case and so on and so forth. So it varies from location to location the mix itself of where the energy is coming from. That's one aspect. The other aspect is over time that mix changes depending on how much sun there is, is it day, is it night and so on and so forth. So we're going to try to exploit that if you have a multi cluster arrangement that clusters are in different locations and over time the mix is changing we're going to try to schedule those jobs that take a long time and they're power hungry at the right place with one of those clusters at the right time. If we have the luxury of shifting the job a little bit by delaying it a little bit within a tolerable amount which is specified by the user that's the whole idea. If you're not familiar there's something called the carbon intensity. The carbon intensity takes this mix that I showed you and calculates one value which is how much carbon given that mix that is emitted per energy unit. So for example for every kilowatt hour of energy how much carbon is emitted and that depends on the mix. If you have a lot of renewable energy in the mix then this carbon intensity would be low and it would be higher otherwise. So there is a way to compute that and this carbon intensity is a function of time as as I showed you before. Now since we're after carbon we have to figure out what is carbon right carbon emission due to this job running is really a product of three things. One is the intensity that I just talked about at that location at that time times the power consumption the units are shown here in yellow so carbon intensity is how much carbon per energy and the two terms here is the energy. Energy is power times time. Power is your power consumption the devices that the job is running on. How much power does it does it emit? So that depends on how efficient the devices are it depends on maybe other things like if you've been to the talk yesterday the peak stock peaks handle this particular thing which is tries to minimize the power. This is a power aware scheduler and the third component is how long the job takes. So in Caspian we don't touch that there are of course ways of dealing with that if you if one can can somehow make the length of time a little smaller by adjusting maybe hyper parameters watching the accuracy precision and so on and so forth we don't deal with that in Caspian. We deal to some extent with the choice of hardware whether if if one data center or one cluster has better hardware than the other but more importantly we deal with the carbon intensity in order to minimize the total carbon so that's the whole idea we minimize the total carbon that left the left part of the equation by scheduling those jobs wherever on whichever cluster and whenever in time when the carbon intensity is low. Of course not all jobs or not all workload is shiftable as we want we cannot shift it in time positively you cannot shift it in negative in time before it arrives but if if it's maybe a schedulable or a job that is run every day or something like that you can do that and some jobs are not shiftable at all so there is some tolerance and that's what I talked about before we assume that a job when submits a job the training job for example would have a deadline like you have to finish my job by six o'clock tonight but it could be harder could be soft our assumption is that it's a soft deadline in what I'm going to we're going to show you today but we try to keep that as much as possible close to the deadline and not go beyond the deadline much and you're going to see that in the demo in the demo so pictorially here is the picture of the problem that we're trying to solve we have multiple data centers or multiple clusters and we have jobs that arrive a job is described in the manifest or the yaml file an estimate of how long the job will run an estimate and a resource requirement for that job and a deadline okay and our opt there is a dispatcher obviously there's a queue of these jobs and a dispatcher that's not casband casband really is the brain is the decision maker is the thing that's going to decide optimally for each job where should it go and when does it run okay so the way we do that is we formulate an optimization problem we discretize time so we look at time slot it's a time-slotted system typically the carbon intensity doesn't doesn't change that often talking like 15 minute half an hour kind of granularity so our optimizer runs at about that scale and again remind you that we're talking about training jobs that are long long running jobs so we solve an optimization problem that we formulate and I'm going to show you a glimpse of that we make some assumptions we make of course we look at the cluster as a whole so we kind of aggregate the efficiency of the cluster in some an approximate linear power profile linear and in the utilization of of the resources we assume that allocation is equivalent to minute to utilization which is not quite true but that's the assumption that we make there are some things that we that casband doesn't get involved with for example the scheduling within a cluster we say that job goes to that cluster but the scheduling within a cluster is not a casband thing maybe it's a peaks thing or some other schedule plug-in in that in that cluster all right so so as I said casband is a decision maker and this box here in the middle it relies on a multi-cluster management platform of some kind it relies on a job a queuing and dispatching kind of system and as well as a mechanism to to transfer jobs transparently from a central location which is a cluster as well so we this thing on in the left here lives in a cluster a management cluster or what we call a a hub cluster and then you have the multiple clusters here what jobs run are the spoke clusters so the for example the management of the job lifetime and and so on and so forth is part of that multi-cluster management platform which is not casband I didn't talk much about preemption we also even though you will not see here in that presentation that is job if a job is preemptible and we and casband finds that it's better to cut it into pieces and spread the pieces when the carbon intensity is low then it will do that so it will it will make preemption if the job allows preemption is if it's checkpointable so that's all part of the optimization problem speaking of optimization problem here it is I'm not going to go through the details of what it is and so on and so forth but I'm going to give you a glimpse this is a language in which the problem is specified think of it as a programming language but it's a mathematical language so the idea is for each job I is going to be scheduled on cluster j at time slot t if this variable is one and that's the variable of the optimization problem it's an integer program so it's either zero or one and you either run it there or you don't run it there at that location at that time there are a bunch of constraints and an an objective which is in red our objective is a multi objective optimization one has to do with carbon the second I talked about briefly which is we want to finish the job as close as possible to the deadline and the third one is we try to to schedule jobs as early as possible not only by the deadline but as early as possible so that the finish time the makespan if you will of all jobs is also minimized subject to the constraint that the resources are satisfied so the pieces the components of of putting the system together we rely on a couple of open source projects so casmian is again a decision maker as an optimizer as a solver it takes the problem periodically and it solves and it depends on and it relies on m we chose mcat as our q or job queuing component that queues jobs and the jobs will be there's something that we call a a dispatching gate and the gate is set originally similar to what q has q has also a suspend kind of gate that casman would remove that when the job is ready to be executed and and it will also put the the target cluster that has been decided on that on the job specification mcat will do the job queuing life cycle management and then we rely on this other project which is coop stiller another open source project that's going to do all the the mechanism for sending the job to the spoke cluster managing the job life cycle syncing the results back and and all of that stuff is part of coop stiller all right i think i'm almost done we tried kubernetes terms we added a couple of custom resources that we needed one is the one on the left here in the purple is cluster info so cluster each cluster in the spoke cluster has a cluster info object that has information about that cluster mainly the resource availability availability on that cluster and that changes over time so some controller here is is updating that as well as the geography where the spoke cluster is and then we get the carbon intensity through uh web services typically that we go and find what the carbon intensity is for that location so we go and fetch that through a carbon monitor component so cluster info is is a custom resource that is synced through coop stiller up in the hop cluster where the where casbian lives the other the other custom resource is something that is called an app wrapper and that's really part of mcat so this is not new so mcat has this uh app wrapper custom resource that wraps everything related to the job in this one object so if it's about a pod a deployment a collection of deployments the seekers the config maps everything in this one thing which is an app wrapper the app wrapper is the unit or the granule of scheduling so that sits in the queue the mcat has two components one in the hop cluster which is the dispatcher that's where the queue is and when it's time for the job to be scheduled when the scheduler optimizer which is casbian sets the gate and and then that job is then dispatched will go down to the particular spoke target spoke cluster through coop stellar mcat runner will take that job as an app wrapper will unwrap it and all the api objects of that job will then live and run in the spoke clusters if it's not preempted let's not talk about preemption now the app runs in here and it will be watched by the by the mcat runner uh eventually it will be finished and that will be synced back up in the spoke cluster that's where the user interacts with with the job and i think i'm going to hand it over to tayoba to show you a demo thank you answer so uh now in the second part of our presentation i'll show you a demo of casbian uh you can also scan this qr code to uh get more details on how to set up uh the demo uh so here we consider uh four local clusters all are built by k3 k3d one is hop and we have three spoke clusters on hop uh we deploy casbian uh that has two main components carbon monitoring and a scheduler carbon monitoring periodically interacts with carbon intensity service to get the updated values of carbon intensity of those spoke clusters then scheduler also runs periodically and at the beginning of each period it gets all workloads that are in the system the ones that are queued in the hop and the ones that are running in this in this post then uh based on the status of workloads and based on the status of clusters like their carbon intensity in the next 24 hours their resource availability it decides which workload should be executed in the next time slot and on which cluster it also may decide to uh suspend the execution of some workloads due to sustainability and then we also have mcat dispatcher here uh that for those workloads that are their target is set by uh casbian uh mcat dispatcher will dispatch them to the target cluster and with the help of sinker so sinker will like uh down sync these workloads and also up sync the status of those workloads to the from spoke to to the hop cluster and then on each spoke cluster we run mcat runner we deploy mcat runner so mcat runner will uh extract all carbonitized objects in a wrapper and execute them and also we have cluster info controller in mcat runner that updates cluster info custom resource so it periodically gets the status of spoke cluster like the available resources gpu cpu and also the geolocation of clusters and then uh so for example in the demo that i'm going to show you uh we said geolocation of spoke one to germany spoke to to uh one state in japan and spoke three to uh ontario in canada we also have a load generator that over 24 hours will submit workloads in the format of app wrapper to the hop cluster uh so yeah let me show you an example of an app wrapper so here uh so as uh uh was stated before you can app as many objects as you need in a single app wrapper yaml file you can just need to list them in generic item part for example here we have a single part but you can also have job you can have any other kubernetes object in addition to that you can also specify some uh fields that is uh needed by casbian what is the expected runtime for this app wrapper and what is the deadline for finishing this app wrapper so if uh user doesn't specify then just casbian use the default values so and here is like the distribution of the arrival rate of workloads by our load generator is kind of passing distribution and then uh we assume that workloads are like long running workloads between one hour to four hours is their running time and um their gpu requirements is like between one to five cores and then we assume here that uh the jobs can tolerate delays so here the slow down is set to three um you can also set other parameters so i um to run the demo for example you can set the like the period length period length so how often you want to run casbian hourly or in minutes so for example 120 seconds i want to run it for example in every two seconds every two minutes you can also set the optimization mode so basically the current version of casbian runs in two modes one is sustainable mode and the other one is qs mode in sustainable mode casbian considers and not only carbon footprint minimizing carbon footprint but also minimizing like the completion time of workloads and lateness of workloads but you can also run it in qs mode in which uh casbian doesn't consider any weight for uh carbon footprint you can also set other parameters like the zones of clusters and also the power characteristics so uh here first uh let me uh play this uh recorded uh video that shows the steps that you need to go through to uh run casbian then i will also show you some experimental results so uh before everything you need to uh clone the repository by running uh create cluster scripts uh these scripts actually will create three spoke clusters and one hub so you can also also pass some parameters so three is the number of clusters that i need spoke clusters one is long number of agent nodes and 16 is like the number of gpu cores that i need per node so then this script will create the right so after creating clusters yeah it takes a little bit time right so here we have three clusters the spokes and one hub the next step is to run run mcat on each uh cluster so with this command uh on each spoke cluster mcat runnel will be deployed and mcat dispatcher will be deployed on the hub cluster then the next step here is to run monitoring um like a script so i will explain this uh plus a little bit later uh just so so actually what we are showing here like the performance of clusters like what is the the live uh carbon intensity in each cluster and what is the gpu allocation you also show the the overall performance of the system so uh the right uh like terminal here shows the output of here we're on casbian script and uh this uh terminal shows the output of casbian in the first period i haven't worked around the load generator so no app wrappers in the hub cluster uh that's why you don't see any decision that would be made by uh casbian so just let me explain a little bit this uh uh script so the first line like list the app wrappers in the system in the hub then it will like get all spoke clusters or what is available cpu what is available gpu's on each and what is the geolocation and then it will list the decisions that are made by the optimizer in casbian so at the beginning we don't have any app wrapper but now we run load generator now we should expect in the next uh like time slot more decision be made by casbian so now you can see two jobs for now are uh submitted to the hub and uh and here you can see the the decisions that are made by um casbian we see that both uh jobs are assigned to spoke three but why that casbian did this misdecision make this decision actually because the of carbon intensity if you look here is spoke three the geolocation for spoke three is canada ontario that has the lowest carbon intensity so now let me run the remaining part of this uh video so if you look at this uh on the left uh figures uh the first row from top shows the carbon intensity on each spoke clusters so uh the left is for canada then is for japan then for germany so as you see here canada has the lowest carbon intensity that's why in the second row if you look at the second row uh more gpu allocations are assigned to this cluster but after some point because uh casbian also takes care of the qos of workloads then it also uses the second uh cluster in japan to schedule workloads and so here just because japan is i mean um is more power efficient so you see japan and uh germany their carbon intensity is in the same range but because uh japan is more power efficient casbian chooses um spoke two here and then so i am going to explain the next to slot two plots in the next uh slide but um here uh let me just briefly explain that uh at the bottom you will you see two uh figures the left figure shows like the total carbon footprint generated by executing your workloads uh and then on the right you see the like a histogram of percentage of jobs based on the value of alpha so what is alpha alpha is actually the completion time ratio um which is the final response time over the deadline so if this value is left for a job this value is less than one or equal one this means that that job is executed by deadline if it's greater than one means that the job has missed this deadline so let's see how casbian can guarantee this so let me go to the next slide so here uh we run a casbian into different modes on the left we run casbian in sustainable mode and then on the left on the right we run casbian on qs mode so we don't have any sustainability concern on the right side while in the left side we uh consider both qos and uh carbon footprint in our decision making and then the first row shows the carbon intensity of each cluster the second row shows the gpu allocation and then the third row shows the overall performance of the system uh let me play the so yeah over 24 hours workloads are submitted to the system so this is just in fast mode what you're seeing here uh you can compare how workloads are allocated in each mode uh so you will see so in sustainable mode the schedule really starts by assigning jobs to the greenest one close uh which is the canada and then it will use uh uh japan and after that it will use uh germany while in the qs mode we see a kind of balanced distribution of row close so and then if you look at the last row you will see the total carbon footprint executed generated in each mode of course in sustainable mode we have lower carbon emission compared to the qs mode but what's what about other performance metrics about qs if you look at the second i mean there uh the like the value of alpha in each mode so you will see just uh in sustainable mode about like seven percent of jobs will miss their deadline uh while in qs mode because we don't i mean the main concern is about qs uh less than one percent of row close will miss their deadline but um if you look here the value of alpha most of jobs between a value of one to one point two are finished so just uh like lower percentage of jobs are very late so which uh uh we can like uh ignore those those percentages yeah this is like the end of uh our demo um thank you everyone uh if you have any feedback please scan this QR code and yeah any questions yeah thank you for the presentation um do you make any decision about delaying a job instead of putting it in the cluster with the lowest carbon footprint right thank you uh our scheduler here actually consider it makes two decisions about when to schedule a job and where so we make both decisions some jobs will be delayed if they can tolerate uh delay and yeah we make decisions about both yeah so uh in that case how do you choose to delay a job uh because i mean you don't know the future you don't know what the carbon footprint will be uh so we have our optimizer here look i mean the look ahead uh time window for our optimizer is next 24 hours so we know what will happen in the next 24 hours for carbon intensity and based on that we make decision let me add to that you're absolutely right you have a good point yes we have we work with predictions of carbon intensities and nobody knows for sure what's going to happen the next 24 hours but given this the nature the cyclic nature of the of the way generation of energy is then you can predict with good accuracy what's going to happen the next 24 hours any other questions yeah thanks a lot for the presentation very nice i was wondering do you are you thinking about adding other parameters to the scheduler like for example the price of running in one specific location or the latency i'm thinking of enterprise using this and maybe having broader constraints i assume one one of the assumption here is that the three locations have the same kind of server exactly so their profile is the same or i don't know so the the power profiles is not necessarily the same in all clusters that's the assumption that we make and we work with but i think you're bringing in an interesting dimension which is cost there may be other dimensions as well the optimization problem that we showed earlier is a multi objective one and therefore adding another objective should be straightforward what's not straightforward though is the way to solve it we cannot you can take this problem formulation and get a solver and solve an integer programming problem if you did that and you're dead in the water i can tell you that if you have hundreds and thousands of jobs in many clusters it's going to take forever to solve so we have a an approximation algorithm that solves that particular optimization problem which we didn't get into when can we expect this to be available for production workloads forever still still in research is it some kind of like open research where you accept issues or pull requests yes it is in github uh we we started to work on this so it's uh but you're you know you're welcome to download and try uh did we put the the qr for the github or was it at the end yeah so the one on the left is casbin and we have the other two that's already in open source mcat and coop stellar mcat is one way of doing job dispatching otherwise as i mentioned before could be q so we could integrate with that as well we haven't done that yet um but the the casbin is the is the one on the left i was wondering do are you using uh green software foundation carbon aware SDK to to fetch the data about carbon intensity or you're doing it on your way directly we don't have our way we use yeah here we use our electricity map to get the updated values yeah we rely on other open source if no other question thank you very much thank you


Tell me how you really feel Cuz I just want to build with you black girl. Tell me how you really feel. I Want to keep it real with you. I want to live better eat better. I want to love better sleep better Yeah, I want to feel so aligned Our men intimidated by women who make more money than them bro dudes. I mean I'm in I Would say this I would say this Guys this my what I think I think guys who don't have this stuff together are intimidated by a woman like that I think a guy who has this stuff together. It's not necessarily intimidated by that but he might not want to deal with her on that level just because of sometimes sometimes when Again, we're not speaking in absolutes But I just from stuff that I've seen firsthand sometimes when Well time out to my let's talk about what kind of money we talk about when you say more money than him What what level of money we talk about? We tell my specific range we talk about because I mean he can make 35 she made 36 I don't know if that's a big difference. You know what I mean like I don't know what it's like because I feel like for me as a teacher I made more money than some guys that I built with but I don't make a lot So I think I think a fear I think a fear is this and guys No man wants to hear this in an argument. I made more money than you No, no man wants to hear that because men We're judged based upon our ability to provide And protect That's what we're judged based upon our output is what we're judged based upon that is I mean we play We play sports, right? We always look at who got the best stats who's producing the most I mean touchdown that you got this year. How many points per game you average? Lebron Jordan who what you we're always looking at those type of things Because that is what we're conditioned to believe a lot of our value comes from so When because that's what we believe our value comes from a lot of us When a woman makes more than you I'm not saying it's a bad thing But no man again wants to be demoralized in an argument and hear that some men might because like some Some controlling men might say that in an argument, but I think majority men who are Who understand what it is that never comes up in our argument unless he just control of or abuse verbally abusive or something like that Well, he just dangles and like I made more money you They probably say something else that I hurt your feelings, but that but Hearing that from a woman to a man like you like to hang like now you coming for my man And I don't think no man wants to deal with that. What is a good man? Oh That's a good question So There are five things there are five key things That I think that and this is just my personal belief because I don't want to turn into something but a Good man For me is number one somebody who walks with God I personally believe that that a Man when you talk about submission and things like that like a woman You can't just submit to a man who was lost himself So in order for a woman to submit to a man he has to submit to God that's what I believe I'm born Number two, he has to work He has to have some ambition some goals and he has to be moving in it Because if you if she's gonna help you what she gonna help you with You don't got nothing for her to help you with now. She's gonna help herself now. You met number three, I think a man should be somebody that Brings out the best in everything that he touches Like He brings out the best of his friends. He brings out the best in his family. He encourages them He brings out the best in his peers not somebody that Comes around and then there's just a big negative ball of Energy that just makes everybody just like a great cloud like a man a man should be somebody that Brings out the best in everything that he does A man should protect a man should protect like And I don't mean be abusive to a woman like if you look at men and women by nature men have a Bigger stature typically than women and I don't think that's by happenstance It's to protect but not to be abusive to a woman but to protect her and protect the family protect her spiritually mentally emotionally and lastly the fifth thing I think a man has to be able to teach like Whatever it is that He is When I say that he spent time with God and things like that whatever it is that he's Taken in he has to be able to also share that information and he has to be able to cover and Yeah, so those are those are five things that I think that a man should be able to do that's a that's a good man because if you look that's when they say It was only after that then it said then God said it's not good for man to be alone Once those five things were acquired, but if that man don't got that ladies leave that man alone It's good for him to be alone Appreciate your answer So who's a black man you admire and why a Black man that I admire is my dad Not a sound cheesy or anything like that, but that's the man I spent the most time around growing up and I watch him Take care of the family and I watch him be resilient And I watch him be a stand-up guy. I think that's something that I admire a lot is that you know There have been things like I work in the automotive industry and my dad Is a quality engineer. He's worked in the automotive industry and I Don't know if you know anything about the automotive industry in the south But it's a very small-knit group and the more and more you start going up Going up in the ranks. Everybody knows each other no matter what company you work for Everybody it's just a little circle or cycle like this. So everybody knows everybody and so a lot of people remember my dad before he retired and They see my last name and they know I'm attached to him because the last name and everybody even though I know that I Get promotions and things like that based off of my hard work and things like that But I think it also helps that I'm attached to what I see is a good name that my dad created and everybody that that sees me they're like, oh You're such and such son. I'm gonna say the name of you such and such son And I like yeah, like man. I love your dad. He's amazing. He's this so feels good Being attached to something like that.  Oh, that's your dad Man, he's amazing. He's dope Yeah, come on. Come on over. So I like that Does your dad uphold the five keys of a good man that you do six way? I Ain't gonna say which ones I think he does majority of them Do you uphold the five keys of a good man that you do six way? I? Think I do. I think I could be stronger. I put it this way. I Think I have all I think I have all five but The levels You know, like I'm describing that I ain't gonna go in details which ones, but I feel like certain ones I can be Excel better in and that's on me Appreciate your honesty Shell what kind of daughter are you trying to raise do you want to raise? Man kind of daughter. Do I want number one? I want my daughter be fine as hell No, I want the problem now. I do want her to be pretty though, but I can't help that I can't help that but so whatever she was like. I'm a lover regardless But I want to raise the daughter I want to raise a daughter that I Want to teach her how to be treated by a man. I want her to when she gets into the dating scene I'm already thinking about her in the dating scene Which is crazy, but I have to think about that because it starts now and I want her to understand What a man should do and what to expect from a man, but I also want her to watch my interactions with Her mom and everything I want her to know How a man and a woman should speak to each other how they should love each other so She can witness that firsthand and so She can see it, you know, we talked about communication and getting children really exude the whole When we talk about 70% of communication is what you see Prime example a lot of times what they see they start Outputting they start thinking certain things are okay or not.  Damn, that's a very good question because now I'm in a peculiar predicament I think Hmm we will start off with Showing her how to survive because she don't need to know how to love yet show her how to survive and Then when the time comes You know be able to explain to her Okay, this is what this is but you You got to dial it back. So I'm still do that but Understand that you know whatever got kind of if you want a certain kind of guy Like you first of all she gonna have to assess what she wants out of life number one when she gets to that age If she just wants to be single her whole life. I'm a teacher how to survive That's it. You would just want to be seeing your life. You sure okay go on survive it but If she realizes and she's like, you know, I Want to have a family one day. I want to be married didn't you had you have to also teach them I'll have to teach her how to how to love and not just survive


with the max min stuff. So I'll remind you that last time when we have some functions, r in to r, I want to find the max min, and that tells us that points for the gradient is just zero vector, right? So here are critical points. This is what we did last time. That might be, they might, so those are our extremities. If we're over a finite range, then we have to look at the edges too. And if we have, if we have some strings, like so, g, let's just say, from r in to rm, then we can either solve some of the variables and plug in or use the run. This is what I did last time. It's used in your homework. That's where it's at. So, right? We're okay with this? If anybody has any clue what I'm talking about, no clue. Some clue, some variation. Okay, so that's what we did last time. And the one thing if you think back to, so usually in, well, you actually, in single variable calculus, you have a few problems like this sometimes where you want to make a box with a square of, you know, blah, blah, blah, blah, and you could do those kind of functions. And you just do this method. And really what we're saying, I'll draw any variables. What this is saying, I have some function f and then my constraints g may be correspond to some other function g. And g equals a constant means I'm looking at a level set of this. And so either I solve and I get instead this curve and I try and maximize that's supposed to be this. I try and find the highest point on this curve here. Or I can use Lagrange multipliers which is telling me that I want to look at the gradient of f where the gradient of f and the gradient of g align corresponds to looking at the level curves of g along f and finding the maximum that way. Right? They're sort of the same but there are two different ways of looking at the same problem. Anyway, we did that. I'm putting it away. So then one other thing that, so in one variable, we have the question say when I want to find critical points of some function f, or maybe there's one here. That one doesn't look critical so I guess it's not here, here. Then we have a second derivative test. So we can find this where f prime is zero and then either we can determine whether it's a max or a min by saying well at this point everything's lower or at this point everything's higher or at this point it goes up and down. Right? This is sort of a first derivative test or just a local analysis. So one way to classify our critical points, let's call it x naught, x1, x2, here either we look at, look at, it's no better, f near one of these guys to decide whether it's going up or down or we can use the second derivative test to classify as to whether they're local min or max. So let me remind you of the second derivative test. It says that if f prime of x naught is zero then we have three possibilities and f is nice. Then we have this case, f double prime of x naught is positive. This means it's a local min. We have this case of f double. Can you even see this? I can see it in here. F double prime of x naught negative. This means we have a local max and then you have f double prime of x naught equal to zero. Right? If you remember this from single variable calculus, no. Many people have never seen these little faces before. Yeah, the little faces. See, this guy is a local min and he's happy.  This guy, he doesn't know what's going on. Okay, so anyway, this is how I remember the second derivative test. Little faces. But you know what you think about this. Concave up, concave down, can't really tell. I mean, I suppose instead of drawing a sprinkling thing. Okay, so I want to talk about an analog of the second derivative test for a function of several variables. So now we have some function a, a good one. Some function f from r, n, r. And we have a critical point. So let's say this has come continuously differentiable with a twice. So the derivatives are differentiable continuously. And I have a critical point, gradient of f at some point x naught is a zero vector. So I have a critical point there.  And let's, let me just draw it into variables, but it works in higher variables. Well, the second derivative test looks at the concavity. And so if I have a local min, then I concave up no matter how I slice this thing open. So if I slice it anywhere, there's no color there, okay? So if I slice this bowl shape anywhere in any direction or in every direction, then near x naught, I should see something that is concave up. And so, so in any direction u, so this is my direction u, then it should be concave up. So then if I have, so if the slice is concave up, then this should mean I have a min. And if the slice is concave down, then I should have a max. And it's, so this is not just this slice, but all slices are, all slices are. And if the slice changes, so if some are concave up, some concave down, then I have a set. So that is I have something that goes up this way and down this way here. If I slice it this way, I get something like that, but if I slice it this way, I get something like that, then I have a set. Right? So this is sort of second derivative test in many ways. But the thing to notice is who we do is we slice the thing open and we look at all the possible ways of slicing. Now this is NRN, so maybe if I'm looking at a function of three variables, right? I have to slice it in all the various different directions that I can go. But every time I slice it, I'm really looking at f restricted to that direction. So now let's, is this clear? And if some slices go up and some slices go down, then we know we have a saddle type thing. If they all go up, then we know we have a minimum. I guess I didn't draw this case. If they all go down, then we know we have a maximum. There's another situation where maybe somewhere it's flat, then we just don't know. Right? So we have these three cases, and if some slices, okay, yeah, you have a question. So what do I mean by a slice? Right. I mean, this is just a, this is not, I mean, this is math, but this is not formal yet. This is not something you can actually do until you take this idea, oh, and now we want to put it into practice. But this is how you can think about the idea, and now you need to make the idea right. So back in taking a step back from the course, this is usually how people how mathematicians think of math. You get some geometric idea in your head of work, maybe not necessarily geometric, but you get some intuition about the problem. And now we codify this intuition into something that we can actually do. So let's have different kinds of saddles. Yeah, sure. So suppose I take something like x squared plus y squared minus z squared. This is my function f of x, y, z. Well, I can't draw a picture of it because it's a function of three variables to graph. If I'm going to draw it, it lives in R4. But if I fix one of the variables, so for example if I fix, well, so consider some of the slices here. So if I fix x and y, so let's just look at three slices. I'm going to slice, I'm going to look at the z function. So f of 0, 0, z looks like this, right? I mean, this is now a graph where this is z this way and this is f this way and this is actually the origin, but okay. f of 0, 0, z goes down. It's concave down. But f of x, 0, 0 is a parabola that looks like this. It's concave up. And similarly f of 0, y, 0 is also concave up. So this is a saddle in some sense in that it increases in some ways but decreases in other ways. So there are directions that I can perturb from the origin that make it bigger and other directions that make it smaller. So this is a saddle for a four dimensional rider, right? Or if you want to think of one of the three dimensions at this time, then you know this is a saddle but the saddle is moving down and it's up and down. So you have an actual saddle that you're sitting on but it's on a merry-go-round so you're going anywhere. Okay, so it's just a generalization of the notion of the saddle. So we'll call this a saddle because it increases in some ways and decreases in other ways. But this is exactly the idea. I can also slice it f of x, y, 0 where I'm going to denote, sorry, x, x, 0. I'm going to move it x and y in the same way but that will be 2x squared which again will go up like that. But I want to consider all of these variations all at once. We have some machinery to do this but maybe you forgot what it is. So what am I doing? Let me restrict the two dimensions again so that I can draw but it should work in three dimensions. So now, suppose I have my surface here. I have my, let's just make this hole here. I have this hole here sitting over at this point and I want to slice it open in this direction. That is, it's like the line, I don't know x equals 2y or something. Right, so this is x, this is y, this is some direction. How can I codify this slicing? Yeah, I consider a vector in this direction. I consider a unit vector u pointing this way. We know how to take a directional derivative. We didn't just do that for the hell of it, it was a useful thing to do. Right, so here we want to say what happens, I'm going to move back down here in a second, what happens to f in the u direction? Well if I cut it open in the u direction then let's put u here. I get some picture that looks like that. Now that's a function of one variable. Right, this is f of t times u. I get something like that, that's a function of one variable. I can do one variable calculus. So I can just take the second derivative and the first derivative there is now I can take the second one. So let me move back down here, this is why I hate that. So I have some function and if I look at the partial of f with respect to some vector u at some point x naught, so I fixed some unit vector u which is the direction that I want to cut it open. Right, this is the derivative with respect to t of f of t times u. That's just slicing it up. Okay, add x zero. Yeah. Yeah. Just slicing the thing open in the u direction. So now that's a single variable object. This is my u axis. I take t times u, here's x zero. I just do the thing. But I guess it seems like that. And so now I can do single variable calculus. So I can apply the regular second derivative test to this. So that is I can look at derivative with respect to u and then take the derivative with respect to u again. Which we can denote as the second derivative with respect to this. And this is the second derivative in the u direction. Now you have a homework problem like this, but maybe you hated it too much or something. It's kind of messy. So let me just take an example just to emphasize what this is. Say we have f of x, y and x squared y minus y cubed minus y. Okay, and now I'm just going to let u be some arbitrary vector. Let's call it hk. Okay. And here I'm assuming u is a unit vector. So h squared plus k squared is one. Now I just compute the f, the u, which is just the gradient of f. So that will be obtained with respect to x. So that's 2x, y in the x direction. And with respect to y, it's x squared minus 3y squared minus 1. And then I have to dot it with u. Then u, just hk. So this gives me an expression in, well I'm thinking of h and k as fixed. So this is 2x, y, h plus x squared k minus 3y squared k minus k. And this is a new function. Again, thinking of h and k as like, I don't know, 1, 0, or 1 over root 2, 1 over root 2, or any numbers which were on the unit circle. So this is some new function, which is a function of x and 1. So I can take the derivative again. Right? So I can take the partial again. So if I take the partial again, take this partial. I'm going to take the derivative with respect to x, gives me 2yh plus 2xk. And that's gone. Taking the y partial, I get 2xh. That's gone. 1, minus 6, y, k. And that's gone. And I dot this again with hk.  Yes, that's right. 2yh squared plus 4xhk minus 6y. So what does he say? Well, now I can read off all of the second derivatives in all of the directions. Right? If, for example, I want to move along parallel to the x axis, the k is 0 and h is 1. And my derivative is 2y plus 4x and so on. Again, remember, hk lives here somewhere. Choosing a direction to move. So this is capturing how the function changes at every point xy if I move in some combination of h and k. So if, so then now to, well I've erased it already, to recast the second derivative test here, if for every combination, so now I have to be at a certain point in order to check, right? I should really find the critical points of f before I do this game. But if every combination here gives me a positive number, then the thing is concave up and I have a minimum. If every combination gives me a negative number, then I'm concave down, I have a max. If some are positive and some are negative, then I have a set. If lots of them are 0, then I don't. Does this make sense? Yeah. All right. So let me finish this problem. I sort of got my cart ahead of my horse here. So let's find the critical point. So let's now have a problem. I just wanted to, the reason I started with this is I just wanted to remind you how you would calculate the second partial directional derivative, the second directional derivative. There it is. It depends on the vector in a quadratic way, but also on the point x, y. So let's change this problem, but really the same problem. So for, so I want to, how about we just phrase it this way. Find and classify all relative, extreme of this function. x squared y minus y equals y. So certainly the origin is one of them, but so what I did is I did the work to classify, but I didn't find it yet. So to find it, so I'll have a relative extreme, which is saying while the gradient is somewhere, here it is. So that's i e 2 x y is 0 and x square minus 3 y square minus 1 is 0. Those simultaneously. So I just want to solve those simultaneously. They're not linear, but they're not too hard to solve. So here I certainly get critical points, but just looking I can see if x and y are, I'm quite, I shouldn't have 0, 0. Why didn't I have 0, 0? Did I make a mistake? I thought I had 0, 0, but I guess I don't. Oh no, I didn't have 0, 0. Right. That was a different example that I decided not to do. So certainly they're not both 0. So if x is not 0, well let's see if x is, well okay. Either x is 0 or y is 0. Or maybe both. But both doesn't work. So I have either x equals 0 or y equals 0. But it won't be both because if they're both 0, then negative 1 is 0 and that doesn't happen a lot. So I am not both from this first equation. Either x is 0 or y is 0. So now if x is 0, then I have 3 y square plus 1 is 0. Okay, so I think in terms of the one that I did in my office, I transposed a plus and a y. So that doesn't happen much. Right? Negative 3 y square minus y 1 is 0. So that means so y square is 1 over 3 negative, which means that I have a complex group. Right? So there's no reals. So apparently I mis-transcribed the problem because I think I needed a plus here in the original problem. But I was doing good, okay. So there's no real solution. So we just have 2 extreme. The other case is y is 0, then x square minus 1 is 0. So x is plus or minus 1. So I just have 2 critical points to deal with. x is plus 1 and x is minus 1. So my critical points are 1, 0, and 1 is 1, 0. And now I need to decide whether their maxes are measured or needed. And this is not the problem that I worked out before. So we'll see where I go. So I think the problem that I worked out before had a plus here. But I don't want to change the problem. Why? Okay. So what about 1, 0? So at 1, 0, we have the second derivative form here. It's h square, no, 0. All the y's are gone. So I just have 4hk. Second derivative is 4hk. Right? Because y is 0. So I only look at the x term. And so this is sort of a stupid, well, it's a sad thing. So this guy, since I can move around the circle, I could choose, wait a minute, this is 0. This is meaning 4hk. Yeah, x is 1. It's 4xhk, x is 1, so that's 4hk. And unfortunately, this example isn't a good one because, well, sometimes, well, okay, so sometimes this is positive, sometimes it's negative. If h and k are the same sign, it's positive. If they're different signs, it's negative. So some directions, so I have a 7. And the other one is the same. So it was too bad that I made my mistake. The whole point of that example was to have something useful to me. So these are both saddles. Okay? You just have it on here. Okay. So it makes a graph of it, it's nice. If you flip, but if I change one of the signs. If you flip y, it's positive, it's got a min, x, and a 0. Yeah, right. That was the example that I meant, but not the example that I did. If you want, we can flip y cubed to a positive and get everything, which was what I meant. So if we change this to, so should I, the red pin seems to be gone. Okay, so I'll leave it to you. So if I look at the g of x, y is x square y plus y cubed minus y. Then I get four critical points, and I have some already. Are we okay with that? We're good with that. I don't need to beat this horse until it bleeds. It's already dead, so it doesn't matter. Okay. Let me, I guess I already wrote it out. It's sort of obvious. It's not written down, but let me write it down. So the second original test sets. Suppose you have f from r and r, twice differentiable, and you have a critical point x naught, and we have three possibilities. If the second partial with respect to you is always positive for all unit vectors u, then it's always positive. So we have a little bit of nid. If the second partial at x naught is negative for all unit vectors u, then we have a local max. And if the second partial is zero for some, is negative for some, positive for others, you have a set. And then, of course, there's, well, if it's zero for a lot, then the test fails. Right? If it's zero along one line, we're okay, but if it's always zero or something like that, so this doesn't cover all possibilities. Right? We can have it's always positive and sometimes zero, and then we don't know because maybe it flattens out. Right? Does everybody understand that? Yeah, sure. So for example, a function like, I don't know, if I change all of these, if I make that x to the 20th and write it before there, then all of the partials are going to be zero. And there's nothing interesting going on. If I change, if I leave that as a y, then I'm flat in the x direction. I don't know quite what's going on there because I need to take 19 partials as far as I can figure something out. I don't want to take that. Okay? So I want to, so a little time. Now we can sort of specialize this. It's common, right? This theorem works R3, R10, whatever. We have 10 variables, we have two variables, whatever. But we can specialize it to the functions R2 to R. And then we get something a little more calculable. So if we take, we have a function from R2 to R, that is I have f of x, y, z. Then I don't have as many partials to deal with. Right? The gradient only has two vectors like in this case. The gradient either three or more. And so I really only have, so this guy is twice continuously differentiable to the critical point at some point x, y not. Then, well, I can just calculate the second partial. And I have, if you remember, I just have the partial, the two partial with respect to x. I have the mixed partial of the two partial with respect to y. And so, and these are equal because the functions continuously differential. So that means that the mixed partials are equal because the function is nice-ish. And so this is just, since I get two of those, that's the second derivative. I just take all of the partials and I dot it with my u. And so those are just my, my partials there. I miss something. But yeah, I need my u, so I'm sorry. I let it off when I'm dotting. Let me try this again. So my gradient vector is going to be f x x at my point. I'm going to get a u from that. It's called an h and k, so I'm going to get an h squared term out of that. Then I will get f x y. And I'll get an h k term here. So this is from the second partial in the x's and the y's. And then I'll get another one of these with a mixed. And then I will get the last one in the k squared. So that's what the second partial of f is always going to be, something like that. And so now, sort of narrow down what we do to look at this. So we can write a second derivative test just for degree two. So in this case, explain why in a second, you look at the discriminant, which is the product of the xx and the xy, and you subtract off.  Look at that number. Yep. I'll explain in a second. It's from, if you solve the quadratic equation, this is b squared minus 4ac. There's b squared and there's 4ac. I'll write it in just a second. So I look at that. So this is just some number. It's not a derivative. It's discriminant. It's called a deltas. Okay. So I look at that and then I have some possibility. So if delta is positive and either one of these, one of these things is positive, f x x is bigger than zero, or f y y is bigger than zero, then I am in. It's positive and both are negative, right? I just want to make sure I didn't do something wrong. No. Either is negative. Yeah. How can that be either, though? What does it mean? Yeah, I know. They're not disjoint cases. So something's through here. I'm going to assume that they're both negative. I think they're both negative. I'm going to check it when we do the program. So we got to check these conditions. So if both are negative, then I have a max. And then another case is if the discriminant is negative, then I have the discriminant zero out of five. Okay. If the discriminant is zero, then so let's, since something is wrong with what is written in the book, let's figure out one's right. So the book says, or here. And I don't remember, so I have to check it. Again. The both are negative or both are positive. They are the same thing. If they, they both are negative or they both are positive, they are the same thing. What do you mean the same thing? No, they do apply the word, the first, the, whatever it was. They don't apply the word. He might mean that they're product. I mean, either way, they're product. Well, if their product comes out negative, okay. This has to be n, right? Because if one of them's negative and one of them's positive, then the discriminant is negative. And the book says, it has to be n. So either. Right. Either means, check either one. If it's positive, you're cool. Right? Because if this one's positive and the discriminant is positive, it's positive done. Right? Because if this one's negative and the discriminant's positive, then you have some rather interesting arithmetic that you add a negative number and a negative number and somehow you get a positive number. I do that a lot, but something's wrong there. And here if they're both negative, which means you can check either one. Okay. Yes. So he's right. But he's right in a weird way. If either one of them is positive, you're fine. If either one of them is negative, you're fine. Because the other one is also negative for free. As long as the discriminant is positive. So these guys have to, so let's try it this way. Delta bigger than zero means fxx and fyy have the same sign. So this can be an or. Because or means and. You only have to check one of them because they have the same sign. Okay. So let's, so just check. So I could just erase one of these conditions. But it doesn't work. Because one you get for free. Okay. So let's think about how the proof of this is going to go. So if I look at this, well, so because otherwise it just looks like it fell out of the sky. So the proof actually explains where this came from. So if I look at that quantity, I know that since my unit vector is a unit vector, I don't have, I can't, one of them has to be nonzero. So I could pick one of them. So let's look at this quantity. And let's factor out, I don't know, let's say h. So if h is nonzero, h squared, so my second partial is h squared, fxx, I'm going to stop writing the of plus 2 fxy of k over h, not of, that's times plus fyy times, I'm pulling out k over h quantity squared. This is a polynomial in k over h. Right? H squared isn't zero, so it doesn't affect. And now I'm left with this polynomial in k over h. And my question is, what I need to know is, is this always positive? Or is it always negative? Or does it sometimes change sign? Right? I have a possibility, if I think of, these are numbers. Right?  And let's call this b. And let's call this a z squared, where z is k over h. And either this thing looks like up here, and three possibilities. Either this thing is up here somewhere, or it's down here somewhere, or it crosses. But three cases. Either this has a real root, or it doesn't. Well, so we just used the quadratic formula. So if this doesn't have a real root, so the roots here, so the roots, the roots, fxx plus 2fxy, let me just call it z plus fyyz squared equal to zero. The solutions to this are from the, you know, we applied the quadratic formula. Negative 2fxy plus or minus the square root of 4fxy quantity squared minus 4 times this product, those are my solutions. Again, remember these things are numbers. We calculate them, they're numbers. So those are the roots of this equation. And I don't want it happening. So that means having fxy squared minus fyy is negative. So if delta is positive, then I don't have any roots to this equation. And we just need to check whether for any one value of z, like z equals zero, the thing is positive or the thing is negative. So if this thing's positive, all this thing's positive too. So it's always positive, so we're cool. So that's this condition right here. If on the other hand fxx is negative, then it's always negative, and this guy's negative, so we're below, and again we don't have a root, so okay. And if this number delta is not positive, well then it's negative, which means that I have two solutions to this equation over k over h, which means it changes sign, which means I have a sign. So the only case that's a problem for me is if this discriminant here is completely zero. There's lots of this. So then we're okay. So quite creative. All right, so I didn't write out all the words, and you also have to deal with the case where maybe h is zero, then just change all the h's for k and k's for h's. Then we're okay too. All right? Is that good enough to convince you that this proof is okay? And that's where this funny condition comes from. We look at the difference between the product of the second derivative in x, second derivative in y, and the mixed derivative. And if this is a lot bigger than that, we have either a max or a min, but depending on whose positive. Okay. Okay. Get that. Get that. Any questions about this? Because, yeah. Is it, like, if you wrote the partials of the matrix, did the determinant get the same thing? Yes, the discriminant of the Jacobian matrix. I mean, the Hessian. Does the derivative look the same? It's the same. It's the determinant of that partials matrix. It's the same. Right? Because there it is. Right? I have access to the matrix he's talking about. Is this one? It's determinant. You give that. It's exactly the same question. Because what is it, when we're computing the second directional derivative, we're just taking this and we're doting it into hk. Okay. Okay. So I'm going to stop with, that's min kind of problems. Yeah. So if h is zero, use k. So if I use k and I factor out k squared, my equation will be k squared f x x k. Sometimes h over k also models both. So your equation is equally valid. Because they just trade roles. Okay. Right? So because this is symmetric, yeah, just trades roles. So it's okay. So yeah. I mean, yes, you're right. I do have to check k will zero when it's, once you write it down, you see it's the same conditions over one. Other questions? Okay. So, and now we'll, we'll decide the question of max min kind of things. Let me remind you that from, no, two weeks from Wednesday, we have a text, right? Not next Wednesday, Wednesday. Not next Wednesday? No, class next Wednesday. Wait. Yes, of course. It's still a ways away. Okay. It's not an easy, it's still a ways away. Woo, right? We still have, we still have three more, we still have three more classes with me. One class with R10 and then R10. R10 is actually his next. Okay. So it's called inductance. It's an actual R10. It's an actual R10. That's his actual name. It's not a data. Okay.  So let's, let's move on. Now I'm running, now I'm burning up all the time. Okay. So another thing that I need to mention, and it's worth mentioning at this point, we will come back to it. Really kind of long, we belong earlier, but okay. It has other coordinates as well. And these come up in several applications. So let me remind you, should be relatively familiar with X, Y. In plain, this is for R2. We have this one, but then we also have polar coordinates. R and theta, right? So here X is our cosine theta, Y is our cosine theta. So this is convenient for describing some class of curves. We have, we have several analogs of polar coordinates in R3. Right. So in R3, we have sort of two common analogs of polar coordinates. We have cylindrical coordinates, which, so here's my XYZ lamb. And I can do polar coordinates in XY. So say I want to describe this point, since there, I could do polar coordinates here. I want to describe that point so I can think of it this way. So this is R here, and then Z is just behind. Right. So cylindrical coordinates, I specify an angle theta, and a distance in the XY plane R, let's just write this down here, theta is the angle with the X axis. Well, it's really the XZ plane that is the plane Y equals zero. Is the distance from the Z axis and Z is just Z. Okay. So this is one way that we can describe things in cylindrical coordinates. It's just polar coordinates in the XY plane, and then we move them up and down. And it's called cylindrical coordinates because if we fix the radius and let theta and Z vary, yeah. R theta comma Z. Yeah, I don't know that they're okay. Pick an order.  I have no clue which is theta and which is R. So usually in polar coordinates, I would write R equals 2, theta equals 4, and now I know what it is. So similarly here, I don't know who comes first. So just pick one. So sometimes people use one, sometimes they use the last, but we're really thinking here, so let's just write the relationship. Right. Well, maybe it's not a curve. Maybe it's a surface. So here, right, X is R cosine theta, Y is R sine theta, and Z, well, that's just our relationship. If you want to solve for theta in terms of, you know, we can write R tan as long as you choose the right branch. Right. Theta is the inverse tan just Y over X, but you've got to choose the right one. And Z is still just E, and R is X square plus Y square. Right. We can go back. But this is good for describing things which sort of naturally, so as an example of this, a helix, very easy in these coordinates. We just, so in cylindrical coordinates would just be some curve like R is fixed and theta is T, and Z is T. So that's an easy parameterization of helix because here in cylindrical coordinates, I'm over the circle, R is 1. I start off with theta, and T is 0, I'm here, and then I just move up like that with unit speed. It's much cleaner or easier than the other way. So in some sense, this is a natural generalization of polar coordinates that's sort of turned from maybe easier in terms of cylindrical coordinates. Another variation is that, you know, you can go full polar. Yes, I can do spherical coordinates. So spherical coordinates are also quite useful if you're doing something like, I don't know, an astronomy or something like that where you think of the Earth at the origin, and then we're describing something flying around relative to the Earth, and maybe spherical coordinates are our friend. So here, once again, I'm going to draw the same picture. I have my point here, but as an X and Y, I'm going to take this, so I have this angle theta, which is my distance to the X axis, but instead of going up a height Z, I'm going to think of a triangle sitting here, and for some reason that I don't really understand, people usually measure this angle instead of this angle. You can choose either one. This is usually called phi. So I have theta is the angle with the X axis, and phi is the angle from the vertical, the angle from the Z axis rather than the angle from the X, Y, and Y. And then, I don't know, sometimes we call this row. Let's call it row. Row is the distance to the origin. So this gives us another way, and here's our R that we're not using. Some people call row R these labels, this is a green on row. And so in these coordinates, so I guess also maybe in cylindrical a sphere is really easy to describe here. There's a sphere, right? It's just everything distance one from the origin. There's a sphere. And I can let theta and V vary as they need to. I mean, usually, you know, you restrict these guys to be, say, between 0, 0, and pi, and this guy to be. So typically, let me erase this long picture. Typically here, we would take V between 0, pi, and theta between 0 and 2 pi, but you don't have to. That's exactly everything. And we typically take, but don't have to, row positive. And similarly here, typically the quantity of theta between 0 and 2 pi depends either it is or it is positive. But you don't have to, right? If you allow row to be negative, just like in polar coordinates, if you allow R to be negative, you have multiple representations at the same point. One thing to notice is one sort of bad thing in this coordinate system is the origin is represented with lots of things, right? Once row is 0, I have no good definition for theta and V. I have a singularity in this coordinate system at the origin. It's a problem there. And there are other sets of coordinate systems that are useful in, let me not write them, let me just mention them, that are useful in various applications. Like you might have to write toroidal coordinate systems. You might have, you might imagine I'm going to specify some distance from the origin and then I'm going to specify some angle along that. But then rather than growing like a sphere, I might specify something from that circle. So that would give me a different set of coordinates, right? I might fix radius equals 1 or something useful. I might just fix my radius to be 1, and then I'll take a torus. I might describe my place here by saying what angle I take out, go out to that circle of radius 1, say how far out the circle is and go around it. This is useful in different contexts. This one, I think it's not even mentioned in the book, but you know, there are different collections of coordinate systems depending on what is natural for you, what you're trying to describe. So let's try and think about what do these things, so in order to be a good coordinate system, what do we have to have? What is the, in order to describe a patch of R3 in a nice way, really in all of these cases, I'm describing the transformation from x, y, c to, I don't know, rho theta phi space. I have some function here, let's call it t, from however many variables I have in Cartesian coordinates to however many variables I have in my target coordinate systems. And in order to be a good coordinate system, I need to be able to go both ways, so that means that the derivative matrix of t, which is called the Jacobian, needs to be invertible. So to be good, this transformation dt has to be invertible. In this case, it's a three by three matrix, and it has to be invertible every place I care about the coordinates. So it can be nasty far away, but I have to be able to take the inverse, I have to have a nice transformation from one to the other. This is why this is brought up here in this book, because we want to be able to go backwards. We talked about the inverse function theorem, we have an inverse function theorem exactly when our transformation has an inverse. The derivative matrix is invertible. So here, these guys have a problem at zero. Stay away from zero, it's okay. So as long as we stay away from zero, then these are perfectly good coordinate changes. But near zero stuff gets crunched up, weird stuff happens, so we like to stay a little bit away from zero. These coordinate systems are not so good at zero. And that's sort of evidenced by the fact that I have multiple representations for zero. This coordinate change, where does the spherical coordinate change? I didn't even write it down. Oh well, you can figure it out.  You can look at the picture and figure them out. But there's a problem in r is zero, yeah. I thought the spherical coordinates of the ones that have the function of, like, r, theta, theta, not rho, theta. Do you want to call rho r? Okay. No, no, I mean, like, it's defined as, Jim's over here. Oh, I'm sorry. Yeah. So for spherical, we want to know how far away you are from the origin. Some people call this r, some people call this rho. I called it rho to distinguish it from the radius of the inspirations. I think the book maybe even called it r. I don't know. Yeah. Mine probably was a book when I was learning back when there were dinosaurs called it rho. I wish my book was a dinosaur's books. So the whole point of this is really, I just want to make sure that when we pair, the derivative is not zero. I will talk about any ratio next time.


Being connected has always been important in our world. What has changed over time is how we connect with others. As explorers traveled to new lands or pioneers traveled west, they brought the best goods and traditions from their homelands to share with those they met. They took great pride in sharing what they had accomplished and built upon their successes with the new tools that they had at their disposal in the new land. Schools are no different. Over the years, we have found new ways to connect stakeholders outside of our walls with what is going on inside in hopes of creating a positive school culture. We have discovered that having parents involved in a student's life tends to lead to a more successful student experience in school. That's where parent-teacher conferences started. Schools also started stepping out into the community, going to places where people were to show off what they'd been working on. When was the last time you went to a parade that didn't showcase at least one school marching band? In the 1990s, after Al Gore invented the Internet, schools realized that having a presence online allowed parents, both current and potential, the ability to check out their school without having to step foot inside it. There were still face-to-face opportunities to connect with the public, sporting events, music concerts, curriculum nights, but appropriately populated websites allowed adults to get an idea of what the school is about. Fast forward to today, 2015, where, at the intersection of technology and communication, you have social media. Again, the importance of communication hasn't changed, but the tool with which we reach our audience has. Whether we like it or not, a lot of people, but not all, are utilizing social media as a way to interact with a broader audience. According to Facebook's 2015 first quarter earnings announcement, 936 million people check Facebook every day. Schools, companies, anyone can build a network of interested individuals just by taking advantage of the widely used social media platforms. HubSpot, a company that specializes in business marketing, published last year that 84% of participants found increased traffic with as little as 6 hours per week invested in social media marketing. My point in sharing this is not to compare schools to businesses, as we have very different goals. Instead, think about how important marketing is to a business and how little time those businesses report spending on social media. Educators don't need to spend a lot of time on social media in order to see gains. We just need to be consistent with relevant content. So how many different places do your parents and students go for information online? A lot. William Chamberlain, a middle school teacher and self-proclaimed Edgy Punk, brought up this great point during a recent episode of Dads and Ed, a podcast I co-host. We don't need to be every place that every kid is at. This video simply talks about four of them. Those four will change, but as I mentioned earlier, the need for us to communicate will not. Before I dive into some suggestions, I feel compelled to mention that nothing I say here overrides your district's acceptable use policy, or AUP. Please read it and talk with your administrator prior to starting a school-focused social media presence. Due to people not using common sense, districts have implemented AUPs as a way to cover the districts behind should one of their staff members do something dumb. If you ever want an example, just read the news. There are far too many both inside and outside of education. Let's be clear, though. Social media didn't cause these issues. How the person involved acted or what they did caused the problem. There are four main online spaces that I would encourage you or your school district to explore. Facebook, Instagram, Twitter, and Flipboard. From an entire school district perspective, your audience is in all those places, so I encourage you to dip your foot into them. Who takes care of that depends on the size of your district and the staff available. Towards the end of the video, we will talk about how some of those tools can work in tandem with each other, so the lifting isn't as heavy. As a classroom teacher, I would not expect you to do all four. If you are not currently doing any of them, I would most definitely pick one to start with and go from there. Where and what you teach greatly influences what I would suggest to each of you. So while I won't give you, the person who is listening, a specific recommendation, I hope that as you will listen, you will pick up on a place to start. I would also strongly suggest that you ask around. If your intended audience is students, ask them what platform they would interact with you on. If your target audience is parents, ask them either via a quick Google form, piece of paper at conferences, or see if your district has used a tool like Brightbytes to research what social media tools parents are using. Simply asking the question could save you a lot of himming and hawing over where to begin. Facebook is by far still the most populated online social media tool out there. Families of your students make up a large number of Facebook users. Even though it is starting to become not cool to be on Facebook, research in our district shows that students still check their accounts on a regular basis. The benefit of Facebook is that you can easily post pictures, video, text, and links without the limitations of other networks. It is also the most common. Therefore, you are likely to have more engagement because your audience would be most familiar with it. Likes and commenting in Facebook help it to show up in other people's feeds, meaning more people have the opportunity to look and interact with what you post. That's not always the case with other social media tools. There are a couple ways that you can go about creating a presence on Facebook. One way is to create a separate profile. Using usually your school email, teachers will set up a Mr. Allen or Mrs. Smith professional account and will friend parents just like you do with a regular account. At the end of the year, you clean out your friends and then friend the new parents the next year. The drawback of this route is that if you have a personal Facebook account, you will be logging in and out of Facebook regularly. Another way for classrooms to use Facebook is to create a Facebook group. Many schools suggest secret or closed groups to maintain some privacy. This can be done either from your professional Facebook or your regular personal Facebook account. The Facebook group allows most of the same features as a professional profile. Most districts will require, or all but require, you to lock down your personal Facebook account if you choose to use it. I've never held a strong preference as to which account you should use. The last option is creating a Facebook page. This is generally geared toward school districts, buildings, or after-school activities that use Facebook to promote themselves. Pages are designed to be public sites that allow for dialogue back and forth between you and your audience. Another plus for a group or page is that they allow for multiple administrators, meaning you can share the wealth when it comes to populating your online presence. If you monitor the fastest growing social networks, you'll notice Instagram has regularly been at or near the top of that list. Where it ranks sometimes depends on the time of year or what metrics different websites use. Regardless, Instagram is quickly becoming popular because of its ease of use and the fact that it focuses on pictures. Say what you want about what some people post on it. Instagram can be a powerful tool for quick glimpses into a classroom along with a short summary of what we are looking at. Unlike Facebook, it isn't a great way to share resources or links. It's simply a great way to share pictures. Also, unlike Facebook, it's got a pretty simple privacy settings. Whether private or you're not. Because Instagram is owned by Facebook, they work pretty well together. In the Instagram settings, you can set it up to post to a profile or a page, but not a group. So if you create a personal profile that you have friended parents on, it's very easy to make one post in Instagram also post in Facebook. Probably the biggest downfall to Instagram is the avenues for posting. Facebook has a bunch of different apps that allow you to post to your feed. Instagram has two. One is Instagram itself, and the other is the two-and-a-half star-rated Hipstomatic app. Hipstomatic only posts. It does not show you your stream or any of your comments or likes. You can use the web to see likes and make comments, but you can't post your Instagram feed from the web. Twitter allows you to have multiple accounts on the free Twitter app, but Instagram makes you sign out of one account and then sign back in as a second account. So while it's simple to use, it takes some planning to manage multiple accounts if you have them. You may say, I don't have time for this. Who said you had to do it? Philip Cummings, a teacher in Memphis, has a chief Instagram officer, aka CIO, in his classroom. Regardless of the tool you decide on, get the kids involved in sharing your story. If you are in a primary classroom, maybe you make it a group activity prior to the end of the day. Maybe it's a job that middle school students have to apply for in your class. There are many ways to do it that don't involve you being the only one. Twitter is another social media app that has taken the world by storm. From the hashtags game on Jimmy Fallon to resource sharing in weekly chats like KinderChat, Twitter has integrated itself into many different social arenas. Users on Twitter can follow specific accounts which show up in their streams similar to Facebook. Hashtags are used as a way to group similar thoughts or topics together and can be another great place to find like-minded people to follow. Craig Madura, who you can find on Twitter, at Mr. Madura, compares hashtags to TV channels. Find ones that interest you, and use a service like TweetDeck that lets you access them quickly. Conversations on Twitter can be started around 140 character posts, although it's difficult to get too in-depth. The lack of depth hasn't stopped Twitter from being a great place to reside. In a secondary classroom, teachers can use it to post assignments or have their own chats to get ready for tests, while extracurricular clubs and groups use Twitter to share updates and inspirational messages. Even in the elementary, a classroom account can be used to tweet out student thinking or a summary of the day's activities. Whether parents have a Twitter account or not, they can still check the class's public Twitter feed. If you have parents who don't want their kids online, those students can be excluded from participating in the post or getting that job in the classroom. Twitter does allow you to have multiple accounts linked to a single free app, so switching back and forth is very easy on a mobile device. TweetDeck is also a great web tool for following multiple streams of information by creating columns for different accounts or search topics. Finally, how do we get all of that information to people who may not be on all of those platforms? There are a few different ways. Creating a Flipboard magazine has been my favorite tool for combining social media feeds, newspaper articles, TV news clips, as well as, and most importantly, the student and parent perspective of district happenings into a single place. Users can access Flipboard from a free mobile app or via any web browser. We have also added a widget on our district website, so if you visit the website, you can quickly see the latest information about us without us having to update the website. You can invite multiple people to contribute to your magazine, further spreading out the workload. Content is added to your magazine either through a Chrome extension or share buttons on mobile devices that have the Flipboard app installed. What you get is a beautiful looking, no cost magazine that takes very little effort on your end to maintain. Another tip I need to share is ways to automate your posts. If you go to Facebook.com slash Twitter, you can have posts from your Facebook profile or any pages that you are an admin of automatically linked to a Twitter account. Every time you post, it goes to Twitter. If you are over 140 characters, it will include a link to your Facebook page. Many schools focus on their Facebook page and essentially let it spill over to their Twitter feed. That's fine. Just don't forget to be on Twitter and interact with users there. You can also go the opposite way. If you go to Twitter.com, navigate to your settings, you'll see an app section on the left hand side. There you can connect your Facebook page to your Twitter account. That's great, but make sure to just pick one of those so that you don't create an infinite loop of the same post. Decide which one you prefer to spend your time and connect there. With Instagram, you can go in the app settings and link other social media accounts. It's not automatic, but it's just a click of a button to post to those other sites. All of that is great, but if you can't find exactly what you need, I recommend you check out If This Then That, that ties your social media profiles together. With IFTTT, you can create recipes that say, if something happens here, do something over there. For example, you can set up a recipe so that anytime you post something to Instagram, a copy of the picture is uploaded to Flickr. Or, if you don't want it to happen all the time, create a recipe that says, if I use a certain hashtag, do this. For our district Twitter account, I have set up one that says, if my tweet includes the hashtag FB, create a post on our Facebook page. The nice thing is you don't always have to know what you're looking for when you go to ifttt.com. You can browse by the hundreds of channels they have to see how other people are using the service. It's a great resource to help you save time. As I said at the beginning, being connected with community stakeholders is a very important piece of the educational environment. It's an essential piece to create a successful, positive learning culture in your school district. Someday, even Facebook will go the way of the Conestoga Wagon, no longer needed but held in historically high regard. Something new will someday take its place and something new after that. We will always have a desire to communicate. It will continue to be a necessity. Hopefully this session has given you some ideas on how to utilize technology effectively for yourself, your parents, and your students.


My name is Anselmo Ferreira. I am PhD in computer science and I'm currently an MSCA fellow at University of Siena. My research activities involve the development of computer vision and machine learning techniques to authentication of manufactured products. In other words, we develop computational techniques to authenticate manufactured products by simply analyzing the QR codes, the 2D bar codes that identify these products. I decided to apply when I first met Professor Moro Barney, who is my supervisor, when he did a technical visit to the laboratory that I worked at some time ago in China. So, basically I talked with him, he introduced this research topic that in some sense I was already working with and then we decided to write the project together. I decided to apply because first of all I know the importance of the research, the specific research for the future because of the status of the fellowship. Of course, he is one of the most important fellowships of the world and also because of the knowledge, influence and importance of the supervisor, of course, which I truly believe that will push my career to the top. The support of my supervisor, Professor Moro Barney and his staff was crucial for me to get that project accepted. Professor Barney helped me with his experience and contacts and his team helped me with other important aspects of the project, such as the career planning. I believe the highest challenge in writing these projects was the amount of information we had to put in a very small project. And I believe that this was a very good experience to make all my points clear in such a small project. So, I believe that Professor Barney and his team helped me brilliantly in these aspects. What I most liked, of course, in writing the proposal with Professor Barney and his team was the trust, the project development tracking by Professor Moro Barney and his team, and of course their dedication to write the project together with me. So, we had weekly meetings and all the progress of the project was tracked by Professor Barney and his team. So, I truly appreciate that experience and I surely recommend other researchers to contact University of Siena and especially for the ones who have the research topic similar to mine to contact Professor Moro Barney. Thank you so much.