# How to solve a system of differential equation like this one

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, 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

• Can you treat c[] formally as a function of x and y, even though as a function of y it is constant? Oct 19, 2020 at 13:48
• @MichaelE2 I think it is possible Oct 19, 2020 at 13:49
• @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}. Oct 19, 2020 at 20:02

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} /. sol,
c, {x, 0, 1}]]

• Solution c[x,y] should fullfill Derivative[0,1][c][x,y]==0 Oct 19, 2020 at 17:24
• @UlrichNeumann How do I add that condition? Oct 20, 2020 at 6:43
• @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. Oct 20, 2020 at 6:52