Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.math.mathematica > #4926

Re: Linear combination of Bessel functions

From Leonid Shifrin <lshifr@gmail.com>
Newsgroups comp.soft-sys.math.mathematica
Subject Re: Linear combination of Bessel functions
Date 2011-09-14 09:13 +0000
Organization Steven M. Christensen and Associates, Inc and MathTensor, Inc.
Message-ID <j4pr8c$fhs$1@smc.vnet.net> (permalink)
References <201109131122.HAA05158@smc.vnet.net>

Show all headers | View raw


Here is one way:

getBesselCoeff[n_, expr_] :=
  Module[{x},
   SeriesCoefficient[(expr /. BesselJ[n, _] :> (1/x))*x, {x, 0, 0}]];

So that

In[1503]:=
expr = r^2+Cos[r] BesselJ[0,rho r]+3 Sin[r] BesselJ[1,rho
r]+Log[r]BesselJ[2,rho r];
getBesselCoeff[#,expr]&/@{0,1,2}

Out[1504]= {Cos[r],3 Sin[r],Log[r]}

Regards,
Leonid


On Tue, Sep 13, 2011 at 3:22 PM, Sam Takoy <sam.takoy@yahoo.com> wrote:

> Hi,
>
> Suppose I have an expression that's a linear combination of Bessel
> function. Kind of like this
>
> r^2 + Cos[r] BesselJ[0, rho r] + 3 Sin[r] BesselJ[1, rho r] + Log[r]
> BesselJ[2, rho r]
>
> Is there a way to extract the coefficients of the linear combination?
>
> Thanks,
>
> Sam
>
>

Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar | Unroll thread


Thread

Re: Linear combination of Bessel functions Leonid Shifrin <lshifr@gmail.com> - 2011-09-14 09:13 +0000

csiph-web