MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: treatment on C[i]

  • To: mathgroup at smc.vnet.net
  • Subject: [mg100322] Re: treatment on C[i]
  • From: Szabolcs <szhorvat at gmail.com>
  • Date: Mon, 1 Jun 2009 07:06:32 -0400 (EDT)
  • References: <gvtmfq$get$1@smc.vnet.net>

On May 31, 1:34 pm, olfa <olfa.mra... 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.
>

You can always count them

Count[C[1] + C[2]/x, C[_], {0, \[Infinity]}]

or retrieve them

Cases[C[1] + C[2]/x, C[_], {0, \[Infinity]}]



  • Prev by Date: Re: MatrixForm affects values instead of only printing
  • Next by Date: Re: MatrixForm affects values instead of only printing
  • Previous by thread: Re: problem with reduce
  • Next by thread: Re: treatment on C[i]