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?

  • 1
    $\begingroup$ Are you sure an analytical solution exists? $\endgroup$ – Feyre Apr 17 '17 at 11:51
  • 1
    $\begingroup$ 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. $\endgroup$ – dearN Apr 17 '17 at 13:23
  • 1
    $\begingroup$ 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. $\endgroup$ – Chris K Apr 17 '17 at 13:41
  • $\begingroup$ @ChrisK Linear system or rxn-dfsn equation: could have Soliton solutions/Tanh method (analytical)? $\endgroup$ – dearN Apr 17 '17 at 14:39
  • $\begingroup$ @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. $\endgroup$ – Chris K Apr 17 '17 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[[2]], c[x, t]][[1]]
eqnf = teqn[[1]] /. 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.


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


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.