I have a proble with a system of two differential equations

operh[h_, c_] :=  h D[D[h, r, r] + 1/r D[h, r] - h, r] + m D[c, r]
operc[h_, c_] := {cmt h + 1/Sqrt[R² - r²] -    1/r D[r h (1 + h⁴  D[c, r]²) D[c, r], r]}

I want to solve the case when they are equal to zero

deqh := operh[h[r], c[r]] == 0
deqc := operc [h[r], c[r]] == 0 

For that I define "shot", a function of "cmt" (appears in the second equation), and of one coefficient "coefh" (appears in the taylor expansion of h) as follow:

shot[coefh_? NumericQ, cmt_? NumericQ] := {taylor expansion of h (variable r), taylor expansion of c (variable r); NDSolve{deqh,deqc}}

My problem is when I try to evaluate my fonction "shot", (I have an error message of course) and variables followed by the dollar symbol appear:

error:divided by 0, + other error messages
out[]:2.85328 (2 - r$)+ higher terms in r$, rh[r]c'[r]+ other terms with normal r

Where does this $ come from ? I beleive some of the other errors messages are related to this one.

Sorry for the big code post, but this is my very first use of mathematica and I didn't manage to isolate the error better than that...

Thanks for your help!

| improve this question | | | | |
  • 2
    $\begingroup$ Please post a complete working example (without the pseudo code "taylor expansion" in the third box). Look at Series if you don't know about it. $\endgroup$ – Jess Riedel Jun 1 '16 at 19:44

The $ is a symbol used by Mathematica to generate local variable names for variables that are confined to a particular scope. For instance, if you run

Module[{x}, Print[x]]

you'll find it prints something like x$4456. This is the name Mathematica gave the variable to distinguish it from any other x's outside the Module.

| improve this answer | | | | |

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