# Coupled pdes with two different derivatives

Can someone please help me with solving the following coupled equations for $$m(x,t)$$, $$p(x,t)$$, and $$u(x,t)$$, in an interval $$0? I found it very hard as the second equation has both x and t derivatives of $$m$$.

\begin{align} 0&= a \partial_x^2 u(x,t)+s \partial_x p(x,t) ,\\ 0&=m(x,t) s p(x,t) -c \partial_x^2 \partial_t m(x,t)+b s \partial_x^2 p(x,t)\\ \partial_t p(x,t)&= f \partial_x^2 p(x,t) +j p(x,t)^3 +p(x,t) (z-\partial_x u(x,t) +g\partial_t m(x,t)), \end{align}

The initial and boundary conditions are

\begin{align} m(0,t)&=0\\ m(5,t)&=0\\ \partial_x u(0,t)&= 0\\ \partial_x u(5,t)&=0\\ p(x,0)&=1+0.1 \: e^{-(x-2.5)^2}\\ p(0,t)&= 1+0.1 \: e^{-(2.5)^2}\\ p(5,t)&= 1+0.1 \: e^{-(2.5)^2}\\ \end{align}

and the constants are $$a=4,b=,c=1,s=3, b=1, f=1, j=-0.1, z=1, g=0.8.$$

• I fixed your latex. Do not put latex in code mode. This makes it not display by mathjax. It should start at left edge. And do not put "," at end of each align equation. This is not good math. Each equation should just end with "\\" and not with "\\," . Commented May 15 at 21:01
• Did you try NDSolve or just DSolve ? it will be better to post your Mathematica code that you tried, even if it did not work. Commented May 15 at 21:03
• @Nasser Thank you very much. I have added my code. I used NDSolve. Commented May 15 at 23:54
• I cannot add my code as it the latex bit you added gives an error! Commented May 15 at 23:56
• Your post appears to contain code that is not properly formatted as code. Please indent all code by 4 spaces using the code toolbar button or the CTRL+K keyboard shortcut. For more editing help, click the [?] toolbar icon. @Nasser Commented May 15 at 23:57

First equation can be integrated alone, as result we have for ux=D[u[x,t],x]

L = 5; j = -0.1; f = 1; g = 0.8; a = 4; b = 1; c = 1; s = 3; tmax = \
3; equ = {a  D[u[x, t], {x, 2}] + s  D[p[x, t], x] == 0,
Derivative[1, 0][u][L, t] == 0, Derivative[1, 0][u][0, t] == 0};

ux = s/a (1 + 0.1  Exp[-(2.5)^2] - p[x, t]);


Two other equation can be solved with NDSolve as follows

eqs = {s  m[x, t]  p[x, t] - c  D[D[m[x, t], {x, 2}], t] +
b  s  D[p[x, t], {x, 2}] ==
0, -D[p[x, t], t] + f  D[p[x, t], {x, 2}] + j  p[x, t]^3 +
p[x, t]  (z - ux + g  D[m[x, t], t]) == 0}; bc = {m[0, t] == 0,
m[L, t] == 0, p[0, t] == 1 + 0.1  Exp[-(2.5)^2],
p[L, t] == 1 + 0.1  Exp[-(2.5)^2]}; ic = {p[x, 0] ==
1 + 0.1  Exp[-(x - 2.5)^2]};

z = 1; sol =
NDSolveValue[{eqs, ic, bc, m[x, 0] == 0}, {p[x, t], m[x, t]}, {x, 0,
L}, {t, 0, tmax},
Method -> {"MethodOfLines",
"SpatialDiscretization" -> {"TensorProductGrid",
"MaxPoints" -> 401, "MinPoints" -> 401,
"DifferenceOrder" -> 2}}]


Visualization

{DensityPlot[sol[[1]], {x, 0, L}, {t, 0, tmax},
ColorFunction -> "Rainbow", PlotLegends -> Automatic,
FrameLabel -> Automatic, PlotLabel -> "p"],
DensityPlot[sol[[2]], {x, 0, L}, {t, 0, tmax},
ColorFunction -> "Rainbow", PlotLegends -> Automatic,
FrameLabel -> Automatic, PlotLabel -> "m", PlotPoints -> 100]}