The GeneratedParameters Option
The general solution to a differential equation contains undetermined coefficients that are labeled
C
,
C
, and so on.
This example has one undetermined parameter,
C
.
| Out[1]= |  |
To change the name of the undetermined parameter, use the
GeneratedParameters option.
This changes the name of the undetermined coefficient to

.
| Out[2]= |  |
The parameter
C should be thought of as a pure function that acts on a set of indices to generate different constants
C[i].
This shows the behavior of
C.
| Out[5]= |  |
| Out[6]= |  |
Internally, the use of a pure function allows
DSolve to increment the argument

in
C[i] correctly for higher-order ODEs and systems of ODEs.
| Out[7]= |  |
Using a pure function is particularly useful if you want to begin indexing the parameters at any value other than 1 (the default).
This uses a pure function to label the parameters in the previous example
const[2] and
const[3].
| Out[8]= |  |
It is sometimes useful to display the solution using subscripts or other styles for the parameter indices.
Here, the parameters are named using subscripted variables.
| Out[9]= |  |
Finally, with
Module variables, you can get names for the parameters that are unique across different invocations of
DSolve.
Here the same
DSolve call generates different parameter names.
| Out[10]= |  |
| Out[11]= |  |