0
$\begingroup$

I want to sole nonlinear coupled equation. there are 4 equations and 4 unknowns. I wrote the below code:

a = 1; c = 1; b = 1; d = 1; e = 1; r = 1; q = 1; j = 1;
NDSolve[{Laplacian[f1[x, y], {x, y}] == -a D[w[t, x, y], x],
  Laplacian[
    f2[x, y], {x, 
     y}] == -a D[w[t, x, y], y] (1 - 3 Cos[phi[t, x, y]]) + 
    3 a w[t, x, y] (D[Sin[phi[t, x, y]], y] + D[Cos[phi[t, x, y]], x]),
  D[w[t, x, y], 
    t] == -b (D[Sin[phi[t, x, y]], y] + D[Cos[phi[t, x, y]], x]) ,
  r D[Sin[phi[t, x, y]], t] == -q D[w[t, x, y], x] + 
    0.5 j (D[f1[x, y], y] - D[f2[x, y], x])}, phi, {t, 0, 3}, {x, -5, 
  5}, {y, -5, 5}]

But there is an error:

"There are fewer dependent variables, {phi[t,x,y],w[t,x,y]}, than \
equations, so the system is overdetermined."

How can I remove the error?

Applying suggested edits:

a = 1; c = 1; b = 1; d = 1; e = 1; r = 1; q = 1; j = 1;
NDSolve[{Laplacian[f1[t, x, y], {x, y}] == -a D[w[t, x, y], x], 
  Laplacian[
    f2[t, x, y], {x, 
     y}] == -a D[w[t, x, y], y] (1 - 3 Cos[phi[t, x, y]]) + 
    3 a w[t, x, 
      y] (D[Sin[phi[t, x, y]], y] + D[Cos[phi[t, x, y]], x]), 
  D[w[t, x, y], 
    t] == -b (D[Sin[phi[t, x, y]], y] + D[Cos[phi[t, x, y]], x]), 
  r D[Sin[phi[t, x, y]], t] == -q D[w[t, x, y], x] + 
    0.5 j (D[f1[t, x, y], y] - D[f2[t, x, y], x]), 
  phi[0, x, y] == Cos[x], f2[t, -5, y] == 1, f2[t, x, -5] == 1, 
  f1[t, x, 5] == 1, f2[t, x, 5] == 1, w[0, x, y] == a, 
  w[t, x, 5] == 0, w[t, x, -5] == 0, w[t, 5, y] == 0, 
  w[t, -5, y] == 0}, phi[t, x, y], w[t, x, y], f1[t, x, y], 
 f2[t, x, y], {t, 0, 3}, {x, -5, 5}, {y, -5, 5}]

Now, the error is: the arguments should be ordered consistently. >>

$\endgroup$
  • $\begingroup$ Yes they are only function of x and y. @zhk $\endgroup$ – Oliver Range Oct 31 '17 at 12:39
  • $\begingroup$ actually, it is a function of time only implicitly. $\endgroup$ – Oliver Range Oct 31 '17 at 12:44
  • 1
    $\begingroup$ I recommend that you eliminate f1 and f2 from your system of equations and apply NDSolve to the remaining equations and variables. You may encounter other problems, but you will be much closer to a final answer. $\endgroup$ – bbgodfrey Oct 31 '17 at 19:21
1
$\begingroup$

Of course it won't be solve! The problem is pretty obvious. You have 4 differential equations, 4 functions, f1[x,y], f2[x,y], w[t,x,y], and phi[t,x,y].

First of all, mathematically, if Laplacian[f1[x,y],{x,y}]=-D[w[t,x,y],x] then f1 must be a function of t as well. same goes for f2[x,y].

Second of all, you have second order differential equations, it means you need 2 boundary conditions or 2 initial values for one second order differential equation. You must figure out your boundary conditions first.

http://reference.wolfram.com/language/ref/NDSolve.html

Go to details, 9th bullet point states that:

The differential equations must contain enough initial or boundary conditions to determine the solutions for the ui completely.

So what you need to do,

  1. Fix your equations and their dependent and independent variables.

  2. Set enough boundary conditions.

  3. Also solve for f1, f2, and w. Without them you can not determine phi.

I hope this is Helpful.

Bests,

NR.

$\endgroup$
  • $\begingroup$ Please check the edits $\endgroup$ – Oliver Range Nov 2 '17 at 8:14
  • $\begingroup$ you added your boundary conditions before your last equation! Boundary conditions must be written after the equations. $\endgroup$ – Navid Rajil Nov 3 '17 at 15:30
  • $\begingroup$ I put them after equations but the error doesn't remove. Please check my edit $\endgroup$ – Oliver Range Nov 4 '17 at 9:02

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.