I have to calculate the vectorpotential of a current flowing through the loop at the origin:
where the current is given by $I(t)=kt$ for some $k>0$.
Given equations $$\mathbf{A} = \frac{\mu_0}{4\pi} \int \frac{\mathbf{J}(\mathbf{r'},t_r)}{| \mathbf{r}-\mathbf{r'} |}d\tau'$$ where $t_r$ is the retarded time given by $t_r = t - \frac{|\mathbf{r}-\mathbf{r}'|}{c}$. Since I have to work with the origin, $t_r = t-\frac{|\mathbf{r'}|}{c}$.
I want to find the potential in the origin. To do this, i plugged the information into the formula (replacing $\mathbf{J}$ with $\mathbf{I}$ everywhere, and integrating over each line segment separately) :
\begin{align} \mathbf{A}(0,t) = \frac{\mu_0 k}{4\pi} \left[\hat{\mathbf{x}}\int_{a}^{b} \frac{t}{\ell}-\frac{1}{c} d\ell + \hat{\mathbf{x}} \int_{-b}^{-a} \frac{t}{\ell}-\frac{1}{c} d\ell + \int_{0}^{\pi} \hat{\boldsymbol{\theta}} \frac{t-b/c}{b} b d\theta + \int_{\pi}^{0} \hat{\boldsymbol{\theta}} \frac{t-a/c}{a} a d\theta \right] \end{align}
I tried using $\hat{\boldsymbol{\theta}} = -\hat{\mathbf{x}} \sin(\theta) + \hat{\mathbf{y}} \cos(\theta)$ to calculate the integral, however this resulted in the wrong answer.
I don't know where I went wrong in setting up the integrals. I suspect I made a mistake with the integrals on the $x$-axis as someone said there should be a $\log$ in my final answer which probably results from the integral of $\frac{1}{\ell}$ on that segment.
Any help would be greatly appreciated!
Note: this is an exercise from Griffith's electrodynamics (chapter 10.2)