# solution of system of coupled partial differential equations

I want to solve the following system of coupled differential equations:

$\frac{\partial f(x,t)}{\partial t}=b~\frac{\partial^{2}f(x,t)}{\partial x^{2}}-k~f(x,t)+g~ c(x,t)$

$\frac{\partial c(x,t)}{\partial t}=k~f(x,t)-g~c(x,t)$

with $f(x,0)=a$ and $c(x,0)=0$. The corresponding mathematica code is:

DSolve[{D[f[x, t], t] == b D[f[x, t], {x, 2}] - k f[x, t] + g c[x, t],
D[c[x, t], t] == k f[x, t] - g c[x, t], f[x, 0] == a, c[x, 0] == 0},
{f[x,t], c[x,t]}, {x, t}]


But the mathematica returns the code itself. Any idea how can I solve this?

• Are you sure an analytical solution exists? Apr 17, 2017 at 11:51
• Could you include more context for this coupled set of equations? What physics are you trying to demonstrate or solve? That may help. Looks to be a non-homogeneous heat equation where the the (convection) term $g\, c(x,t)$ shows coupled behaviour? Boundary conditions would help too. Apr 17, 2017 at 13:23
• This is a linear set of reaction-diffusion equations - could come from linearizing a nonlinear set as in stability analysis for Turing patterns? Anyhow, you probably do need boundary conditions as @drN suggests. Since your initial conditions are spatially homogeneous, the diffusion term is zero, so in its current form you could change to a set of ODEs. Apr 17, 2017 at 13:41
• @ChrisK Linear system or rxn-dfsn equation: could have Soliton solutions/Tanh method (analytical)? Apr 17, 2017 at 14:39
• @drN I don't know about that. It should depend on BCs. Maybe a sum of $e^{ikx+\lambda_kt}$ terms works? Check this out for example. Apr 17, 2017 at 15:16

I introduced two boundary conditions on $$x$$ which are

$$\frac{\partial f}{\partial x}f(0,t) = \frac{\partial f}{\partial x}f(L,t) = 0$$

to facilitate the Laplace Transform technique. Using the Laplace transformation

Clear[f, c, t, x]
eqn = {D[f[x, t], t] - b D[f[x, t], {x, 2}] + k f[x, t] - g c[x, t] == 0, D[c[x, t], t] - k f[x, t] + g c[x, t] == 0};
ic = {f[x, 0] == a, c[x, 0] == b};
bc = {Derivative[1, 0][f][0, t] == Derivative[1, 0][f][L, t] == 0};
teqn = Flatten[LaplaceTransform[{eqn, bc}, t, s] /. Rule @@@ ic /. HoldPattern@LaplaceTransform[a_, __] :> a]


after that, extracting and substituting $$c(x,t)$$

solc = Solve[teqn[], c[x, t]][]
eqnf = teqn[] /. solc


Solving for $$x$$

tsol = f[x, t] /. First@DSolve[{eqnf, bc}, f[x, t], x] // FullSimplify


and finally determining $$f(x,t)$$

InverseLaplaceTransform[tsol, s, t]


after that, $$c(x,t)$$ is straightforward.

NOTE

Depending on the boundary conditions, the Laplace inversion could be not easily obtained, in which case a residues solution can be an alternative.