**1. The problem statement, all variables and given/known data**

A point charge +q is located a distance d from one end of a uniformly charged rod. The rod has total charge +Q and length L. (The rod and the point charge are each held fixed in place.)

What is the force on the point charge due to the rod?

What is the force on the point charge due to the rod?

**2. Relevant equations**

[tex]F = \frac{k q Q}{r^2} [/tex] (Coulomb's Law)

**3. The attempt at a solution**

This is a really conceptual sort of question that comes up all the time for me--a simple integration problem of getting a common variable and then integrating. It's the setup that I've never understood.

So here's what I think we're doing conceptually: we're applying Coulomb's law an infinite number of times to an infinite number of small charges on this line of charge and adding them together.

If [tex]F = \frac{k q Q}{r^2} [/tex],

then [tex]dF = \frac{k q dQ}{r^2}[/tex], where [tex]dQ = Q (\frac{dl}{L}) = \frac {Q}{L} dl = \lambda dl [/tex]

(to find dF, we let dQ be an infinitely small charge and dF will be its infinite contribution. to find dQ, we take the infinite length that this charge possesses, dl, and take the percentage of the entire line that dl takes up. dl / L is like an infinite percentage that we multiply by Q to get dQ.)

So we have:

[tex]F = \int \frac{k q dQ}{r^2} = \int \frac{k q Q dl}{L r^2}. [/tex]

Here's where I have trouble. r is obviously changing for each charge, so I can't just pull it out of the integral. How to I write r, the distance from the point charge to each dQ, in terms of dl, an infinite length of the line, so that I can integrate?

More generally, how should I go about setting up integrals like this? I'm never sure if I should integrate dl and convert r, or integrate dr and convert dl. Does anyone have any tips on how to think about this?