# Separation of variables for nonhomogeneous differential equation

• I
Telemachus
Hi. I was wondering if it is possible to apply separation of variables for a function of space and time obeying a non homogeneous differential equation. In particular, the heat equation:

##\displaystyle \frac{\partial \Phi(\mathbf{r},t)}{\partial t}-\nabla \cdot \left [ \kappa(\mathbf{r}) \nabla \Phi(\mathbf{r},t) \right] + \mu (\mathbf{r}) \Phi(\mathbf{r},t)=q(\mathbf{r},t)##.

In particular, I was trying a separation of variables in spherical coordinates. This equation in spherical coordinates is (if I've done everything right):

##\displaystyle \frac{\partial \Phi }{\partial t}- \frac{1}{r^2}\frac{\partial }{\partial r} \left( r^2 \kappa \Phi \right) -\frac{1}{r\sin \theta }\frac{\partial}{\partial \theta}\left( \frac{\sin \theta \kappa}{r} \frac{\partial \Phi }{\partial \theta} \right) - \frac{1}{r\sin \theta} \frac{\partial}{\partial \phi} \left(\frac{\kappa}{r\sin \theta} \frac{\partial \Phi}{\partial \phi}\right) + \mu \Phi=q##.

Where ##\Phi (\mathbf{r},t) =\Phi (r,\theta,\phi,t)## and I attempted a solution in the form:

##\Phi (r,\theta,\phi,t)=\rho(r)\Theta(\theta)\Psi(\phi)T(t)##.

I could separate the spatial from the temporal part considering first the homogeneous equation. I've called: ##\Theta(\theta)\Psi(\phi)=A(\theta,\phi)##

So in the first place I get, calling the spatial part ##\rho(r)\Theta(\theta)\Psi(\phi)=S=\rho(r)A(\theta,\phi)##:

##\frac{\partial T}{\partial t}=-\lambda T##

##-\nabla \cdot \left [ \kappa \nabla S \right] + \mu S=-\lambda S##

Then when I attempt to separate the second equation I arrive to this equation:

##\displaystyle - \frac{1}{\rho} \frac{\partial }{\partial r} \left( r^2 \kappa \Phi \right) - \frac{1}{A \sin \theta} \frac{\partial}{\partial \theta} \left( \sin \theta \kappa \frac{\partial A }{\partial \theta} \right) - \frac{1}{A \sin \theta} \frac{\partial}{\partial \phi} \left( \frac{\kappa}{\sin \theta} \frac{\partial A}{\partial \phi} \right) =r^2\left(-\lambda+\mu \right)##

So, in the right hand side and in the left hand side I have the coefficients ##\kappa## and ##\mu## which depend on the three variables. Is it possible to write something like ##\kappa=\kappa_r(r)\kappa_{\theta}(\theta)\kappa_{\phi}(\phi)## and similarly with ##\mu## in order to get separated equations or these are not separable at all?

Does this has something to do with the non commutative operator ##\displaystyle \mathcal{L} = \nabla \cdot \left[\kappa \nabla \right]+\mu##?

Last edited:

Telemachus
I can't edit now, but the last equation should read:

##\displaystyle - \frac{1}{\rho} \frac{\partial }{\partial r} \left( r^2 \kappa \rho \right) - \frac{1}{A \sin \theta} \frac{\partial}{\partial \theta} \left( \sin \theta \kappa \frac{\partial A }{\partial \theta} \right) - \frac{1}{A \sin \theta} \frac{\partial}{\partial \phi} \left( \frac{\kappa}{\sin \theta} \frac{\partial A}{\partial \phi} \right) =r^2\left(-\lambda+\mu \right)##

Gold Member
Separation of variables is a technique useful for homogeneous problems. For your non-homogeneous problem you need another approach. However, even for the homogeneous version of your equation, it will be separable only for specific forms of ##\kappa(\mathbf{r})## and ##\mu(\mathbf{r})##, and for certain forms of the boundary conditions.

Edit: note that the shapes of your boundaries must also be on surfaces of constant coordinates, otherwise separation of variables will not work.

If your homogeneous problem is separable then you might be able to take the standard approach of using eigenfunctions of the homogenous problem to solve the non-homogeneous problem. In particular, I would look at the eigenfunctions of the spatial part of your operator, and expand ##q## and ##\Phi## as a series with time-varying coefficients. For this to work at all, the equation with boundary conditions needs to be separable, the eigenfunctions need to be complete, and for practical reasons you hope the eigenfunctions are orthogonal. Otherwise you need another approach.

good luck,

jason

Last edited:
• Telemachus