0
$\begingroup$

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.

enter image description here

This is how I used DSolve

enter image description here

Can you help me please ?

$\endgroup$
  • 2
    $\begingroup$ Please add the code that you ran (rather than a screenshot) to the question so we can reproduce the problem. $\endgroup$ – Rohit Namjoshi Dec 18 '18 at 20:55
5
$\begingroup$

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}} *)
$\endgroup$
  • $\begingroup$ 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]. $\endgroup$ – Elyes Abidi Dec 18 '18 at 19:44
  • $\begingroup$ Add them to the eqns. See the documentation for DSolve $\endgroup$ – Bob Hanlon Dec 18 '18 at 19:46
  • $\begingroup$ can you please show me how to plot them i need to see the graphe $\endgroup$ – Elyes Abidi Dec 18 '18 at 19:50
  • $\begingroup$ 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. $\endgroup$ – Bob Hanlon Dec 18 '18 at 20:47

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.