in this video we're going to focus on calculating the electric field due to a line of charge now there's two types of problems that you need to be familiar with there's the one where the rod is like infinitely long and there's the other one which has a finite length we're going to focus on the second case in this video we're going to talk about how to derive the equations first and then afterward work on some examples some practice problems and things like that so let's draw a rod and at the center of the rod we're going to calculate the electric field at point p now what we need to do is we're going to draw a segment of the rod and this little segment is going to have a positive charge now the whole rod has a net positive charge and that charge is uniformly distributed among the entire rod but we're going to focus on this small segment if the rod has a charge q then this segment has a portion of that charge which we'll call dq now the height of the segment is going to be d y the distance between the origin and the segment we're going to call y that's uh this distance right here and the distance between the center and point p is x now we're going to draw a line between the segment of charge and point p now if we continue to draw the line that's going to be the electric field vector which points away from the charge let's call that e now this electric field vector has an x component and it has a y component the x component will call it e x and the y component is e y now let's say if we drew another positive charge but in this region if we draw the electric field vector between that charge and point p it's going to produce an electric field that is directed north of east and that electric field also has an x component which let me put that in a different color and it also has a y component which we can call e y notice that this electric field and this one are opposite to each other so they cancel but notice that these two vectors are parallel to each other so they add up therefore the net electric field in the y direction due to the symmetry of this rod is zero so we don't have to worry about ey the net electric field at point p is equal to ex if we could find e x then we can calculate the net electric field at point p r represents the distance between this uh small segment of charge and point p so based on the pythagorean theorem we know that a squared plus b squared equals c squared r squared is equal to x squared plus y squared therefore r is equal to the square root of x squared plus y squared now let's focus on the linear charge density the linear charge density represented by this lambda symbol is basically the total charge divided by the total length where l is the entire length of the rod now the length of the rod we're going to describe it in terms of a and negative a so relative to this origin from this point to the top of the rod that's going to be positive a and from that point to the bottom of the right negative a so therefore the length in this situation is represented by a 2a so lambda is q over 2a now if lambda which has the units coulombs per meter represents the total charge divided by the total length we can also describe lambda for this segment of charge it's going to be the charge of that segment dq divided by the length of that segment which was defined as d y now i'm going to erase the board but feel free to draw this picture if you haven't done so already so you can always refer back to it so if lambda is equal to dq over dy then solving for dq it's going to be lambda times dy you can get that equation if you multiply both sides by dy so that these two cancel now we also said that lambda is equal to q over 2a so let's replace this lambda with q over 2a so dq is q divided by 2 a times d y now the electric field of any point charge is equal to k q over r squared so the electric field of the segment of charge that we had on top in the last picture we could say that d e represents the electric field produced by that small segment of charge is equal to k times the charge which is dq that's the charge of the small segment divided by r squared so now that we have that what's our next step so notice that we have the expression for dq dq is equal to q over 2a times dy so we're going to do is replace dq with that expression so de is going to equal k times q times d y divided by 2 a r squared so let's move this to the top now the electric field in the x direction is equal to d e times cosine theta and if we redraw the triangle that we had before we know that this is x here's point p here's the center and this represents y and this is r theta is this angle right there so cosine theta is equal to the adjacent side divided by the hypotenuse so that's x divided by r so we have d e which is uh k q d y over 2 a r squared d e is basically this equation right here times cosine theta which is x divided by r so what do you think we should do now what's our next step here once we have this equation we want to integrate both sides so we can get a e x the integral of d e sub x is e sub x now let's move all the constants to the front notice that d y tells us that everything is a constant except the y variables so right now we have k q over 2a i'm going to keep x with the integration symbol integral x d y over r cubed now our differential is d y so therefore we need to integrate the function in the y direction so y is associated with the height of the rod so we want to integrate it from the bottom of the rod to the top which is defined as negative eight to a keep in mind the center of the rod has a y value of zero so therefore we need to put negative a and a in our integral symbol now keep in mind r we defined it as being the square root of x squared plus y squared so we're going to have to use that here so e sub x is equal to k q over 2a integral from negative a to a x d y divided by the square root of x squared plus y squared is the same as x squared plus y squared raised to the one half so if that's equal to r then r to the third is going to be x squared plus y squared to the three halves you got to multiply one half by three and you get three over two so this is uh x squared plus y squared raised to the 3 over 2 due to this 3. now how can we integrate this function now since we have the differential d y y is the variable and we're going to treat x as a constant but we're going to need this x in order to do the integration so let's go ahead and do that by the way just in case you were wondering why we can make x uh why we can treat as a constant as we integrate from negative a to a this integration is only associated with the y direction or the y values the distance between the rod and point p is constant so as we integrate from negative a to a x does not change so that's another reason why you could treat it as a constant in this example but let's focus on the integral of this expression let's ignore a negative a and a for now we can add it later but let's focus on finding the anti-derivative of this expression because that requires some work so how can we integrate this function the best way to do this is to use trigonometric substitution so the first thing that we need to do is take out an x squared inside the parentheses we're going to factor it out so this is going to be x d y times x squared now if we factor out x squared to get what's inside divide x squared divided by x squared is equal to one y squared divided by x squared is what it is y squared over x squared as you can see if you distribute the x squared to these two terms you're going to get x squared plus y squared again now on the outside of the brackets not the parenthesis we still have the exponent 3 over 2. so now let's use trigonometric substitution y we're going to make it equal to x tangent theta so therefore y squared is x squared tangent squared theta so now what is d y if we differentiate this expression d y is going to be x times the derivative of tangent which is secant squared theta d theta so in this case x is still a constant so we don't have to use a product rule but theta is the variable so that's when we have the d theta symbol so now once we have this we can do some substitution here let's replace d y with what we have here that is uh x secant squared theta d theta now our next step is to replace y squared let's replace it with x squared tangent squared theta so we're going to have x squared tan squared divided by this x squared and this is all raised to the 3 over 2.
so let's keep that in mind as always i'm always running out of space which is a problem let's move this over here so now what we have is an x squared on top times secant squared we can cancel these two x squareds on the bottom we have x squared times 1 plus tangent squared theta and this is all raised to the 3 over 2. now one plus tan squared is secant squared so let's go ahead and replace that that's a trigonometric identity you can look it up on the internet now we're going to raise x squared to the three halves and secant squared to the three halves so x squared raised to the three over two the twos will cancel and this is going to turn into x cubed so what we now have is the integral of x squared secant squared on top divided by x cubed and once we multiply these two we're gonna get secant cubed as well so now let's cancel a few things we can cancel two x variables leaving one on the bottom and two secant values so we're going to have a d theta on top and x secant theta on the bottom now x is a constant so let's move it to the front so this is going to be x and then 1 over secant theta d theta secant theta is 1 divided by cosine so 1 over secant is cosine so we have cosine theta d theta so what is the antiderivative of cosine the antiderivative of cosine is sine now don't forget we need to evaluate it from negative a to b but not yet now if we draw the triangle that we had before this was theta here we said this is x this is y and this is r which looks like the unit circle or the triangle that's related to the unit circle now from this equation or this triangle you can see that tangent is equal to the opposite side which is associated with y divided by the adjacent side so tangent is y over x which is similar to this equation if you multiply both sides by x you can see that x tangent theta is equal to y so we can find sine theta from that same triangle using silicator so sine theta is equal to the opposite side which is y divided by the hypotenuse r so x sine theta is x times y over r now we can replace r with what it's equal to in terms of x and y we said r is the square root of x squared plus y squared so this is the integral actually there's one mistake that i need to correct the x was on the bottom so this is 1 over x i almost missed that so let's fix that so i'm going to keep the y on top but the x should be on the bottom just want to make that clarification that's a very very important step now that we have the integral of the function let's integrate it from negative a to a so what can we do at this point how do we evaluate it from negative 8 to a now keep in mind why is the variable not x x is a constant so we need to replace a y with a so let's plug in the top part first so it's going to be a divided by x times the square root of x squared plus a squared and then minus now we can plug in this one negative a over the same thing x square root x squared plus a squared a minus negative a is basically a plus a which is 2a we can add the numerators because they have the same denominator now keep in mind that this expression is equal to the integral from negative a to a of x d y divided by x squared plus y squared raised to the three over two so that's what this is equal to it's equal to the value of this integral now let's go back to our original expression we said that e x is equal to k q divided by 2 a times the integral from negative a to a x d y over x squared plus y squared raised to the three over two so we have the value of this integral which is this we just got to multiply by k over 2a so this is equal to k q divided by 2a times 2a divided by x square root x squared plus a squared so we can cancel 2a therefore e sub x the electric field in the x direction is equal to uh k q divided by x times the square root of x squared plus a squared and keep in mind that lambda is q divided by 2a which means that q is 2a times lambda so if you want to you can write this equation in terms of lambda so e sub x is also 2 k times a times lambda divided by x square root x squared plus a squared but we're going to use this equation more often so just keep that in mind now what about e y we said it's equal to zero based on the symmetry and the shape of the rod but how can we prove it how can we calculate it and show that it's equal to zero let's go ahead and do that so we know that d e y is equal to negative d e sine theta so relative to this segment of charge when we drew a vector at point p e y was in the negative y direction e x was in the positive x direction and here's e so because e y is in a negative y direction relative to this chosen segment of charge that's why d e y has to have the negative sign now based on this triangle we know this is theta here's x this is y this is r sine theta is y divided by r so therefore we're going to have uh negative d e and we already know the equation from d e d e is k q times d y divided by 2 a r squared which we got earlier times sine theta which is y over r so d e sub y is negative k q times y times d y over 2 a r squared so now let's uh integrate both sides so the anti-derivative of d e y is simply going to be the electric field in the y direction and k q and 2 a are constants that we're going to move to the front we're going to integrate it from negative a to a from the bottom part of the rod to the top part and we have y d y and this is supposed to be r cube r squared times r is r cubed with long problems like these it's very easy to make a mistake so you have to be very careful now we know r cube is x squared plus y squared raised to the 3 over 2 just like last time so now how can we integrate this particular expression we can apply the negative a and a values later but let's focus on finding the anti-derivative of this expression the only difference between this problem and the last problem is here we have a y instead of an x because of that the integration is going to be a lot easier since y is a variable we can use u substitution instead of trigonometric substitution by the way if you feel that you need to boost your skills and integration techniques feel free to check out my channel and then look for my calculus playlist in it you should find uh practice problems on you substitution and trigonometric substitution so you can master those techniques let's make u equal to x squared plus y squared so what is d u in that case now keep in mind x is a constant the derivative of any constant is zero so the derivative of x squared is zero is going to disappear the derivative of y squared is two y times d y and solving for d y d y is equal to d u divided by 2 y so let's replace d y with d u over 2 i now let's replace x squared plus y squared with the u variable so it's u to the three halves so notice that the y variables cancel let's take this constant let's move it to the front so one-half anti-derivative let's move this to the top so the three over two exponent will become negative three over two and now we can use the power rule to do that add one to the exponent negative three over two plus one is the same as negative three over two plus two over two which is negative one half and then we need to divide by negative one half which is the same as multiplying by the reciprocal of negative two over one so we can cancel the twos so this is equal to one over the square root of u but there is a negative sign so let's not forget about that now at this point let's replace u with x squared plus y squared so this is equal to negative 1 over the square root of x squared plus y squared so therefore the integral from negative a to a of y d y square root or divided by x squared plus y squared to the three halves all of that is equal to negative one over the square root of x squared plus y squared evaluated from negative a to a so x is the constant y is the variable we're going to replace y with a so it's going to be negative 1 over the square root of x squared plus a squared and then minus negative one over the square root of x squared plus negative a squared is just a squared the negative will disappear so these two signs will turn into a positive sign and so we have negative one plus one which adds up to zero so the electric field in the y direction as you can see is equal to zero that's how you can prove it and therefore the electric field in the z direction is also equal to zero the only electric field that we have along that center line at point p is in the x direction which we have the equation for that already now before we work on some practice problems let's go ahead and review the equations that we'll need just the important ones so here's the rod and here's the point of interest in which we want to calculate the electric field and the electric field will be directed in the x direction so here is our segment of charge that we focused on and the distance between the segment of charge and the x-axis we've identified as y r is the hypotenuse and x is the horizontal distance so therefore r is equal to the square root of x squared plus y squared now l represents the total length of the rod the bottom part is negative a the top part is a so therefore l is equal to 2a the electric field in the x direction can be calculated using this equation it's k q divided by x times the square root of x squared plus a squared where a is simply one half of the length of the rod so make sure you know this expression and also this equation in addition make sure you know that the linear charge density is q divided by l which is q divided by 2a so you also need to know this equation so those are the main equations that you'll need now if for some reason you need to integrate to calculate the electric field you can use these two equations if you need to find the electric field in the x direction start with this expression it's a k times q divided by 2a times the integral from y1 to y2 now if you're wondering what those values are recall that we integrated from negative a to a in the y direction so therefore negative a was y one positive a was y two so it's going to integral from y one to y two and then it's times x d y divided by x squared plus y squared raised to the 3 over 2. and now for this expression we need to use trigonometric substitution so what you can do is set y equal to x tangent theta now you may have to factor out an x squared like we did before but this is where you you want to start and then you could find the expression for y squared and also calculate d y based on this equation now if you need to calculate e y let's say if this rod is not symmetrical there's going to be a y component so if we calculate the electric field along the center of the rod there is no y component the upper part and the lower part will cancel however if we want to calculate the electric field that is not in the center let's say over here then there will be a y component so if you need to calculate the y component of the electric field you can use this equation so the first part is going to be saying it's going to be kq divided by 2a but with a negative sign integration y1 y2 and instead of having x d y it's going to be y d y divided by x squared plus y squared raised to the 3 over 2 power so that's how you can calculate e y that's the equation that you need and just remember to evaluate this integral use u substitution set u equal to x squared plus y squared treat x as a constant and treat y as the variable so those are the main equations that you'll need for this particular type of problem so let's go ahead and work on some examples so here's a problem a 1.
5 meter long rod has a total charge of 150 nano coulombs what is the electric field 60 centimeters east from its center so here's the rod we wish to calculate the electric field at point p and l is the length of the rod how can we find it so first let's make a list of the information that we have l is 1. 5 meters q the total charge is positive 150 nano columns x the distance between the center and a point of interest in which we wish to calculate the electric field directed in the x direction and that's equal to 60 centimeters which is 0. 6 meters if you divide by 100 to calculate the electric field in the x direction we can use the equation k q divided by x times square root of x squared plus a squared the only value that we're missing is a now a is one half of l because l is 2a so this portion right here is equal to a so a is one half of l which is one half of 1.
5 1. 5 divided by 2 is 0. 75 so now let's plug in everything into the equation k is 9 times 10 to the nine q is fifty times ten to the negative nine x is point six and then times the square root of x squared plus a squared which is point seven five so let's go ahead and do this one step at a time 9 times 10 to the 9 times 150 times 10 to the negative 9.
that's the same as nine times one fifty you can cancel the ten to the nine and ten to negative nine so this is going to be 1350 on top 0. 6 squared plus 0. 75 squared is 0.
9225 if you take the square root of that you should get . 960469 the final answer for this problem is 23 43 that's rounded to nearest whole number newtons per coulomb now what about part b let's calculate the linear charge density so this part is pretty straightforward the linear charge density can be calculated by taking q and dividing by l which is the same as q over 2a so it's 150 times 10 to the negative 9 divided by 1. 5 meters so it's equal to 1 times 10 to the negative 7 coulombs per meter and that's it for this problem here's another problem that you could try so we're given the linear charge density which is a positive 45 nano columns per meter and we have the length of the rod it's 2.
8 meters and also we know the value of x 80 centimeters which is 0. 8 meters so using this information let's calculate everything let's begin by calculating the total charge contained in the rod so we know lambda is q divided by l so if you multiply both sides by l the total charge is simply lambda times l so lambda is 45 nano columns per meter and if we multiply it by l which is 2. 8 meters we can see that the unit meters will cancel giving us the charge in nano columns so it's 45 times 2.
8 so this is equal to positive 126 nano columns now that we have q we can calculate the electric field but we need to find a a is simply half of the length of the rod which is 1. 4 meters so the electric field in the x direction is k times q divided by x times the square root of x squared plus a squared so k is 9 times 10 to the nine q is 126 times 10 to the negative nine x is point eight and then times x squared plus a squared and a is 1. 4 so let's go ahead and calculate it nine times ten to the nine times the other number is equal to eleven thirty four on top 0.
8 squared plus 1. 4 squared that's 2. 6 and the square root of 2.
6 is about 1.