0
$\begingroup$

After using DSolve to a set of differential equations, three constants arise. They are C[1], C[2] and C[21]. I have checked thoroughly that there are no C[3], C[4],....C[20]. It is quite mysterious to me as normally the constants are in numerical order. Is there any relationship between C[21] and C[1] or C[2]? Thank you very much.

$\endgroup$
5
  • 1
    $\begingroup$ Can you provide your differential equations? $\endgroup$
    – Chip Hurst
    Feb 18 '15 at 21:28
  • 1
    $\begingroup$ @bill It looks like the poster knows this. The issue seems to be the occurrence of a C[21] instead of the expected C[3]. $\endgroup$ Feb 18 '15 at 23:25
  • 1
    $\begingroup$ Probably the other ones were used and then discarded. There should be no relationship between C[21] and C[1] and C[2]. (That's really a wild guess, since it's impossible to know without code that reproduces the problem.) It's also possible that you already have definitions for C[3] through C[20]. $\endgroup$
    – Michael E2
    Feb 19 '15 at 0:13
  • $\begingroup$ My differential equations (DAEs) are too long. They are 40 equations. Yet 20 of them are coupled to each other and the other 20 coupled to the other 20. It is also expected that in the first set (the first 20), there are two constants. For another set (the other 20), there is one constant. Is this the reason why the third constant is named C[21] but not C[3]? There are 3 differential equations in these 40 DAEs; they are located in the first, seventh and the twenty-first equation. $\endgroup$
    – Ka-Wa Yip
    Feb 19 '15 at 1:07
  • $\begingroup$ I have pasted my complete example on mathematica.stackexchange.com/questions/75845/… Any help on the relation between C[21] with C[1] and C[2] is very appreciated. $\endgroup$
    – Ka-Wa Yip
    Feb 25 '15 at 6:46
1
$\begingroup$

According to the documentation for GeneratedParameters:

  • The typical default setting is GeneratedParameters -> C.
  • The setting GeneratedParameters -> f specifies that successive generated parameters should be named f[1], f[2], …
  • In typical cases, the f[i] are used to parameterize families of solutions to equations.
  • The f[i] usually correspond to free parameters, but are also sometimes used to represent arbitrary functions.
  • The f[i] have indices that start at 1 for each invocation of a particular symbolic operation.

Presumably there were (at least) 21 invocations of "a particular symbolic operation." Without more information about your functions it is hard to be more specific.

$\endgroup$
1

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.