 We have a 10 meter long cylinder which is centered at the origin so that we have five Five meters above the origin and five meters of it below the origin and we're given its radius There's also an electric field that exists in space and its equation is given to us and the goal is to figure out What is the charge enclosed by this cylinder? Now at first it just feels like where do I start? I see some equations I see some coordinates you ask me to calculate charge enclosed. Where do I start solving this? But one of the things that comes to my mind is hey this is a closed Surface and why that's important for me is because I know that Gauss's law can apply to closed Surfaces, so that's where I start first because there's a closed surface I go back to my Gauss's law and and what's the Gauss's law say Gauss's law says that the total flux through the closed surface Will always equal the charge enclosed by the closed surface divided by epsilon naught and now I ask myself, okay, if I could calculate the total flux through this cylinder Then can I calculate my charge enclosed? Yes If I calculate this and the charge enclosed is just the total flux Multiplied by epsilon naught and so I know where to start now I know my real problem is to calculate the total flux through the cylinder So let's try doing that. So I asked myself next. Hey, how do I calculate the flux? Well, if you've seen how to calculate the flux flux through any surface electric flux through any surface will equal the dot product of the electric field and the area vector You've seen this in previous videos, right? And if you have to calculate the total flux Then we'll have to do a summation Now in general when we're dealing with the you know random objects This could be an integral and that could be really hard to solve But over here I see a cylinder with nice shapes So that gives me hope maybe I don't have to integrate and the reason I get hope is because I can identify Three distinct surfaces. I can identify this bottom Flat surface nice and flat surface. Let's call it a surface one I have this top nice and flat surface surface number two and then I have this curved Surface surface it goes like this which is not really flat But let's see what happens. So these are three surfaces that I can identify So what I can try to do now is try and calculate the flux through each of them separately and then add them up And see if I can calculate my total flux and then from there I can see if I can calculate my charge enclosed, okay? All right, so let's see. Let's begin by calculating the flux at Surface one. So the flux at surface one that's going to be from our definition It's the electric field at that point. Let's just call it as e1 dot a1 Area at that point and again, this could also be an integral if the electric field is changing So we don't know let's see what happens. So I come to this surface and I first ask I know how to calculate the area I know the area is pi r square. So that's not a big deal for me The question is about electric field. How much is the electric field here? And for that I go back to this scary looking equation, but let's see So electric field is given to be 3 y j cap What does that mean? Well, first of all the j cap is telling me the direction. It's saying that the electric field is in the y direction Everywhere, you see, I only have a j cap. I don't have a k cap. I don't have a i cap So electric field everywhere is in the y direction. That's one observation I do and I can see that the electric field Depends on the y coordinate. So if I know the y coordinate, I can plug in I can get the electric field So at this point This point can you tell what the electric field is going to be? So I want you to pause the video and see if you can figure out what the electric field at this point is That's the first step right for us All right, so I asked myself, what's the coordinate y coordinate at this point? That's all that matters to me y coordinate and that is negative 5 because it's 5 meters below origin So upwards is positive downwards is negative and therefore if I substitute minus 5 I get minus 15 j cap And therefore the electric field at that point Electric field at that point. Let me call that electric field at e1. That's going to be minus 15 j Cap and what does that mean? Let's try and visualize. I mean, we can just do it mathematically But let's try and visualize. What does it mean to have a minus 15 j cap electric field? Minus j cap means in the negative y direction. So that means the electric field at this point is 15 Units whatever the units are units are not mentioned. So we'll just assume it to be standard units 15 units downwards negative j cap represents downwards Okay, but I want to know the electric field everywhere not just at this point because I want to calculate the flux through the entire area So what would the electric field at this point? Again, I want you to think about this from this equation Do you think the electric field at this point on that bottom surface would be the same or do you think it would be different? well If I go back to the equation all that matters is the y-coordinate. What is the y-coordinate over here? That's again minus five because again this point is five meters below The x and z coordinate might have changed but that doesn't matter Which means the electric field over here is also going to be the same 15 downwards negative 15 j cap and It'll be the same here. So good news Good news for me. And that's why I'm smiling is that this is a uniform electric field Although over all the electric field is not uniform. It's changing with the y-coordinate But over this surface the electric field is uniform. It's the same everywhere. That's great because I don't have to do an integral now Okay, so I know the electric field next I have to figure out the area. What's the area? The area is just pi r square. It's given as r is 2 so area is going to be just write that over here Area is going to be pi times 2 square is 4. So it's gonna be 4 pi meter square again I'm gonna write the units some of the standard units. I'm just gonna keep it as it is. So that's that's area But I need the vector area. So what's the direction of this area? We've seen before how to do that you draw a perpendicular to it now for closed surfaces The perpendicular is always pointing towards the outside. So our vector area is gonna be pointing outwards in this case It'll be downwards and so if I were to write the area vectorially It's gonna be 4 pi. That's the magnitude What's the direction? Direction is negative j So I'll write it as negative J Now that I have these two I can go ahead plug in and calculate what the flux is and again Good idea to pause at this point and see if you can calculate this flux And then probably you can try and calculate the flux second and third surface as well All right. So negative 15 times negative 4 pi. That's just going to be 15 4s are 60. So it's gonna be positive 60 pi and J dot j. This is the vapor. What is j dot j? J dot j is 1 Why is it 1? Because dot product has cos theta in it and j and j means same direction theta is 0 cos 0 is 1 And so you get just 60 pi That's the flux on the first surface We could have done it directly without looking at j anymore because we would just say hey They're both in the same direction dot product becomes 1 and so it's just e times a Correct me that as well. All right. So that's flux through the first surface We can now Similarly calculate the flux through the second surface again. What do you think it's gonna be? Well, let's calculate the electric field the electric field at this point the y coordinate is all that matters That's plus five. So I get plus Let me see. It's gonna be e2 is gonna be 15 plus 15 j cap And what about the area well again the magnitude will be the same 4 pi and This time it will point upwards Because remember area vector is always outwards. So area a2 Would be 4 pi this time positive j cap And so if you dot them again notice you get 15 times 4 pi that is 60 j dot j is 1 so you get again 60 pi and At this point you might think and all right is I used to think but wait a second in one case You're getting upwards in the second case. You're getting downwards. Why am I getting both as positive? Why shouldn't one be negative of the other? Why is that because remember flux is a measure of flow? Outward flow is positive Inward flow is negative. So even though we hear electric field is going up. It's flowing outwards positive Even though the electric field over here is going down. It is going outwards. That's why it's also Positive you get that so don't get confused take some time to getting used to but outward flow is positive That's what matters in both cases. It was outwards. Okay. Now, let's go to the third one The curved surface and this is the part which looks really tricky because over here the y-coordinate keeps changing and Therefore the field is not uniform over the entire surface. Oh, no So that means you have to integrate not really You see Again, I want you to give it a try see what's gonna happen Just look at the electric fields direction carefully look at the area vectors that you would draw here And you will see you don't have to integrate to get the answer over here Okay, let's do this. So because electric field is in the y-direction Everywhere here is gonna be upwards here. Also. It's gonna be upwards downwards downwards everywhere It's gonna be upwards and downwards below this. It's gonna be negative and downwards be about this is gonna be positive and upwards But if you were to look at the area vector at any one point now You can't draw a single area vector for a curved surface whenever you have a curved surface Irregular shape not flat surface. You have to take small small sections If I take a small section and draw an area vector that area vector will point out this way and the angle between the two would be 90 degrees and That would be the same everywhere if I would draw an area vector It'll come out over here and the angle between this in this would be 90 Degrees and why is that exciting me because that means cos 90 is zero. So when you dot it you get zero So if you're to e dot a everywhere, you just get zero everywhere and You can logically think about this remember flux is a measure of how much something is flowing out or into that surface Now because electric field over here is parallel to the curved surface. Nothing is flowing out of it Nothing is flowing into it and therefore it kind of makes sense that the flux is zero All right, so now that we have the total all the flux values the total flux would just be the summation of all three That's 60 plus 60. That's 120 pi and I can now equate it to charge and close divide by epsilon naught and There I go charge and closed equals 120 pi times epsilon naught and We know the value of epsilon naught we can plug that in you get some answers and I'm pretty sure you can do that But that's it. That's I'm gonna stop over here And we know how how much charges enclosed over here and before I end I want to give you a slightly different problem My question to you is what if we had everything exactly the same except that the electric field was three times modulus of y Times j cap How would things change? What would be the new enclosed charge? Can you try and find this? It's not gonna take much time because most of the calculation is gonna stay the same Okay, let's see if you did this if you look at the top surface everything would be the same e2 would be just 15 j a2 vector would still be the same you get the same answer But this is where things will change if I were to calculate even it's gonna be three times minus five But the modulus of minus five is plus five. So it's gonna be plus 15 over here in the second case which means now in the second case Electric field is going to be pointing upwards But your area vector is gonna be pointing Downwards because area vector should always be outwards and therefore now when I calculate phi one that's gonna be a negative 60 And see what you get you and then you add up you get zero I mean curve surface will still remain zero But the total flux will become zero and the charge enclosed will now become zero