Re: Substitute values in functions!!!

• To: mathgroup at smc.vnet.net
• Subject: [mg52255] Re: Substitute values in functions!!!
• From: Paul Abbott <paul at physics.uwa.edu.au>
• Date: Thu, 18 Nov 2004 01:44:55 -0500 (EST)
• Organization: The University of Western Australia
• References: <cneu7f\$q8j\$1@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```In article <cneu7f\$q8j\$1 at smc.vnet.net>,
davidx at x-mail.net (david Lebonvieux) wrote:

> How can substitute some values(the zeros of BesselJ function) in this
> Integrals?
> j0[n_] := x /. FindRoot[BesselJ[0, x] == 0, {x, n 2.5}]

Change this to

j0[n_] := FindRoot[BesselJ[0, x] == 0, {x, n*2.5}]

so that the result is a replacement rule instead of a value.

> \!\(s\_l = Array[j0, \ 10]\)
>
> Integrate[BesselJ[0,s0*r/R] BesselJ[0,s2*r/R] BesselJ[0,s3*r/R],{r,0,R}]

By a change of variables r -> R r, this integral becomes

R Integrate[BesselJ[0,s0 r] BesselJ[0,s2 r] BesselJ[0,s3 r],{r,0,1}]

> where s0, s1,s2,the Zero-Poles of BesselJ.

Substitute the first three zeros into the integrand:

Times @@ (BesselJ[0, x r] /. Array[j0, 3])

Compute the integral numerically:

R NIntegrate[%, {r, 0, 1}]

Cheers,
Paul

--
Paul Abbott                                   Phone: +61 8 6488 2734
School of Physics, M013                         Fax: +61 8 6488 1014
The University of Western Australia      (CRICOS Provider No 00126G)
35 Stirling Highway
Crawley WA 6009                      mailto:paul at physics.uwa.edu.au
AUSTRALIA                            http://physics.uwa.edu.au/~paul

```

• Prev by Date: Lucas Lehmer prime Mersenne test
• Next by Date: Newly Released Mathematica 5.1 Delivers Unmatched Performance for Handling Data
• Previous by thread: Substitute values in functions!!!
• Next by thread: Re: Re: Substitute values in functions!!!