       Incorrect FullSimplify result involving BesselK functions

• To: mathgroup at smc.vnet.net
• Subject: [mg8110] Incorrect FullSimplify result involving BesselK functions
• From: Josip Loncaric <josip at icase.edu>
• Date: Tue, 12 Aug 1997 00:54:50 -0400
• Organization: ICASE
• Sender: owner-wri-mathgroup at wolfram.com

```FullSimplify in Mathematica 3.0 incorrectly simplifies the following
expression to zero:

bk = BesselK[-1 + n, r] + (2*n*BesselK[n, r])/r + BesselK[1 + n, r]
FullSimplify[bk]

0

Zero is inconsistent with the numerical result:

N[bk /. n -> 3/2 /. r -> 1]

6.45496

When n=1/2, 3/2, 5/2, ... the correct expression for bk can be obtained
in analytic form via regular Simplify function.  For example, one
obtains

Simplify[bk /. n->3/2 ]

(Sqrt[2*Pi]*(3 + 3*r + r^2))/(E^r*r^(5/2))

N[% /. r->1]

6.45496

The corresponding BesselI expression does not suffer from this
particular bug:

bi = BesselI[-1 + n, r] + (2*n*BesselI[n, r])/r + BesselI[1 + n, r]
simplebi = FullSimplify[bi]

2*BesselI[-1 + n, r]

N[bi /. n -> 3/2 /. r -> 1]

1.87535

N[simplebi /. n -> 3/2 /. r -> 1]

1.87535

Anyone working with cylindrical functions can be bitten by this serious
bug.  A possible source of this problem is the fact that some textbooks
forget that the recurrence relations for modified Bessel functions do
not apply to BesselK directly but to Exp[I*n*Pi]*BesselK[n,r] so that a
sign change is involved (unlike the BesselI function which does not
require a sign change).

Is there a workaround?

--
Dr. Josip Loncaric, Senior Staff Scientist
ICASE, M/S 403, NASA Langley Research Center, Hampton, VA 23681-0001
Phone: (757) 864-2192                 mailto:josip at icase.edu
Fax:   (757) 864-6134                   http://www.icase.edu/~josip/

```

• Prev by Date: Can Mathematica Do This?
• Next by Date: Printing Problems
• Previous by thread: Re: Can Mathematica Do This?
• Next by thread: Printing Problems