MathGroup Archive 2002

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

Search the Archive

Re: List, FindRoot, Bessel

  • To: mathgroup at smc.vnet.net
  • Subject: [mg33642] Re: List, FindRoot, Bessel
  • From: Jens-Peer Kuska <kuska at informatik.uni-leipzig.de>
  • Date: Thu, 4 Apr 2002 19:40:03 -0500 (EST)
  • Organization: Universitaet Leipzig
  • References: <a8g3c5$b3e$1@smc.vnet.net>
  • Reply-to: kuska at informatik.uni-leipzig.de
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

k->3.2  mean Rule[k,3.2] it can be used with ReplaceAll[] to get
3.2


if you use the correct syntax of For[] and ReplaceAll[] you "code"
looks like

n = 10;
For[i = 0, i < n, i++,
  Print[k /. 
      FindRoot[-k BesselJ[1, k] + 30 BesselJ[0, k] == 0, {k, 2.32 + i
Pi}]
    ]
 ]

What you mean is probably

Block[{k},
  (k /. FindRoot[-k BesselJ[1, k] + 30 BesselJ[0, k] == 0, {k, 
              2.32 + # Pi}]) & /@ Table[i, {i, 0, 9}]
  ]

that will return the list of the zeros.
Have you ever considered to read some pages in 
the manual ? 
It is incredible large and called "The Mathematica Book"
but it helps to find out the correct syntax of For[] and it
has an index where you can find what -> mean

Regards
  Jens



Riadh Alimi wrote:
> 
> Hi !
> 
> I'm trying to find the first n roots of an equation involving Bessel
> Functions and to create a List of them.
> 
> The best thing I find so far is :
> n = 10;
> For[i = 0, i < n,
>   Print[FindRoot[- k BesselJ[1, k] + 30 BesselJ[0, k] == 0, {k,
>         2.32 + i Pi}]];
>   i++]
> 
> And the result I get is :
> 
> {k->3.2}
> {k->5.2}
> {k->8.3}
> ....
> 
> Does anyone know what {k->3.2} means ? And how I could get only the value
> 3.2 instead of {k->3.2} in order to create a list?
> 
> Thank you


  • Prev by Date: Re: List, FindRoot, Bessel
  • Next by Date: RE: List, FindRoot, Bessel
  • Previous by thread: Re: List, FindRoot, Bessel
  • Next by thread: RE: List, FindRoot, Bessel