uhty said:
I think you are wrong: the picture explicitly shows positively charged rod. In case of negatively charged rod the sign of potential must be negative, right? The integral then should be taken with negative sign, right?
The picture is just showing you the setup so you understand where all the variables are coming from. If you read the derivation, the charge per unit length can be positive or negative, it would depend on Q. He
does not restrict Q to be positive, even though in the picture he draws a positive charge on the rod, the picture would be equally valid had he drawn a negative charge on the rod.
uhty said:
Your explanation that I must understand how equation works is not very helpful, my questions are exactly about that-how it works?
If I integrate from d+L to L the integral will be of opposite sign, but the result should be the same. But which sign is correct for positive or negative charge? How sign in the intergal relates to charge sign?
You mean from d+L to d? You are correct, the integral would have the opposite sign. You need to consider what it means if you integrate from d+L to d. Consider a line of point charges instead of the rod, each of charge q, summing them up their elec. potentials doesn't depend on the order that you sum them, so summing them from d+L to d wouldn't change anything. However, as you know, reversing the direction of integration **does** change something.
As an intuitive example, to calculate the area under the line y = 1, we could integrate y from x = 0 to x = L, what is the area? Now, integrating from x = L to x = 0, what is the area? We know area to be a positive quantity, so which way was the "correct" way? Why did the other way yield a different answer?
These are the same questions that should focus your understanding of why you integrate from the left side to the right side when doing this problem.
Lastly, the sign of the charge has absolutely no bearing on the sign of the integral. Again, the derivation is done for a general charge density and it **does not** assume a positive or negative charge density.