# Charged rod question

I've been having trouble with this one for a while, and I know where I'm stuck. Here's the problem:

There's a uniformly charged rod of length "L" along the x axis. There is also a point on the x axis that is a distance of "a" away from the end of the rod. So the whole thing looks kind of like this. ----- o
I need to find the integral that will give me the magnitude of the electric field at that point. I started by using the charge density to come up with an expression for the infinitly small point charges that make up the rod. I got Q/L dx. So I put that into my equation for the field, dE, and I got

dE =k(Q/L dx) / r squared

where k is the constant from coulomb's law and r is the distance between each dx and the point I'm looking at. If the rest of this equation is correct (and I'm not sure that it is) my problem comes from finding an expression for r. The question asks me to "show with integration" that the field at the point is given by kq/a(a+L). I'm not sure how to represent the distance from the point charges to the point in the field that I'm measuring.