This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)

The GeneratedParameters Option

The general solution to a differential equation contains undetermined coefficients that are labeled C[1], C[2], and so on.
This example has one undetermined parameter, C[1].
In[1]:=
Click for copyable input
Out[1]=
To change the name of the undetermined parameter, use the GeneratedParameters option.
This changes the name of the undetermined coefficient to P[1].
In[2]:=
Click for copyable input
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.
In[3]:=
Click for copyable input
In[4]:=
Click for copyable input
In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]=
Internally, the use of a pure function allows DSolve to increment the argument i in C[i] correctly for higher-order ODEs and systems of ODEs.
GeneratedParameters can be specified using a pure function.
In[7]:=
Click for copyable input
Out[7]=
Using a pure function is particularly useful if you want to begin indexing the parameters at any value other than the default (1).
This uses a pure function to label the parameters in the previous example const[2] and const[3].
In[8]:=
Click for copyable input
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.
In[9]:=
Click for copyable input
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.
In[10]:=
Click for copyable input
Out[10]=
In[11]:=
Click for copyable input
Out[11]=