1
$\begingroup$

I have a question concerning NDSolve and a system of differential equations. I have 4 variables and 4 equations. Why do I get this ERROR :There are more dependent variables, {f[j,p],U[j,p],(f^(0,1))[j,p],(U^(0,1))[j,p]}, than equations, so the system is underdetermined. ???

V = 1000; ρ = 0.000013; L = 37;

eqns = {V p D[f[j, p], j] +  j D[U[j, p], j] +  U[j, p] + 6  ρ L j == 0, 
    V f[j, p] + V p D[f[j, p], p] + j D[U[j, p], p] == 0};

vars = {f[j, p], U[j, p]};

inits = {f[5, 10] == 0.1048, U[5, 10] == 3.6};

res = NDSolve[{eqns, inits}, vars, {j, p}]
$\endgroup$
  • $\begingroup$ A little tough reading your work, however I believe your problem may arise from using "=="; this tests if the left and right hand side are equal, it is not used to assign values $\endgroup$ – BOUNCE Apr 23 at 19:45
  • $\begingroup$ This set of equations can be solved manually to yield, 0.002886 j^2/2 + j U[j, p] + 1000 p f[j, p] == c, where c` is a constant. So, there are too few dependent variables. $\endgroup$ – bbgodfrey Apr 23 at 21:13
  • $\begingroup$ Your initial conditions doesn't make any sense. What are the four variables and four equations? $\endgroup$ – zhk Apr 24 at 1:31
  • $\begingroup$ Welcome to Mathematica.SE! I hope you will become a regular contributor. To get started, 1) take the introductory tour now, 2) when you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge, 3) remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign, and 4) give help too, by answering questions in your areas of expertise. $\endgroup$ – bbgodfrey Apr 24 at 12:41
1
$\begingroup$

To elaborate on my earlier comment, eqns can be rewritten as

eqns1 = {V D[p f[j, p], j] + D[j U[j, p], j] + 6 ρ L j == 0, 
    V D[p f[j, p], p] + D[j U[j, p], p] == 0};

That the two are equivalent can be verified by

Simplify[eqns == eqns1]
(* True *)

Introducing the new dependent variable,

g[j, p] == V p f[j, p] + j U[j, p]

further simplifies the equations to

eqns2 = {D[g[j, p], j] + 6 ρ L j == 0, D[g [j, p], p] == 0}

Neither DSolve nor NDSolve can handle these equations without human assistance, because there are two equations but only one dependent variable. However, the solution of these two equation clearly is

(* g[j, p] + 3 ρ L j^2 == c *)

with c a constant to be determined by a boundary condition. Inserting inits from the question yields after a small amount of algebra,

{* c -> 1066.036075 *}

Note that g is independent of p.

$\endgroup$

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.