# Finding the particular solution to an inhomogeneous PDE by separation of variables

I'm trying to solve the following inhomogeneous PDE $$\nabla^2 p -gp + kr^{-3/2}e^{3r\sqrt{g}}\hat{r}=0$$ in two dimensions.

So far I've used separation of variables to solve the homogeneous version, $\nabla^2 p -gp =0$, which has general solution (for the $x$ coordinate) $$p_1 = \sum_{n=1}^{\infty}\left( \left[c_n I_n(r\sqrt{g}) + d_n K_n(r\sqrt{g})\right]\cdot \left[A_n\cos (n\phi) + B_n \sin(\phi)\right]\right).$$ ($I_n$ and $K_n$ are the modified Bessel functions; the solution of the $y$ coordinate has the same form.)

This is the part where I'm stuck. I'm not sure how to find the particular solution for the inhomogeneous version. I think I need to use separation of variables again, but I'm don't see how that will work out (the equation doesn't look separable to me).

On the other hand, I've been reading around about how to solve this kind of problem, and eigenfunctions seem to be a popular technique. I've been told that the expansion in terms of Bessel functions and Trig functions is complete, so I can write the inhomogeneous terms as $f(r) \cos \phi = \sum_n a_n \Phi_n(\phi) R_n(r)$. In this case, how would I go about finding the $a_n$?

$$\nabla^2 p -gp + kr^{-3/2}e^{3r\sqrt{g}}p=0$$ $$\frac{\partial^2p}{\partial r^2}+\frac{1}{r}\frac{\partial p}{\partial r}+\frac{1}{r^2}\frac{\partial^2p}{\partial \phi^2}+\left(-g +kr^{-3/2}e^{3r\sqrt{g}}\right)p=0$$ Isn't it an homogeneous equation ?
Using the separation of variables with $p=G(r)F(\phi)$ $$(G''+\frac1r G')F+\frac{1}{r^2}F''G+\left(-g +kr^{-3/2}e^{3r\sqrt{g}}\right)FG=0$$ $$\frac{F''}{F}=-r^2(G''+\frac1r G')\frac1G-r^2\left(-g +kr^{-3/2}e^{3r\sqrt{g}}\right)=\text{constant}=\mu$$ $$\begin{cases} \frac{F''}{F}=\mu \\ r^2G''+r G'+\left(-\mu+r^2g -kr^{1/2}e^{3r\sqrt{g}}\right)G=0 \end{cases}$$ One have to solve two second order linear ODEs.
• Thank you for your response. I've realised I made a mistake writing down the problem and will correct it above. The $p$ in the inhomogeneous term should be the unit radial vector. i.e. in the case of the $x$-coordinate it is $\cos\phi$. Feb 26, 2018 at 11:12