# Thread: 2nd order, linear, 1-D, nonhomogeneous reaction-diffusion equation

1. ## 2nd order, linear, 1-D, nonhomogeneous reaction-diffusion equation

I'm working on a reaction-diffusion equation of the form

Pt = DPxx – KP + H
where Pt = dP/dt and Pxx = d2P/dx2

This is for a semi-infinite continuum, where P(x=0) is held at Po, the initial P along the continuum is 0, and the flux out the end is 0 (dP/dx = 0). I'm not certain whether it is helpful to define a length of the continuum, L where the zero flux BC is defined, thus making the continuum finite.

According to Carslan and Jaeger (1959) section 4.14, the solution strategy is identify

P(x,t) = Q(x) + R(x,t)

where Q is not a function of time, and R is. Put the non-homogeneous terms in Q to form a 2nd order non-homogeneous ODE, and leave R as a homogeneous PDE.

ODE in Q:
DQxx – KQ + H = 0
This is a steady state equation, which uses the mixed boundary conditions:
P(0,t) = Po
dP/dx(infinity, t) = 0
PDE in R:
Rt = DQxx – KR
This uses the initial condition:
P(x,0) = 0.
My questions in this forum are (a) did I set it up right and (b) I can't solve R

I believe the solution for Q is as follows:
(1) solve the homogeneous part of Q:
Q’’ – (K/D) = 0
find the roots of the quadratic equation
ay’’ + by’ + c = 0
r = ±sqrt(K/D)

Q = C1exp(-rx) + C2exp(+rx) + Ys

(2) solve Ys, the non-homogenous part of Q by method of unknown coefficients:
try Ys = Ax2 + Bx + C
Y’s = 2Ax + B
Y’’s = 2A

substitute into Q:
Y’’ - (K/D)Y = -(H/D)
-(K/D)Ax2 – (K/D)Bx – (K/D)C + 2A = -(H/D)
gather the terms:
-(K/D)A = 0 -> A=0
-(K/D)B = 0 -> B=0
2A - -(K/D)C = -(H/D) -> C=(H/K)

plug coefficients back into general soln for Ys:
Ys = (H/K)

Q = C1exp(-rx) + C2exp(+rx) + (H/K)

Matlab's dsolve agrees qualitatively with this solution.
The solution fo R is proving to be more difficult for me. According to Carslon and Jaeger, the strategy for R is to substitute R = Se-kt, yielding St = DSxx but I haven’t figured out how to do this one yet. Any advice?

2. ## Re: 2nd order, linear, 1-D, nonhomogeneous reaction-diffusion equation

A couple of questions.

1) Are D, K and H all constant. If not, do you know the forms of them?

2) Are you on a finite domain or semi-infinite domain? The solution procedures for each will be different.

3. ## Re: 2nd order, linear, 1-D, nonhomogeneous reaction-diffusion equation

(1) Great point. D, H, and K are all constant.
(2) I'm not sure. I had originally conceptualized this as being infinite, but researching in more detail, I think it would be an easier question if it has a defined length L. In any event the length of the domain L is >> the length scale in D (say 5,000x).