## Gravitational Potential Due to a Thin Rod of Varying Density.

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

GRAVITATIONAL POTENTIAL AND FIELD DUE TO A “THIN” ROD
A thin rod of length L lies along the +y-axis, with one end at the
origin (see diagram).
Assume:
• The rod has length only- no thickness in other directions.
• The density of the rod increases proportionally to the
y-coordinate: λ = ky, where k is a known constant and λ is in
kg/m
• Gravitational potential is zero at infinity: φ (∞) = 0

a) Find the gravitational potential φ ( x) at a point (x,0) by direct integration.
b) Find the gravitational field g at a point (x,0) by direct integration.

2. Relevant equations

dφ = -(G dm)/r

3. The attempt at a solution

Still stuck on part a, so that's really the brunt of my question for now (though assistance with part b is more than welcome!).

Using the given density function to solve for dm and substituting √(x^2+y^2) for r, I have an expression for dφ:

dφ = -(Gk y dy)/√(x^2+y^2)

...but I have no idea how to manipulate this to get a soluble integral :( I've been messing around with partial derivatives and polar coordinates for hours, but nothing seems to work.