MathGroup Archive 2007

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

Search the Archive

Re: Simplify by Recurrence Relations 2


I forgot to add that now (after addintg the rule!) you have

In[40]:=
Information["BesselJ", LongForm -> True]

"BesselJ[n, z] gives the Bessel function of the first kind J(n,
z)."*Button[More..., ButtonData :> "BesselJ",
Active -> True,
   ButtonStyle -> "RefGuideLink"]

Attributes[BesselJ] = {Listable, NumericFunction}

BesselJ[n_, z_] := 2*(n/z)*BesselJ[n - 1, z] - BesselJ[n - 2, z] /; n
>= 2

When you finish with your work don't forget to clear the rule by

In[41]:=
Clear[BesselJ]

Also protect again BesselJ

In[46]:=
Protect[BesselJ];

In this way you restore the "default" BesselJ

In[47]:=
Information["BesselJ", LongForm -> True]

"BesselJ[n, z] gives the Bessel function of the first kind J(n,
z)."*Button[More..., ButtonData :> "BesselJ",
 Active -> True, ButtonStyle -> "RefGuideLink"]

Attributes[BesselJ] = {Listable, NumericFunction, Protected}

Cheers
Dimitris

=CF/=C7 Mr Ajit Sen =DD=E3=F1=E1=F8=E5:
> Dear Mathgroup,
>
>   Could someone please show me how to simplify a
>   function by using its recurrence relations.
>
>   As a simple example, let's take the Bessel
> recurrence
>   relation
>
>      BesselJ[n+1,z]= 2n/z BesselJ[n,z]-BesselJ[n-1,z].
>
>   How do I get Mathematica (5.2 !) to evaluate
>
>                D[BesselJ[2,x],x]
>
>   as   (1-4/x^2)BesselJ[1,x]+ 2/x BesselJ[0,x]
>
>   instead of (BesselJ[1,x]-BesselJ[3,x])/2 ?
>
>   [Basically, reduce the order to 0 &/or 1, so that
> all
>   J0 and J1 can be factored out later.]
>
>   Thanking you in advance.
>
>   Ajit.
>
>
>
>
> ___________________________________________________________
> To help you stay safe and secure online, we've developed the all new Yaho=
o! Security Centre. http://uk.security.yahoo.com



  • Prev by Date: DSolve with DiracDelta
  • Next by Date: Re: Simplify by Recurrence Relations
  • Previous by thread: Re: DSolve with DiracDelta
  • Next by thread: infinite loop depending on previous function call