randomly assembled team. I'll comment more on the teams in a bit, but let me begin today by doing a little bit of review of where we've gone from so far and where we're headed to today. So the theme of today's class is going to be how to set up and solve problems involving electric charges that are either the sources if they're positive or the recipients if they're negative of electric fields. And this will build on the introductory material from the reading and from the video from last time. So I apologize as I comment to somebody last time I have a face for the radio and a voice for the deaf. So I apologize if my voice puts you to sleep. The good news is is that when you're watching the videos you can put them on at night just before you fall asleep and you'll go out just like that. Just blow yourself right to sleep. Okay. All right so a few concepts here that I'd like to review. First of all fundamental to the course is this thing called electric charge. It says it in the book and I'll repeat it here. Check the team rosters as you come and find out whether you should sit in alphas in the back, golf is in the front. Okay. A through G. Electric charge is the source of electric force and electric charges respond to that force. And we'll explore responses of electric charges in depth starting with a video that will be assigned on Thursday to watch. Nobody knows what electric charge is. I'm not kidding about that. We've been studying it for a very long time. We have an outstanding mathematical description of it but absolutely nobody knows why electric charge exists in the first place and whether or not it connects to other kinds of charges that we've since then discovered in nature. That's a frontier question for the field right now. There's definitely at least one Nobel Prize behind answering that question. It seems so simple. One of the things I want to encourage as you think about physics is it's important to have the math skills of a college student of the curiosity of a five-year-old when it comes to the cosmos. Okay. The cosmos will challenge you to do detailed descriptions but it invites you to ask seemingly simple questions that have deceptively complex answers. But once you can answer those questions you understand something deep maybe for the first time for our species about the cosmos. Okay. So electric charges are the source and they respond to electric force. Electric force like all forces is a vector. It is magnitude and direction. This force is described by a law, Coulomb's law. It's a mathematical relationship first worked out fully by Charles Augustin de Coulomb, French as you can figure out. And that we kind of played around with last time you're playing around with this more in the homework right now. Okay. The homework this week will be more oriented toward electric fields and forces on charges due to electric fields. But right now we're just beginning to explore the force itself and how one constructs it from charges. Okay. Let's see here. So some class announcements. The next assignment you're going to read chapter 22-3 to 22-5. This will cover the electric fields of more complex objects like a dipole which you'll learn about in the reading and you'll learn about in the lecture video. But also it will lead into very complex shapes which I won't do in the lecture video. I'll save an exercise in complex shapes for Thursday because what I want to do is I want to use this to do a little calculus review. Okay. Have the homeworks. You're not graded on homework zero. I use it to assess and I want you to use it to assess your base knowledge in mathematics coming into the course. This is your chance to find out where you're weak and shore that up. And if that means asking me questions outside of class about studying math or how to review some of the math concepts, please do that. So you'll have a video to watch on simpler and more complex distributions of electric charge and how those fields look, how you build the fields from that. Homework one was assigned last Thursday. It's due this Thursday by 9.30 a.m. Numerical answers go in wildly plus. You should write up your solutions to every single problem though neatly. Okay. And like you did for homework zero if there's the TA made a comment like, wow, this is really organized or this is very neat. You're good. Okay.  Do the best you can. But try to clean up your organization of thoughts a little bit for the homework when you write this up. Make sure you follow those written homework policy guidelines and then the TA will pick one consistent problem for all of you to grade randomly. All right. So you don't know in advance what's being graded which is why everything has to be handed in. I just before class sent around a link to a poll. The link is here in the slides, which I'll post later today. It's a doodle poll. We're going to use this to figure out whether or not there are some hours available for people who cannot make my office hours that the teaching assistant or I could cover and fill to give you more opportunities to meet with instructors for the course. Okay. So I would please ask only those of you that can't make my Monday and Wednesday office hours. You're the ones that should participate in this. Other people are welcome to but let's get these underserved individuals first and then we'll maybe open it up a little bit and see if those times work for other people as well. All right. So please respond as soon as possible. Like before Wednesday would be nice. Okay. All right. Okay. Finally, let me make a comment on the team. So you came in, you looked at the rosters on the wall. Perfect. That worked out great. Flo is timing from an instructor. You know what row you're supposed to sit in? Alpha in the back, golf in the front. It's the nato-fanetic alphabet for A through G. Those are not your actual team names. You all should figure out what team name you actually want. Okay. Now, you may not be happy with your team assignment and I don't care why. I don't. I don't want to know the reason. But if you're unhappy with your team assignment and all you have to do is notify me in writing before Thursday. Okay. Before class on Thursday so I can try to make adjustments to the team roster and I will assign you to another randomly selected team of the remaining six. There are seven teams. Okay. There should be five people per team.  If you're not happy, just say so in email and I'll assign you to one of the other six. Okay. And we'll kind of go from there. But you know, not more than one or two requests please. And then I know you're trying to pick the team you're on. All right. So that's it. You have to sort of, till Thursday beginning of class to let me know about that because I'd like to finalize the teams on Thursday so that your teams can actually start to meet. So what's your team assignment? Remember, the team's job is to take a look at the grand challenge problem which is linked from the course website. You have basically the whole semester to work on this. And your job for now, your assignment for the team this week is choose a name. I want it to be polite and respectful. And I want all members of the team, all five members of the team to agree on it. You're going to do that starting on Friday when the teams have basically settled. Okay. And then I want an email to me. And then I'll have final veto power on the name. And I will use the urban dictionary if required to look up a word. So don't try.  Okay. So start meeting with your team once per week outside of class. You should initiate a conversation amongst your teammates, exchange emails. You could do that today, maybe while we're working on problems together. Okay. So in the latter half of the class, I want you to start discussing how recent lectures and reading and videos, given the information you're given in the problem, might inform an attempted solution to the problem. Remember, your goal in the grand challenge problem is to identify a possible outcome and then calculate that outcome. Tell me about it. How much stuff is involved? How much force is involved? How much energy is involved? Is it bad or is the patient not going to notice this outcome? Okay. So this is a chance for you to do a little creative thought. But that creative thought at the end of the day must have calculations that guide the answers to the problem. Okay. And take a look again at the grand challenge solution. I'll keep reminding you as we go through the class what I'm expecting the teams to be doing. And if your team's having any problems meeting outside of class or anything like that, just say so. And I will kick in the pants. Okay. You're going to meet with me in February, probably later in February, as we get closer to the first exam. As a team, and I'm going to ask you some questions that shouldn't take more than 15 or 20 minutes to meet as a team. So we'll have to iterate on times that are good for everybody. You might have to be in an evening or something like that. But we'll figure it out. And I want to hear how your team has been doing. What's your dynamic? Like, what kind of ideas have you come up with? You don't have to write anything down right now. We're early in this process. I just want you to be generating ideas that you could later do calculations for. Okay. And I'm working on my own grand challenge problem. Actually, one of the graduate students gave me a great idea. So he's going to get to be listed as a collaborator on my grand challenge write up. And I'm going to be also doing a write up that I will give to you guys about a third of the way through the class. So you can see what I expect this write up to look like in terms of style content and so forth. And I will make a template available based on that write up that the general editor, the lead editor in your team could use as the starting point for your write up. You don't have to use my template, but it does have to follow the guidelines in the grand challenge requirements. And so I will implement those guidelines in the template automatically. You don't have to do anything. Okay. So I think that's it. Okay. So any questions before we do today's quiz? All right. So books, notebooks, all that good stuff, put them away. Again, these seating arrangements are not permanent. I just want you to be near your team today. I want members of your team to start working together. So hand these down and face down. Okay. So I'd like to get as quickly as possible into problem solving today, but I also thought it would be useful to demonstrate some electric field effects. Okay. So answers to the quiz questions, though, first, who's credited with developing the field concept to describe the electric force? Faraday. Yeah. Okay. So Faraday is the correct answer. Michael Faraday, he'll come up again in the class. We're going to see him at least one more time. He's important for a reason because he did a lot of stuff, but all these other people did too. So, all right. Which of these is a true statement about the electric field of a point charge? One, two, three, or four. Anybody remember what they put down? Four. The electric field force described by a vector? Yep. It's a vector two. Okay. I put that in there just to rinse and repeat. So, okay. And then finally, which of these are the units describing electric field strength? Four. Newton's per Coulomb, right? It's force per unit charge, force per unit charge. And it's a great concept. Electric field is very useful because you don't have to know what charge or charges are being acted upon by the charge that's emitting the electric field or receiving the electric field lines if it's a negative charge. So it's a very handy concept. Okay. So before we get into problem solving, let's electrocute me. How's that sound? Does that sound like fun? All right. So I have all kinds of dangerous toys here and they will no doubt cause interference with the equipment here, but I will do my best. So let me close that. Cut that down and bring this up. There we go. All right. So these things are best done in low light. Let's see how that works. There we go. Okay. So I have here the first dangerous toy that I'm going to talk about today and that is something called a Vandegraaff generator. It's a very simple way to build up a very large electric charge and thereby a very large electric field. This electric field will be strong enough to break down air. So I will generate a mini lightning storm with this thing. It will be short in range. In order for lightning to break down, I have to build up a corresponding charge, maybe just a few centimeters or a few inches away from the surface of this once it's charged. And that will be enough to cause a very strong field in the intervening space, which will then cause nitrogen molecules to rip apart ion eyes and turn into a perfect conductor. That's bad. In a lightning storm, if you're standing any place where that's about to happen, you're probably at the very least going to catch on fire. And at the very worst, have your heart stop and you're going to die. Okay. So it's bad either way. But actually the most common medical consequence of getting struck by lightning is burns, severe burns. Your skin, as we'll learn later, is unfortunately a decent conductor. You'll see that on me today, actually. And if it gets a little wet, like in a rainstorm, and you got sweat and salt on your skin, then it's even more conductive. And what will happen is that the air around you, when a lightning strike occurs right on top of you, that will turn into a perfect conductor. And you'll get something called flash over, where all the energy of the lightning strike goes around your body and ignites it on fire. Okay, it's bad. It's not a pleasant outcome. But these severe, high degree burns are the ones that the hospital emergency room is likely to see.  So if the strike goes in your arm and out your leg, you'll probably have entry and exit burns and tissue burned all the way down. So burns are the most common thing. It's a bit rarer to simply have it stop your heart, although that's obviously a very obvious outcome since your heart's an electrical device, and it relies on a reliable flow of electricity to function. So what I'm going to do is I'm going to do the vantograph first, but I don't want to forget to do this later. So I'm going to hook this up to ground. Okay, so let's crank this thing up. I'm going to regret this, I promise you that. So I have some some wands here. Okay, one has a sharp tip. And the reason that you have a sharp tip on a device is because if I put this near, if once I charge this up, if I put this tip nearby, all of this is a conductor, all the corresponding free charges will either move, if this is a positive field, the electrons will move to the tip and build up there, trying to get over to this positive electric charge. If this is a negative electric charge, the electrons will all move this way and leave a corresponding positive charge on the tip. But either way, the tip becomes a very strong high charge location, almost a little point in space. And so this gives you some spectacular lightning as a result. This is just another ball, it's a smaller one. Same idea though, the point of closest approach to the vantograph generator will build up the most charge, and I should be able to get lightning to jump the gap. So with that in mind, I'm going to turn, actually let me do this, just so you can see how this works. Okay, everyone's retinas are going to fry now. So I'm going to flip the power on. Oh, I should plug it in first. Lesson 101 of electrical gadgets, plug it in. Okay. Power's on, nothing's happening. The vantograph generator is basically a giant triboelectric effect generator. It's got a rubber belt in it that moves past some metal brushes that are attached to the surface of the sphere. As the rubber moves by, it soaks up electrons and it deposits them down here, which should be grounded somewhere through the plug. So there's just a motor in here that moves this thin rubber belt and it uses friction to build up charge on the sphere. Now the way you're going to see that charge build up is this thing's going to develop hair frays. So it's got little hairs on it, these little strings. And you should have a good view of this on the camera up there. All right. So I'm going to crank up the speed a little bit here. It's pretty unimpressive at first. I have to get it moving. There we go. So now the belt is moving, you can kind of see it moving right here. Okay. And you see we're building up a charge. It's slow, but I can, I can crank that up. We can make this go faster. We have the power. All right. Let's keep going here. Yeah. Now this sounds dangerous. All right.  Oh, hear that? So that little hair right there is close enough to that conductor.  So that's air breaking down. So that's a lightning strike. Now, does anybody in the, I should have asked this before. Does anybody in the, yeah, you mean back? That's smart. Anyone in the front have any conditions of which I should be aware that you shouldn't be near an electrical gadget? Okay, great. So we're all going to be just fine then. So right now we've got a little quiet lightning over here. You can't see it, but you can hear it. All right. So I'm going to turn the lights off. Okay. And actually, nice that that one back there was off. There we go. Do this over here. Okay, you can see now, can people generally see? It's probably hard to see on the camera view up here, but it's not a great camera I have on this thing right now. But you can probably see the little flashes like we'll let it build up some charge. And then like that. Let me try this, this nasty thing here. Regret this again out. And well, I'm going to regret this too. That was a good one. Okay, I'm going to turn that down. Hey, I'm nothing if not willing to electrocute myself for your pleasure. Now what's cool about this right is I've stopped the belt, but that charge is being held. There's not a lot of leakage off of the sphere. And you can tell because the strings are still sticking out. Okay. But I can drain it off. Who'd like to see me do that? All right.  I wasn't so bad. Okay, so I become the path to ground that literally the ground of the earth is a great place to soak up extra charge. And by by touching the metal piping, which connects to ground someplace in this building, and then me touching the sphere, I can drain that charge off and now it's electrically neutral again. Okay, so no harm from this anymore. And the whole shell seems to be charge free. So I'm not going to get zapped anymore. Okay, so I am curious, did anybody in the front row feel anything when that field really cranked up? Would anyone in the front row like to feel something? Anyone want to come up here and feel what the electric field feels like when it's strong? I'm not going to ask you to touch it. Just put your hand near it. No one? Okay. Yeah, Jody? Okay, you're ready to have another sick day apparently. Excellent. All right. So go ahead and prime this. Now for now, I want you to just stand over by the end of the row. Okay. Let me see how close you should get. It's good. Actually, what you do is you kind of wave your hand right in front of one of these hairs. And you'll see the electric field lines are now attaching to the charges in my hand. And I can now move that string around just a little bit. Just look at that so I can disrupt the electric field. All right, so I wouldn't get more than a foot close. But you'll feel it tingling in your hand. Okay, so just go slow. You don't have your ring, my head written, so you're probably okay. And then just move your hand around. Yeah, kind of tingly, right? Yeah. Careful. Remember, it's hungry and it wants to feed on your electrons. Okay, let's give a round of applause. All right. And because I need to live in regret more. There we go. That switch is deaf. There we go. Well, that'll be twitching all day. So that's good. All right.  Come on. There you go. All right, so let's move this beast out of the way. Now I have another monster over here. This thing is called a Tesla coil. As you can imagine, invented by somebody named Nikola Tesla, who gets a lot of press on the internet for things he probably actually didn't do. But everybody views him as like a free energy hero. Although, if that were true, I wouldn't be having to drive around in a battery powered car. All right, so let me, this thing is on once it's plugged in. Okay. So, okay, that's not a good sound. Now, I don't know if anybody can see this, but let me see. See that blue glow? That's called a corona. Right now, this thing is making ozone. The electric field is so high, it's initiating a chemical reaction at the tip that's making ozone. But that little purple light off the end is something called the corona effect. And well, let's see what happens when I do this. Hello. And I'm a Star Wars fan. This is about the closest I'm ever going to get to being the Emperor shooting lightning out of his hand. So, pretty neat, huh? All right, so that is a lot of electric charge. That is a lot of electric field. It takes about 30 megavolts per meter or so to break down air. We'll learn what the volt is later. It's a convenient unit that you can use to measure electric fields when combined with distance. But basically, once you achieve that, that electric field and air, you can completely physically change the composition of the air from inert neutral molecules to something far more conductive. And well, that's bad. Okay, that's not good for the air. Can you kill someone with that? No, and I know this because I've electrocuted myself with it. So, this is, we'll learn more about this in a bit. This is a high voltage but low electric current device, okay? So, it's not the voltage that kills you. It's basically the number of electrons per second that can be pushed through the system by the device. Your heart can be stopped by a fairly low current of just at the level of milliamps or so. We'll learn more about the, the amp has been mentioned in the book already. I haven't talked about it in class and we'll get to it when we talk about moving charges and electric current. But this thing is a high voltage low current device and I accidentally electrocuted myself with it one day when I was trying to unplug it. It was too close to a metal shelf that's a metal drawer that's in the back and I put my hand on the drawer and a spark jumped from this to the drawer and then through my hand and through my foot to the ground.  I've, I've actually plugged myself directly into wall current before and I thought that was much less pleasant actually. So although it's not lethal, it's very painful. Okay. All right.  None of them in college, it turns out. I made all those before college and after college. Go figure. Okay. Let me bring this up for the lecture videos. All right. So now let's do something infinitely more boring. I'm sorry. I just had to say it. You and I were all, we were all thinking it. Come on. And that's let's let's set up and solve problems involving electric fields. Let's start to exercise this concept a little bit. So give me just one second here. Okay. So here are some of the basic concepts that you should have read about or learned about in the video. First of all, electric charge is the source of electric force. We know that already. And electric charges respond to that force. We know that already. Okay. But the electric field is the way in which we describe how one charge reaches out through space without physical contact and influences another. And in physics by influence, I mean exert a force and thereby a corresponding acceleration which can cause a change in the state of motion. That's the physicsy way of saying effects. Okay. Those are the things we can quantify in physics. That's the stuff we care about is force, acceleration, velocity and so forth, displacement. The units of electric field as are, Newton's per Coulomb, I'll fix that type a little later, that's force per unit charge. And again, as I said earlier, this is great because now we can just consider the charge or distribution of charge that's generating the electric field. We don't have to care anymore about what's the size of the little charge we're using to probe that force field anymore. So this allows us to define that force field independent of the other charges upon which it acts. And we'll exercise that concept today. Okay. So here's the problem I want to set up and solve with you. And I have a lot of numbers written down here, so I'll reference this as we go. But this is the, this is a basic sort of textbook style blah, blah, boring electric field problem. Okay. You should recognize this game board. This is from the computer simulation of charges and force that I showed in the first lecture that you had to watch. It's a demonstrator called Electric Field of Dreams. You can tell it was written by physicists and educators. You can put charges on the game board and you can, you can let time pass and you can watch them bounce around and repel or attract each other. You can create little like orbital motions if you set the charges and their initial velocities just right.  Okay. I've placed two charges statically so that they're not moving, one on the corner of the grid and one on the opposite corner of the grid. And, you know, you can already see, actually I have the sign of the charge wrong, that was supposed to be negative. So I will, I'll just correct that as I go and I'll fix it on the slides. But the electric field lines point in, the ones closest to the charge, all point in to the charge. And from our schematic representation of force fields around charges, that means this is a negative charge. It's a recipient, an endpoint for electric field lines. Similarly, that other charge is also negative. And the question that we want to answer is, what is the total electric field at that green point P? Okay. Point P is this recurring point that I'll put in problems, the book puts it in problems and so forth. So you're supposed to measure the electric field of these combined charges at a single point in space and we'll label that point P for point. Okay. The green dot there in the game board. Now I've set up a couple of useful pieces of information. The space between these adjacent points horizontally or vertically is all one nanometer. Okay. So the grid point spacing is 1.0 nanometer. And the reason I put this in nanometers is I'd like to do a unit conversion exercise at the end to demonstrate where you have to sometimes be careful with unit conversions. I'm going to leave this in nanometers for the time being. But the standard units of all the stuff we deal with are meters, kilograms, and seconds, m, k, s. Okay. So at the end of a problem, you know, the constants, for instance, like k, have been defined in the meter, kilogram, second standard. And so at the end of a problem, if you still have nanometers floating around or milliseconds floating around, you've got to convert those to seconds and meters using the appropriate powers of 10. All right. I'll do a little exercise at the end of this. Okay. So we have two negative charges and they both have the same magnitude charge. So let me correct this on the board. So q1 equals q2 equals negative 2.5 times 10 to the, that's a minus six. It's tiny on the screen. Cool arms. 10 to the minus six cool arms. So I'll just rewrite that on the board. All right. And again, I wrote all these notes up on a tablet PC, so I can correct these very quickly by putting minus on some. Okay. These are point charges. And so the first piece of information that we can assume after writing down the information that we have been given is what the form will be of each charge's electric field by itself. And that will be the electric field of a single point charge. So let's call, let's see, how did I label this? This is one in the lower left. That's two in the upper right. So the electric field of E1 at point P will be the constant k. We already know what that is, so that's free information. The charge that is either the emitter or the recipient of those electric field lines, which in this case is q1, divided by the distance from that charge to the point P. So the source of the electric field to the place we're measuring it. That's the convention. The source of the force is the origin of the distance vector for a specific charge. The end of that arrow will be wherever you're measuring the force or in this case the electric field. Okay. So we're going to go from one to point P, and that distance is squared. And then finally we have this, which indicates the unit vector that points in that direction. So the unit vector here has to go, it has to point in a direction that indicates from this charge to the point P and has length of one. The full vector has the full length of this distance and points to the green dot. Okay. So those are the basic things you want to start with an electric field problem. First of all, what am I given? I'm given the grid point spacing so I can figure out distances in this game board. I'm given the charges and they're both the same magnitude and they're both negative in sign. So they're both negative charges. And I can write down immediately the electric fields schematically for both charges because they're points. So similarly E2 will be this. Okay. I don't even have to think. I can just write it down and change the indices. Yeah. When you said the full vector points at the green dot. Yeah. But that also is saying that's the point like back. I'll sketch it. Yeah. But it always goes from the charge whose electric field you're probing to the place where you're probing it. And it's one of these conventions that you just have to kind of force yourself to memorize. So it's always the source to where you're measuring it or the source to the charge that's being acted upon. Okay. And that's the convention. You never flip the direction because it's a negative charge. Let the sign of the charge do that for you later. Okay. The sign of the charge will do that work for you for free later in the problem. But the convention just for this vector, let me write this down here. r vector 1 comma p or r vector 2 comma p is that it points from the charge, which is q1 in this case, to the point p. Always from the source of the field to wherever you're measuring the field. And when Coulomb's law problems is always from the charge that's doing the acting, you know, causing the force to the charge that's being acted upon. So it's the same convention. It's just worded differently. Okay. But you just memorize that and stick with it and never flip it just because the charge is negative or positive. So, yeah. It said something in the book about how you always have to consider the positive charge or the force in the electric field that's causing the positive charge. Well, okay. So the way that you originally define electric field is by imagining an infinitesimal little positive charge called the test charge that you move around the charge whose field you're probing. And it's so tiny that its electric field doesn't really disturb the electric field of the other charge. And by convention, that's a positive charge that you use to probe it. But once you do that, then you define force per unit charge and you don't have to care anymore. Okay. So that's already built into these definitions here and here. So that is a hidden assumption here. That is true. Okay. And it's because we're stuck with this convention because of Ben Franklin calling positive charge the thing we should reference. But actually, most of the charges that move around in nature are electrons and they're negative. So he just got that wrong because he didn't know about the electron. That wasn't discovered for almost 300 more years. So, okay, 250 years. Okay. And then similarly, our two vector in its full glory with length and direction points from q2 to p. Okay. So the next thing we want to do is try to figure out information like what is this vector r1p? What is this vector r2p? If we can figure things like that out, then we can get its length, we can get its direction, and we can solve this problem. All right. So let me slide this over. Now, we have a problem mechanically in here last semester where some of these boards jammed. So we'll just kind of wing it and see what happens. All right. Let me put a drawing just to help. So we have the negative charge. We have the other negative charge. So here's q1 and here's q2. Okay. And I'm just roughly going to sketch where this point p is sort of here. So let's just sketch r1 and r2. So r1 will start on q1 and it will end at p. So it will be a vector that looks like this. And this is r1p. And r2p will start on charge 2 and end at p. So it will start here and it will end here. All right. Well, if I'm going to actually figure out what these components of the vector are so that I can write it down using like the grid point spacing, I need some coordinate axes. I have to choose a coordinate system. In this case, I know I'm going to use Cartesian because everything on this game board is square. It's just convenient to use Cartesian coordinates when you're clearly dealing with vertical directions and horizontal directions. If you're dealing with things going around in a circle, then you use circular coordinates. We'll come to that in a bit, but we're not there yet. Okay. So I need to define an origin. I chose, personally, you don't have to make this choice, but I chose to put my origin up here. And there's no good reason for that. I just decided to do it that way. So my notes will have the origin there. But you could put it here. You could put it halfway along the x-axis and halfway up or halfway between the positive charges on the x-axis and halfway up the vertical distance from the two charges to your choice. Okay, whatever you like to do. But I decided to define my x-axis up here and my y-axis goes right through it. So here's x. Here's y. Personal choice. There's no right or wrong on this. Just whatever you choose, stick with it. Okay, stick with it. It's important to make commitments in life. You might as well commit to something easy like a coordinate system. You know, it's not going to betray you. Okay, so well, it could betray you, but mostly it'll be your fault. So just choose wisely. Now, I sat down last night and I checked this like three times because I really doubted my ability to count. But what I found out was that the distance from here to the point P along the x-axis is 12 of those grid units in distance. Okay? And the horizontal distance from the point P to the other charge was a measly two units. All right, so just thinking horizontal distances for a second, that negative charge Q2 is two units to the right of point P. So I have to travel in the negative direction to get to it. And then from charge one, it's 12 units to the right of that charge, which means I have to go in the positive x direction to get to it along the x-axis. Okay? Let's do the y. So the y-axis, the distance from charge two to point P was five units. And the distance from P down to charge one was 11 units. Okay? And each unit is a grid point spacing. It's one nanometer. So I chose that conveniently. Okay? So Q2 is five nanometers above the line where you would find point P. And charge one is 11 nanometers below the line where you would find point P. So to get from in the vertical direction from Q1 up to the point P, you have to go up the positive y direction to get from Q2 down to the level where point P is along the y direction. You have to go in the negative y direction. Okay? So this just kind of helps you think about, okay, we're going to need some positive i-hats, we're going to need some negative i-hats. That's the idea. All right? So the picture helps you to collect those thoughts ahead of writing them down. So let's write them down. So let's do, first of all, let's do something fairly easy. Let's do the magnitude of R1P. So this is just going to be the square root of R1Px. It's x component squared plus R1Py. It's y component squared. Okay? So we just have to figure out what those are. Well, we know it already. We sort of figure it out, right? So the distance along the x direction from 1 to P is 12 units. So this is 12 nanometers squared. And this here, which is the y distance, it's 11 units. So it's 11 nanometers all squared. All right? So let's see here. Yeah, okay, I was a total dork and labeled these backward in my notes. No problem. It's going to be this one. So let me just go ahead and write it down. So this is going to be the square root of 144 nanometers squared plus 121 nanometers squared.  I don't like having to write nanometers squared a bunch of times. You can think of nanometers as another little algebraic symbol that's just kind of following around the numbers that it's multiplying. So like any algebraic symbol, if it's common to two terms, you can pull it out in front of those two terms. So I could write this just step by step as 144 plus 121 nanometers squared. And then, because it's under a square root, I could just take the square root of nanometers squared and put that out in front, multiplying the whole thing, and I just get nanometers. So I wind up with 144 plus 121 nanometers. Okay, so that's what I first lesson in units. Units are like little algebraic placeholders. They carry information, but they're just symbols. And so if it's a symbol multiplying a number and it's squared, and all of that is under a square root, you can take the unit itself, square root it, and move it outside. You're good to go. Okay? So if you didn't know that already, that'll help save time later. You don't have to do all these steps. You can just look it and go, oh, nanometers squared multiplies both of these. So I could move it out in front, take the square root, and put it out in front of the square root sign, and hold on.  Okay, and finally, writing all of this just out, we're going to get 16.279 nanometers. So that is equal to, because we've already gone really far here, r1p. That's the distance. So that is the length of this vector, 16.279 nanometers. And it's just trig, right? It's just the Pythagorean theorem. It's a right triangle formed by the x and y coordinate sides, and you square them, add them, take the square root, and you get the length of the hypotenuse, which is that vector. Okay, so you could have fed this along just by doing that real fast. Okay, so as an exercise for the student, if you want to prove to yourself that you can do this, you could also calculate r2p, and I'm just going to write the answer down. Here, you get 5.385 nanometers. All right, it's closer to, p is closer to the other charge, charge 2. You'd expect that to be a shorter distance than this. Okay, now comes the real fun, and that is the unit vector. Okay? So, and as it always happens here, I've run out of space, you get the gist, so I'm going to just erase this. Okay, you can refer to that picture up there, and I'll use this board over here to do the unit vector. Now, as a reminder, from last time, unit vectors like r1, p hat, to get those algebraically, all you ever have to do is take the full vector, r1, p, and divide it by its magnitude, which we've already just figured out. So we just figured out that. So all we have to do is write down the full vector, r1p vector, with its x component and its y component, all the signs, and then divide the x component by 16.279, and divide the y component by 16.279, and we're done. That's it, and you should automatically have a vector whose length is 1. Okay, well, referring to this picture again, the x component, in order to get from this charge to that point p, I have to go along the positive x direction 12 units, and along the positive y direction 11 units. So this is i hat, this is j hat, and they're both positive. So I will go ahead and write this down, so this is just going to be, let's see here, yeah, so 12 nanometers i hat plus 11 nanometers j hat. That's r1p vector, and this whole thing will now be divided by 16.279 nanometers. Unit vectors should be dimensionless. They should have no units. And what do we notice here about nanometers? It cancels. It cancels out. It multiplies this term and this term in the numerator, so you could just pull it all out in front, and then there's a number of nanometers waiting in the denominator to cancel it out. Okay, and if you grind through the calculator on this, what you will find is zero point. No one said these numbers would be pretty. See 0.737 i hat plus 0.676 j hat. Okay, and that is r hat 18. Okay, so going through that same exercise for r2, and you can try this on your own, you get the following unit vector. Now, to go from 2 to the point p, I have to go down the y-axis, 5 units, and backward along the x-axis, 2 units. So negative y, negative x, which means negative j hat, negative i hat. So I expect 2 minus signs to appear in this unit vector, and that's in fact what you get. So you get negative 0.371 i hat minus 0.928 j hat. Not the prettiest vectors in the world. Okay, but that's it. I mean, we've got all the pieces we needed. We were given q1 and q2, we know k, it's just a constant. We needed r1p and r1p hat, and r2p, and r2p hat, and we have all of that. Now, divide and conquer. You start the problem, you look at the pieces you don't know, you find out what it would take to figure them out given the information and the problem, or a combination of information and the problem. Write them down. What do I know? What don't I know? How would I get the things I don't know? Or did the professor just give me an unsolvable problem in which case come and talk to me? Okay. So that's what you do. It's the same approach every time. Divide and conquer. Break it into little pieces and attack each piece, and then put all the pieces together when you're done. All right, so let's go ahead and do this. So for this, I think I will reclaim this board over here. Yeah, all this information is basically up on the board. Okay, so the total electric field at point P is the sum of E1 at point P plus E2 at point P. So electric fields of the individual charges are vectors, and to find the total field due to those two independent fields, you merely add them as vectors. Okay, so all you have to do is write down E1 vector and E2 vector. Add the x components to the x components. Add the y components to the y components. Simplify as much as you can and you're done. Okay, so this is going to look like this, and I'm going to Well, I'll start with the individual fields. So K, Q1 over R1 E squared R1 P hat plus K, Q2 Q2 over R2 P squared R2 P hat. I was told at the beginning of the problem that Q1 and Q2 are the same. So these are common multipliers that multiply both of these terms, and the Ks are common multipliers that multiply both of the terms in this sum. And so I can simplify this a little bit by pulling KQ1 because Q1 is equal to Q2. I could just pull KQ1 out of the whole thing. And then I'm left with just this R1 P hat divided by R1 P squared plus R2 P hat divided by R2 P squared. All right, and so now I just have to plug in with all that stuff I wrote down over there. So I'm going to put my unit vector up here for R1 P. I'm going to square the length of R1 P down here, and I'm going to divide the unit vector's components one more time by the square of 16.279 nanometers. This will yield a dimension full quantity at the end. We should expect to get nanometers squared out of this at the end in the denominator. So I'm going to skip a few steps and just write down basically the result of this. So you wind up with K Q1 and then this pleasant mess. Negative point O1279 plus 0.00278. So that's the X component of Q2 and that's the X component of Q1. And this whole thing multiplies I hat plus another term, which is negative 0.032O plus 0.00255 and it is J hat. And then we're done. And then out in front of all of this is 1 over nanometers squared. I pulled the units out in front of this whole thing. Okay. I think my notes will be up on the class. You can see the steps that I skipped. All right, so then all I have to do is add those together. No problem. Add those together. No problem. That's just calculator work. And then I should have an answer. Now the other thing I have to do is I have to handle nanometers squared in the denominator. K is in units of newton meters squared per coulomb squared. Q1 was given in coulombs. Negative 2.5 times 10 to the minus six coulombs. Okay. But down here I have nanometers and I've got to convert that. So please bear in mind that, okay, so 1.0 times 10 to the minus nine meters equals one nanometer. If I have 1 over nanometers squared, then what I have is 1 all over 1 times 10 to the minus nine meters, that whole thing squared. Not just, well, okay, this gets more complicated with some other conversions. But it isn't just that you, the common mistake that I see is that people convert nanometers squared to meters squared just using 1 times 10 to the minus nine. They don't square that. And that gets them into real trouble. Then you're off by nine orders of magnitude on your answer, which is not a good place to be. Especially if it's a life and death situation. You want to get that right. Okay. And the reason I worry about this, right, is many of you are going into medical professions. And it's important to get the difference between, you know, to convert from cubic centimeter to milliliter correctly. You don't want to screw that up. There are things that are measured in various similar systems of units like drug doses and blood volumes and things like that. You don't want to screw those up. All right. You don't want to give the wrong dose of anesthetic to a patient because of a unit conversion. And I say this in my Homer policy, probes have crashed on Mars because people didn't convert correctly from miles to kilometers and from kilometers to miles. So this stuff happens. And I'd like to prevent a generation of people from being screwed by this. Okay. So remember, you have to square this. And so the answer to this is that this is one over one times 10 to the minus 18 meters squared. Okay. And another way to write this is you can actually do the calculate one over one times 10 to the minus 18. And you just wind up with one times 10 to the 18. And then one over meters squared, which you can also write as 1.0 times 10 to the 18 meters to the minus two. In other words, meters raised to the negative two power, which is just one over meters squared. So if I start writing things like this, it's interchangeable with this notation. Just be aware the book does this too. Okay. So watch out for things like that. All right. And so actually at the end of all this, the answer isn't so bad. Once you put in the powers of 10 to the 18 and get all the units converted correctly, then what you find out is that the total, yeah, there's that lovely board of ours. You know, some of the staff that just got laid off in this OE2C thing were classroom support. So we may be living with this for a while. Anyway, all right, so we have negative 2.2 i hat minus 6.6 j hat, all that times 10 to the 18, Newton's per Coulomb. That's the final answer. It has a magnitude, which you could figure out by squaring each of these components, including the 10 to the 18 and then taking the square root. That'll give you the magnitude of this vector. Okay, so if you're asked for the strength of the electric field, the magnitude of the electric field, that would be the square root of the sum of the squares of the components of that vector. If you're just asked for the electric field, then you need to calculate that whole thing, including its implied magnitude and direction. And the direction information is carried by the i hats and j hats. Okay, so that's how you step through an electric field problem. And now I'm going to give you guys one to work on. All right, any questions before we go into that? Anything that wasn't clear, any steps that I made, where you're like, what the hell is going on? We'll start exercising calculus next time. So, yeah. How do we get the final answer? Did you skip? How many steps did I skip? That's enough to say any question. So what I did was I added these two numbers together here to get that x component, and I added these two numbers here to get the y component. And then all I had to do was divide by 1 times 10 to the minus 18 here. Okay, so you see there's a 10 to the 18 out in front, multiplying the whole thing, and then there's just two numbers in here. So if I had to write this out in its full glory, all right, this would be e vector total equals negative 2.2 times 10 to the 18 Newtons per Coulomb in the i hat direction, and plus negative 6.6 times 10 to the 18 Newtons per Coulomb in the j hat direction. All right, so let's think about the physics of that field for a second. So the, oh, I forgot one very important thing. There's a minus sign on that charge. That should be plus. That should be plus. In my notes, I had the charge screwed up, so these should all be pluses. Okay, and the reason, let me tell you why I just realized that. Let's look at that picture again. Which charge is closer to the point p? 2. Do I expect its electric field to win out when adding the electric fields of two identical charges, but one which is far further away than the other? I see some nodding. All the things being equal, if your two charges have the same magnitude, I would expect in the sum of the vectors, the closer one is going to be the dominant one. It's going to be the one that really finally determines the direction that the electric field vector points. So I would have expected from just that basic concept that the electric field vector in total points kind of up into the right. And as I was thinking that to myself, as I was about to suggest that check, I realized, oh crap, this points down into the left because I had minus signs in it, and that's because I forgot that q1 equals q2 equals negative 2.5 times 10 to the minus 6 coulombs. So to finally finish answering your question, I also multiplied by k and q1 in here as well. So I hadn't plugged those numbers in yet, but I don't want to grind through every tiny little math step here. So you'll have that, you'll have my notes to look at, and what you're going to have right now is some practice of your own. Now that we have the final answer, how do you envision that on the square? Oh, great question. So let's just focus on point p. All right, so the x and y axis origin was somewhere up into the right of point p. So we're told at the end, we've calculated this now, we have a total electric field in the x direction that points in the positive x direction. So the electric field total in the x direction points this way, and the electric field component in the y direction points in the positive y direction. So it points this way. And so the total of those will point like that. So schematically, you can take that, those numbers and go, okay, positive x direction, positive y direction, I must have a vector that points up into the right in order to make both of those things be true. Okay, and so you can jot down, you know, that's e total, or you could pictographically say that's what it would look like. So yeah. Did you say that? Right. Right. 2.2 squared plus 2.6 squared. Yeah, don't forget the 10 to the 18, but yes. Yeah, yeah, yeah, that's right. Yeah, I again, the reason I like the I had, j had notation is I had and j had just become other algebraic symbols that multiply other things in a term. And so I've just pulled the common times 10 to the 18 out of both of these and multiplied the whole thing by times 10 to the 18. So don't forget that when you take the magnitude. If you do it like that, Newton's per Coulomb. Yeah, because once you square both of those, add them and take the square root, you go from Newton's per Coulomb square to Newton's per Coulomb. Good, good questions. Yeah. Sorry, yeah, right here on the board where it's, can you just clarify, it says 10 to the negative 18 and then in the next step is say 10 to the positive. It does, yeah, right. So, so you have one divided by basically just 10 to the 18, because that's just one times 10 to the minus 18. Okay, one over that will raise that power to a positive sign. It's a little easier to see if I do that. So, yeah. She asked the question about magnitude right now. Yeah. Oh, okay. So to get the magnitude, if I had merely asked, what is the magnitude of the total electric field? To get that, you have to take the square root of EX squared plus EY squared. Okay, so that times 10 to the 18 is EX and that times 10 to the 18 is EY. Square them, add them, take the square root of the sum and you're done. Put the right units on it. Okay, well practice is what matters more than anything else. So for the remaining 15 minutes in the class, I'd like you guys to practice. So here's your problem. What is the magnitude of charge Q? All right, so you have two opposite sign charges, but they have equal magnitude, Q. What is the magnitude of Q that's required to achieve an electric field at point P with that magnitude? Three times 10 to the minus 6 Newtons per Coulomb. Okay, so your, let me slide this over. Because those minus signs don't show up. So your target electric field is 3.0 times 10 to the minus 6 Newtons per Coulomb and you need to find the charge that's required to make that happen. Okay, and a couple of other pieces of information. There's some distances that are labeled D on here. Those are 40 nanometers and then there are other distances labeled L and they're related to D by the square root of one-half D. Okay, so that's the information that you're given. All right, work in pairs. So pick a neighbor and it makes sense for you to pair up and you to pair up and you to pair up or something like that or, you know, groups of three is fine too, whatever's convenient. Let's show them the last one. Yeah, the answer seems like an obscenely large number, right?


The one thing I will say just by looking at this raw data, the fact that we broke down below this 297 level and just putting in lower highs, lower highs, lower highs, lower highs, we have to pay attention to this 293 level. If you guys notice, the last two days, the keys have held 293 twice. You see it? It held it twice yesterday, held it twice today. That's gonna be a very important number because if they can't get above the previous channel's highs, and you can see here here, it's gotten rejected at the 296 level now, back to back days that's lower than the 20-day moving average. Eventually, if we do start building below this 293 level on the keys, then we will challenge back the 290 area that we had on the 200-day moving average, right? You see this whole big macro level, okay? So 293, that's a level that the bulls need to defend.


Hello everybody. In this lesson, we're going to be taking a look at string functions. Now string functions are built in functions within my SQL that will help us use strings and work with strings differently. Now we're going to look at a ton of different ones. They all have different use cases. But I'll try to walk through some of those as we go along. But we'll look at a lot of different string functions in this lesson. We'll start off with one that's really simple. This one is called length. So if we select, then we say length. And let's say we put in, and I don't know why it's popping up like that. Let's say we put in something like sky or skyfall or really anything. If we run this, it's going to give us the length of how long this string is. So if I come down here, we say select everything from employee underscore demographics. And let's add a semicolon here. And let's run this one right down. Now, what we can do is we can look at how long each person's name is. What we can do is just take the first name. But then we'll also do the length of the first underscore name. So if we run this, now we get Leslie, Tom, Jerry, Donna, and it gives us the length of their name. If we wanted to, we could even order by this. So we could do order by, and we could just do two for now. And we can order by the length from the shortest name all the way to the longest name. Now one use case that I've used length for in my actual job was when I was working with phone numbers, I wanted to make sure that they were exactly 10 characters long. Otherwise, something went wrong somewhere in the data cleaning process. So I would go and look at the length and I would make sure they're all 10. If anywhere above 10, I will go and specifically look at those and try to clean those and fix those up. Now let's go on to the next one. And these next ones are pretty simple ones. At least I think they're fairly simple. We're gonna look at upper first. And it's doing the same thing as the other one. We'll do upper. And let's say we're gonna do sky. If we select upper sky, it's gonna give us an all upper case. Or we can copy this. And we can do lower. So now let me add semicolons otherwise it's gonna drive me crazy. Let's try this lower now. It's gonna do all lower even if I make it all capital. But if I say all capital sky, it's gonna make it all lower. So if we come back up, let's copy this. And instead of doing the length, now we'll do upper. Let's go ahead and select this. So we have Leslie and then we have the upper first name. So upper all case Leslie. Now this is actually really good. This is really helpful, especially with standardization is what I found a great use case for it. Because sometimes it'll be all capital Tom and sometimes they'll put it in as t lowercase om. And just making them all uppercase or all lowercase can help correct those really simple standardization issues within a single column. The next one that we're gonna look at is trim. Now there's multiple trims. We have trim, left trim and right trim. Trim is basically going to take the white space on the front or the end and get rid of it, which is really, really helpful. So what we're gonna do is we're gonna come right here, let's say select, and we'll start off with trim. And let me add a semicolon every time. So then we'll do trim. And for our actual string, we'll do something a little bit odd. We'll do some spaces. And then we'll do sky. And then we'll add some spaces. Let's run this and add our semicolon. That's gonna be the end of me in this lesson. I was just adding semicolons. Now it fixes it completely. Now what if we don't add sky at all? We'll just keep it like this. But you can see that there's spaces before and there's spaces after. But that's what trim does. Trims gets rid of the leading and the trailing white spaces. Now if we come up here and we just do the left trim, it's only gonna remove from the left hand side. So we're only getting rid of the left hand side white spaces. This right hand side, as you can see is really long. It's still there. And if we do our trim, we go ahead and run this one. It gets rid of the white space on this side, but it doesn't get rid of the left space on this side. Now let's keep going. We have a lot to cover still. We're gonna move on to what I think is probably my most favorite string function if I'm allowed to have a favorite string function. And that's substring. But I'm gonna kind of work us into substring a little bit by looking at two smaller functions, which is left and right. So let's select everything and we'll do that from the employee demographics again. It's at our semicolon. Now I'm gonna run this. Now I want to get the first name. And I'm gonna do left of the first underscore name, just like this. Now when you're using this is actually gonna be an error. Let's see if I highlight over this if it'll tell me what the error is. It says the parentheses is not a valid position. They're expecting something else. And basically what they're telling us is that this is not how it should be written. We're looking for a different value. That different values actually a number. We're gonna do comma, and let's do four. That's what it was looking for. It didn't want this at the end. It needed this comma four. And what we're actually specifying is how many characters from the left hand side do we want to select. So we're selecting the first name and we're going from the left four characters. Go ahead and run this. And so we have Leslie, Tom, April, all the way down, you can see that there's only four characters in each one. So someone like Chris, the s is no longer going to be there because we're only looking at the first four characters. Now we can do the exact same thing. And let's actually copy this down here. So we'll come we'll go like this. I make this a little more professional. And we'll do right. So now we'll do right. If we do the right four, it's gonna go from the right hand side of the string and go left four. So we're looking at the far four most right characters. Now this can be useful in certain instances. But if I'm being honest, I don't use these that much. For the most part, I'm pretty addicted to using substrings. I love substrings. I think they're fantastic. And let's look at substrings like this. So a substring is going to allow us to do a few different things. Let's do first underscore name. The second thing that we put within this function is the position that we want to start at. So let's say we want to start at the third position. And then we specify how many characters we want to go. So with this we specified four, let's just do two. So now we're going to the third position. And we're going over to the right two characters. Let's go ahead and run this. So with Leslie, we get SL. So we go one, two and three, we start at the third position, and then we take two characters, the S and the L. I have found this one to be extremely, extremely useful. Let's take this, for example, let's do comma, let's do birth underscore date. And let's run this. I'm keeping everything in here, although it might be a bit much. Let's say we have this birthday, and this middle column is the month. And we're running some, you know, query, we want to find the month that everyone is born. So we can do that very easily using substring, and we wouldn't have been able to do this very easily using left or right. So now we're going to take this birth date, and we're going to use the substring, and we want to select these middle characters. So what we need to do, since it's all standardized, we do one, two, three, four, five, six, we start position six, and we want to select one and two. Let's go ahead and run this. And now we've pulled out all of the months, so we can say as birth underscore month. And now we could save that put into a tent table, add it as a new column in our table, whatever we want to do. But now we have this information that we desperately, desperately wanted to know. So that is left, right and substring again, substring is it's fantastic. Now let's keep going. The next thing that we're going to take a look at is replace. Now replace will replace specific characters with a different character that you want. So let's actually copy all this right here, I don't want to keep writing this out. And we'll say select everything. Now what we're going to do is we're going to take the first underscore name, and then we're going to say replace. And then we'll also do the first underscore name, but we can specify what we want to replace, and then what we want to replace it with so we have two more parameters that we need to put in this function. So let's say a, and let's replace it with a z. Let's just see what that does. Let's go ahead and run this. And so now when we see the letter a, and we are specifying a lower case a, like mark, as replaced with a z, that's really all replaced does specifies what you want to replace and then what you're going to replace it with. Now let's take a look at the next one. And we're going to take a look at a function called locate. So if I say select, and let's do locate, I'm going to give it a string, I'll say Alexander, that's my name. And I'm going to specify what I'm looking for. So let's close this parentheses. The string that we're actually looking for comes first. So what we're going to do is I'm looking for the letter x in my name. So we'll do x in Alexander. Go ahead and run this. It tells us that it is in position four. So we have 123 and four. That's where our position is. That's where it locates that sequence that we're looking for. Now if we pull this down here, place this right here, and we'll change this locate. Now let's say we're still looking at the first name, but we want to locate people that have an a n, like this in their name. Let's go ahead and run this. And we get zeros for everybody except for and and Andy. So this might be something where we put it into a CTE or a temp table, then we can filter down based off of these results to where it only equals one. Now the last one that we're going to take a look at, and let's go right here, we're gonna do first name, last underscore name. Now this one is super, super useful because what we can do is have a concatenation of multiple columns. So let's go down right here. So we have first name and last name. But if we come down and we say concat, we can then combine these columns into one single column. So we'll do concat. And we'll do first underscore name and then comma last underscore name. And if we run this, it's going to be Leslie and nope combined into Leslie Nope. Now this doesn't look perfect, right? We don't want it to look like that. All we have to do is come in here, and we could do a little space. So a lot of space in there. And if we run that, now we have Leslie and Nope, and we can call this as full underscore name. And this is something that I've done a million times in my real job, where there's multiple columns, we want to create one column out of it, or take two columns and create one column happens all the time. So this concat is really, really helpful to combine those columns really quickly. So that is all we're going to take a look at in this string functions lesson in my full course you can find in the description below. I also have lessons on numeric functions, date and time functions, converting different data types all in the functions module.