Re: treatment on C[i]
- To: mathgroup at smc.vnet.net
- Subject: [mg100314] Re: [mg100294] treatment on C[i]
- From: Bob Hanlon <hanlonr at cox.net>
- Date: Mon, 1 Jun 2009 07:05:01 -0400 (EDT)
- Reply-to: hanlonr at cox.net
soln1 = y[x] /. DSolve[y''[x] == 4 y[x], y[x], x][[1]] C[1]*E^(2*x) + C[2]/E^(2*x) You can specify any parameter that you want soln2 = y[x] /. DSolve[y''[x] == 4 y[x], y[x], x, GeneratedParameters -> a][[1]] a[1]*E^(2*x) + a[2]/E^(2*x) Or you can use replacement soln3 = soln1 /. C[n_] :> Symbol["a" <> ToString[n]] a1*E^(2*x) + a2/E^(2*x) Bob Hanlon ---- olfa <olfa.mraihi at yahoo.fr> wrote: ============= Hi mathematica community, C[i] is the default form for the i th parameter or constant generated by mathematica in representing the results of various symbolic computations in such functions as DSolve, RSolve and Reduce. My question is: is it possible to know in advance how many C[i] will be generated? If not how to represent the generic form of them: For example I have an input with reduce and mathematica generates in the output C[1],C [2],C[3] and C[4] so four C[i] in the solutions but before that when I wrote the input I did not know that it will generate four C[i] and I need to use something in the input that represent C[i] in general without knowing how many of them will be generated? I have tried to use the pattern object _ like that C[ _ ] but it does not work. Any suggestion? Thank you very much.