MathGroup Archive 2007

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

Search the Archive

Re: Odd little Bessel function quirk

  • To: mathgroup at smc.vnet.net
  • Subject: [mg79069] Re: [mg79035] Odd little Bessel function quirk
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 17 Jul 2007 03:29:13 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

In general, simplification is not done until you ask for it.

f[r_] := If[r < 1, BesselJ[0, r], BesselK[0, r]];

D[f[r], r] // Simplify

Piecewise[{{-BesselJ[1, r], r < 1}}, -BesselK[1, r]]


Bob Hanlon

---- AES <siegman at stanford.edu> wrote:
> [Indented lines are Output cells; others are Input cells]
>
>
> f[r_] := If[r =C2=BE 1, BesselJ[0, \ r], BesselK[0, r]]
>
> f[r] 
>
>       If[r =C2=BE 1, BesselJ[0, r], BesselK[0, r]]
>
> D[f[r], r] 
>
>       If[r =C2=BE 1, 1/2 (BesselJ[-1, r] - BesselJ[1, r]),    
>                   1/2 (-BesselK[-1, r] - BesselK[1, r])]
>
> D[f[r], r] /. r =C2=BE 1 -> True
>
>       -BesselJ[1, r]
>
> D[f[r], r] /. r =C2=BE 1 -> False
>
>       -BesselK[1, r]
>
>
> Nothing erroneous here (so far as I know) -- but how come the results of=

> the (superfluous) 4th and 5th Input lines are simplified, but the 3rd
> one is not?   [When I'm struggling with Bessel functions, I can use all=

> the simplification I can get!]
>



  • Prev by Date: Re: Cascaded (Multi-range) Iterators?
  • Next by Date: How to Map[ f[x,y], {y}]?
  • Previous by thread: Re: Cascaded (Multi-range) Iterators?
  • Next by thread: Re: Odd little Bessel function quirk