# Obtain the vector potential and magnetic vector of infinite wire carrying charge

I'm working on the question above, but I'm really stuck for days. my goal is to implement the following Problem in Mathematica. Any help would be appreciated.

I want to evaluate the following integral then take curl:

{Az} =
Integrate[1/Sqrt[rho^2 + z^2], {z, 0, l},
Assumptions -> {l = const, Element[rho, Reals]}]
`

In accordance with problem clarification!

Another approach: Do you have any idea for doing it in spherical coordinates?

• Asking us to read your text book and solve one of its exercises for you is not likely to be well received here. You would have a better chance of getting help if you asked about a specific Mathematica issue with your code that is a sticking point. – m_goldberg Jan 20 at 13:22
• @m_goldberg actually I know the code for things like computing the ring vector and .. , but this problem the integral just diverges! what should I do about it – Farhad Jan 20 at 13:40
• We need see the actual code to answer that. Please edit your question to provide code that is failing and all the supporting definitions needed to make the code evaluate it. – m_goldberg Jan 20 at 13:49
• I've edited it thanks @m_goldberg – Farhad Jan 20 at 14:02
• @jens whould you please take a look – Farhad Jan 20 at 14:43