# Solving coupled pde

I am new to Mathematica and I want to solve this coupled pde I used this DSolve but it did not work. I am not sure what I did wrong.

This is how I used DSolve

Can you help me please ?

• Please add the code that you ran (rather than a screenshot) to the question so we can reproduce the problem. Commented Dec 18, 2018 at 20:55

Use InputForm when providing input to the notebook and you will be less likely to make mistakes. Also, when posting to this site, convert any code to InputForm and copy and paste the code (as a code block) rather than a picture of the code.

Clear["Global*"]

eqns = {w D[c[x, t], t] + u D[c[x, t], x] -
v  D[c[x, t], {x, 2}] == - k c[x, t] s[x, t],
D[s[x, t], t] == -p k c[x, t] s[x, t]};

sol = DSolve[eqns, {c, s}, {x, t}]

(* {{c -> Function[{x, t}, -(1/(k p w))
2 C[1] (u - 2 v C[1]) (-1 +
Tanh[x C[1] - (t C[1] (u - 2 v C[1]))/w + C[3]])],
s -> Function[{x, t}, (
2 v C[1]^2 (1 + Tanh[x C[1] - (t C[1] (u - 2 v C[1]))/w + C[3]])^2)/
k]}, {c ->
Function[{x, t}, -(1/(k p w))
2 C[1] (u + 2 v C[1]) (1 +
Tanh[x C[1] - (t C[1] (u + 2 v C[1]))/w + C[3]])],
s -> Function[{x, t}, (
2 v C[1]^2 (-1 + Tanh[x C[1] - (t C[1] (u + 2 v C[1]))/w + C[3]])^2)/
k]}, {c ->
Function[{x, t}, (2 C[2] Tanh[t C[2] - (w x C[2])/u + C[3]])/(k p)],
s -> Function[{x, t}, (1/(k u^2))
2 v w^2 C[
2]^2 (-1 + Tanh[t C[2] - (w x C[2])/u + C[3]]) (1 +
Tanh[t C[2] - (w x C[2])/u + C[3]])]}} *)


where the C[i] are arbitrary constants.

Verifying that the solutions satisfy the equations

eqns /. sol // Simplify

(* {{True, True}, {True, True}, {True, True}} *)

• thank you so much now if i want to add so me initial conditions, how can i do it c(0, t) = cd(t), for t in [0,T], c(L, t) = 0, for t in [0,T], c(x,0) = 0, for x in [0,L], s(x,0) = s0, for x in [0,L]. Commented Dec 18, 2018 at 19:44
• Add them to the eqns. See the documentation for DSolve` Commented Dec 18, 2018 at 19:46
• can you please show me how to plot them i need to see the graphe Commented Dec 18, 2018 at 19:50
• Assign values to constants/parameters and see documentation for Plot3D. If you have questions, show the code for what you have tried, state what problems you are having, and what error messages you are receiving. Commented Dec 18, 2018 at 20:47