Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

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

Search the Archive

Re: How to use SeriesCoefficient to define new functions

  • To: mathgroup at smc.vnet.net
  • Subject: [mg122855] Re: How to use SeriesCoefficient to define new functions
  • From: Xiaojun <tigertooth4 at gmail.com>
  • Date: Sat, 12 Nov 2011 07:36:00 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <j9b6vs$4u6$1@smc.vnet.net> <j9gf1h$p6l$1@smc.vnet.net>

Simon and Dan, thank you all for your answers:) my problem solved!


On Nov 10, 8:11 pm, Dan <dfla... at rcn.com> wrote:
> On Nov 8, 7:23 am, Xiaojun <tigertoo... at gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > Hi,
>
> > I want to define new functions from the =EB-expansion of an exponential
> > function as follows:
>
> > SchurGenerator := Normal[Series[ Exp[x1*=EB + x2*=EB^2 + x3*=EB^3], {=EB, 0,
> > 3}]].
>
> > Each coefficient may define a function of x1, x2, and x3, which I
> > think should be expressed
> > as, for example:
>
> > p2[x1_, x2_, x3_] :=  SeriesCoefficient[SchurGenerator, {=EB, 0, 2}].
>
> > However, it doesn't seem to work. Since the expected output of
> > p2[y1,y2,y3] should be
>
> > y1^2/2 + y2. But the real output is still x1^2/2 + x2.
>
> > How to define new functions from the expansion coefficients?  I
> > appreciate your help !
>
> > --
> > Best wishes,
> > Liu Xiaojun
>
> Liu, your problem is that your definition for SchurGenerator uses the
> literal symbols x1, x2, and x3. If you want to define it so that you
> substitute a different symbol when called you will have to use
> patterns, as in
>
> SchurGenerator[x1_,x2_,x3_]:=Normal@Series[Exp[x1*lambda + x2*lambda^2
> + x3*lambda^3],{lambda,0,3}]
>
> so that p2 becomes
>
> p2[x1_,x2_,x3_]:=SeriesCoefficient[SchurGenerator[x1,x2,x3],{lambda,
> 0,2}]




  • Prev by Date: Re: FindRoot with algebraic expressions
  • Next by Date: Re: large integration result for simple problem: 1/x,, also BesselJ
  • Previous by thread: Re: How to use SeriesCoefficient to define new functions
  • Next by thread: What inspite FindInstance