# A scalar on a semi-infinite domain with source and sink

Hi everyone,

I've been looking at a problem that seems simple at first, but appears to be deceptively difficult (unless I'm missing something).

1. Homework Statement

I've been looking at a problem that involves the diffusion of a scalar quantity, ##q(x)##, on the semi-infinite domain, ##\leq x < \infty##. If ##q(x)## represents a scalar quantity, such as heat, then it can diffuse throughout the domain ##\leq x < \infty##, but wont diffuse out of the boundary at ##x=0##. We don't however know what the value of ##q## is at ##x=0##.

On top of this, there is a source at ##x=a## (delta function), and a sink term that is proportional to the magnitude of ##q(x)##.

## Homework Equations

The overall equation is therefore $$\frac{\partial^2 q}{\partial x^2} - q = -\delta (x-a),$$ $$0\leq x <\infty .$$

## The Attempt at a Solution

It seems to me that the tricky part here is accounting for the boundary conditions. We know that since the source is at ##x=a## and there is a sink term, ##q(x) \rightarrow 0## as ##x\rightarrow \infty##. But how to account for the boundary condition at ##x=0##? If ##q(x)## were a vector quantity, I would imagine that the method of images could be used. Is there a useful equivalent for scalars?

If we look at the equation, the solution should be of the form, $$q(x)= Ae^{x}+Be^{-x}.$$ By substitution, we can then turn this into $$q(x)= Ce^{x-a}+De^{-(x-a)}.$$ In the ##x>a## region, therefore, ##C=0## (or else ##q## would diverge at infinity). But we can't do anything so simple in the ##0\leq x \leq a## region. So this leaves
$$q(x) = \begin{cases}Ce^{x-a}+De^{-(x-a)}, & 0\leq x\leq a \\ Ee^{-(x-a)}, & x>a \end{cases}$$
If I could reduce the number of unknowns from 3 to 1, it could solve it by integrating the governing equation over ##x \in [a^-,a^+]##.

Does anyone have any suggestion for how to proceed?

Orodruin
Staff Emeritus
Homework Helper
Gold Member
First of all, that is not the heat equation. The heat equation involves a time derivative.

Second, there is no sink in your problem. Heat will dissipate to infinity.
I would imagine that the method of images could be used. Is there a useful equivalent for scalars?
The method of images.

Have you done heat conduction on an infinite domain?

Hi Orodruin, thanks for your response. Yes, it's not the heat equation. I just mentioned heat as an example of a possible scalar quantity. I can see no reason why the time derivative couldn't be removed from the heat equation if the system is assumed to be steady state though.

As for sink terms though, surely the second term on the left-hand-side functions as a sink term?

Heat conduction on an infinite domain would be simple, I'd imagine. You could use the symmetry of the system to reduce the number of unknowns to 1, and then solve by integrating around ##x=a##.

I'm thinking of extending the domain to ##-\infty <x<\infty## and adding an image source term at ##x=-a##. I've only seen the method of images used for vector quantities though, so I want to be sure this is legitimate.

Orodruin
Staff Emeritus
Homework Helper
Gold Member
As for sink terms though, surely the second term on the left-hand-side functions as a sink term?

Yes, it is a sink proportional to the value of ##q## itself. Perhaps I did not read your OP well enough at first. However, note that this would generally come with an additional dimensionful constant (of dimension length^-2) in front - otherwise the dimensions

I'm thinking of extending the domain to ##-\infty <x<\infty## and adding an image source term at ##x=-a##. I've only seen the method of images used for vector quantities though, so I want to be sure this is legitimate.

Yes, this is perfectly legitimate. You can check that the resulting solution satisfies both your required boundary condition as well as the differential equation in the target region. The method of images is usually presented for scalar fields first. Often as the potential of a vector field for which you want to use it. Here, you can apply either the method of images or do what you started doing, there really is not much difference in difficulty, both involve finding the matching conditions at ##a## and relating to the boundaries.

If we look at the equation, the solution should be of the form, $$q(x)= Ae^{x}+Be^{-x}.$$ By substitution, we can then turn this into $$q(x)= Ce^{x-a}+De^{-(x-a)}.$$ In the ##x>a## region, therefore, ##C=0## (or else ##q## would diverge at infinity). But we can't do anything so simple in the ##0\leq x \leq a## region. So this leaves
$$q(x) = \begin{cases}Ce^{x-a}+De^{-(x-a)}, & 0\leq x\leq a \\ Ee^{-(x-a)}, & x>a \end{cases}$$
If I could reduce the number of unknowns from 3 to 1, it could solve it by integrating the governing equation over ##x \in [a^-,a^+]##.

Does anyone have any suggestion for how to proceed?

I never liked the "integrating over ##x \in [a^-,a^+]##" argument, which is usually accompanied by a continuity argument at ##a##. This pops right out of the differential equation if you just let ##q(x) = \theta(a-x)q_-(x) + \theta(x-a) q_+(x)##, where ##\theta(x)## is the Heaviside function. Insert this into the differential equation and identify the terms. This will automatically give you the matching conditions at ##x = a##. Note that you also have a boundary condition at ##x = 0## that you have not used yet.

Chestermiller
Mentor
If you integrate across x = a, you get $$\left(\frac{dq}{dx}\right)_{a^+}-\left(\frac{dq}{dx}\right)_{a^-}=-1$$If q is something like temperature, than, at x =0, dq/dx=0. This would guarantee that no heat enters or leaves the region at x = 0.

Orodruin
Staff Emeritus
Homework Helper
Gold Member
If you integrate across x = a, you get $$\left(\frac{dq}{dx}\right)_{a^+}-\left(\frac{dq}{dx}\right)_{a^-}=-1$$

As I said, I always disliked this argument. The more straight forward way of arguing is what I mentioned in #4 differentiating the Heaviside distributions. The matching conditions - including the continuity condition - follow directly from insertion into the differential equation.

Chestermiller
Mentor
As I said, I always disliked this argument. The more straight forward way of arguing is what I mentioned in #4 differentiating the Heaviside distributions. The matching conditions - including the continuity condition - follow directly from insertion into the differential equation.
Oh. Sorry. I was taught how to do heat transfer problems with a concentrated heat source this way.

Orodruin
Staff Emeritus
Homework Helper
Gold Member
Oh. Sorry. I was taught how to do heat transfer problems with a concentrated heat source this way.
It is not only applicable for heat source problems - but also to other differential equations with delta distributions in the inhomogeneities. Other popular examples include the Schrödinger equation with a delta potential and the wave equation with a point source. I was also taught this way, but I think using the Heaviside distributions is cleaner in some sense. It might just be my preference. The two things to remember are ##\theta'(x) = \delta(x)## and that ##f(x)\delta(x) = f(0)\delta(x)##.

I see what you mean about the integration method for equations with delta functions, Orodruin. It works in this instance because there's a double derivative in the equation. However, if we were to try to use it to solve, for example $$f'(t) = \delta (t-s),$$ it wouldn't work. So it's not a very general technique.

Chestermiller
Mentor
I see what you mean about the integration method for equations with delta functions, Orodruin. It works in this instance because there's a double derivative in the equation. However, if we were to try to use it to solve, for example $$f'(t) = \delta (t-s),$$ it wouldn't work. So it's not a very general technique.
Why doesn't it work in this case?

Why doesn't it work in this case?
Because if we integrate both sides over ##a-\epsilon <t< a+\epsilon## (then taking ##\epsilon \rightarrow 0##), the left-hand-side will appear to be zero (because ##f(t)## is incorrectly assumed to continuous with no singularities), while the right-hand-side equals 1.

I say appears to be zero because when I was taught this technique, we were essentially told to remove all first derivatives, which you can only do if you assume ##f(t)## is continuous (which it isn't in this case). I'm not sure if there's a way to use that technique without assuming ##f(t)## to be continuous.

Orodruin
Staff Emeritus
$$f'(t) = \delta(t-s) [f_+(s) - f_-(s)] +\theta(t-s)f_+'(t) + \theta(s-t) f_-'(t) = \delta(t-s)$$