Starting from here: $$ \frac{\partial}{\partial r}u\left(r,t\right)+\frac{1}{r}u\left(r,t\right)=f\left(t\right)$$
(this is a partial differential equation in a cylindrical coordinate system $\left(r,\theta,z\right)$)
Show that
$$u=\frac{1}{2}f\left(t\right)r+\frac{g\left(t\right)}{r}$$
where $f$ and $g$ are arbitrary functions of time.
let $y(x)=u(r,t)$
let $x=r$
let $f=f(t)$
hence we can re-write the expression as:
$$ \frac{dy}{dx} + \frac{1}{x} y = f$$
we have a linear first order ODE:
$$ \frac{dy}{dx} + p(x)y(x) = q(x)$$
using Integrating Factor method...
i.e. we multiply across by a function $\mu(x)$ that has the property that:
$$\frac{d}{dx}\left[\mu(x) y(x)\right]=\mu(x) \left(\frac{dy}{dx} + p(x)y(x)\right) $$
this allows us to write: $$\frac{d}{dx}\left[\mu(x) y(x)\right] = \mu (x) q(x)$$
$$\mu(x) y(x) = \int \mu (x) q(x) dx$$ $$ y(x) = \mu(x)^{-1}\int \mu (x) q(x) dx$$
In order for integrating factor $\mu$ to have the property seen above it must satisfy the ODE:
$$\mu(x)p(x)=\frac{d\mu}{d x}$$
hence:
$$\mu(x)=e^{\int p(x) dx}$$
In our situation:
$$p(x)=\frac{1}{x}$$
$$\mu(x)=e^{\int p(x) dx}$$
$$\mu(x)=e^{\int \frac{1}{x} dx}=e^{\log(x)}=x$$
$$ y(x) = \mu(x)^{-1}\int \mu (x) q(x) dx$$
$$q(x)= f$$
$$ y(x) = x^{-1}\int x q(x) dx$$
$$ y(x) = x^{-1}\int x f dx$$
$$ y(x) = x^{-1} \left(\frac{1}{2}x^{2}f + g\right)$$
$$ y(x) = \frac{1}{2}f x + \frac{1}{x}g$$
$$ u = \frac{1}{2}f\left(t\right) r + \frac{1}{r}g\left(t\right)$$