1
$\begingroup$

I am trying to solve a complicated system of differential equations which can be reduced to a MWE of this kind:

NDSolve[{c'[x] == 10 d[x, y] + D[d[x, y], x], D[d[x, y], {x,2}] + D[d[x, y], {y,2}] == 1, c[0] == 0, DirichletCondition[d[x, y] == 0, True]}, {c, d}, {x, 0,   1}, {y, 0, 1}]

There is one function $c$ that only depends on a variable $x$, while the other function $d$ depends on both $x,y$. Trying to execute that code I get the error

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

How can I solve it?

I use version 11.3 for Linux if needed

$\endgroup$
3
  • $\begingroup$ Can you treat c[] formally as a function of x and y, even though as a function of y it is constant? $\endgroup$
    – Michael E2
    Commented Oct 19, 2020 at 13:48
  • $\begingroup$ @MichaelE2 I think it is possible $\endgroup$
    – mattiav27
    Commented Oct 19, 2020 at 13:49
  • $\begingroup$ @cvgmt d[x, y] must satisfy {D[d[x, y], {x, 2}] + D[d[x, y], {y, 2}] == 1, D[10 d[x, y] + D[d[x, y], x], y] == 0}. $\endgroup$
    – bbgodfrey
    Commented Oct 19, 2020 at 20:02

1 Answer 1

1
$\begingroup$

Maybe split the question into two differential equations.

Update

Clear["`*"];
sol = NDSolve[{D[d[x, y], {x, 2}] + D[d[x, y], {y, 2}] == 1, 
   DirichletCondition[d[x, y] == 0, True]}, d, {x, 0, 1}, {y, 0, 1}]
NDSolve[{D[c[x, y], x] == 10 d[x, y] + D[d[x, y], x], 
   c[0, y] == 0} /. sol, c, {x, 0, 1}, {y, 0, 1}]

Original

Clear["`*"];
sol = NDSolve[{D[d[x, y], {x, 2}] + D[d[x, y], {y, 2}] == 1, 
   DirichletCondition[d[x, y] == 0, True]}, d, {x, 0, 1}, {y, 0, 1}]
With[{y = .1}, 
 NDSolve[{c'[x] == 10 d[x, y] + D[d[x, y], x], c[0] == 0} /. sol, 
  c, {x, 0, 1}]]
$\endgroup$
3
  • 1
    $\begingroup$ Solution c[x,y] should fullfill Derivative[0,1][c][x,y]==0 $\endgroup$ Commented Oct 19, 2020 at 17:24
  • $\begingroup$ @UlrichNeumann How do I add that condition? $\endgroup$
    – mattiav27
    Commented Oct 20, 2020 at 6:43
  • $\begingroup$ @mattiav27 Actually I don't know. My intention was to show that the solution given by cvgmt isn't the one you are looking for. $\endgroup$ Commented Oct 20, 2020 at 6:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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