       Re: Re: How to simplify?

• To: mathgroup at smc.vnet.net
• Subject: [mg96332] Re: [mg96258] Re: How to simplify?
• From: Bob Hanlon <hanlonr at cox.net>
• Date: Wed, 11 Feb 2009 05:25:44 -0500 (EST)

```This has been answered before. Set the arbitrary constants or use boundary conditions.

S[r_] := 1/2 r BesselJ[1, r];

D[S[r], {r, 2}] + 1/r D[S[r], r] + S[r] // FullSimplify

BesselJ[0, r]

DSolve[y''[r] + 1/r y'[r] + y[r] == BesselJ[0, r], y[r],
r][] // FullSimplify

{y[r] -> C*BesselJ[0, r] + C*BesselY[0, r] + (r*BesselJ[1, r])/2}

Just set the arbitrary constants

DSolve[y''[r] + 1/r y'[r] + y[r] == BesselJ[0, r], y[r], r][] /. {C ->
0, C -> 0} // FullSimplify

{y[r] -> (r*BesselJ[1, r])/2}

Or apply appropriate boundary conditions

DSolve[{
y''[r] + 1/r y'[r] + y[r] == BesselJ[0, r],
y == 1/2 BesselJ[1, 1],
y' == 1/2 BesselJ[0, 1]}, y[r], r][] //
FullSimplify

{y[r] -> (r*BesselJ[1, r])/2}

Bob Hanlon

---- Jennifer Eden <jennifereden.price at gmail.com> wrote:

=============
My apologies - I screwed up the original email. Here's the correct
code which fails to simplify properly. The first two lines are
designed to indicate what it ought to simplify to.

S[r_] := 1/2 r BesselJ[1, r];
D[S[r], {r, 2}] + 1/r D[S[r], r] + S[r] // FullSimplify
DSolve[y''[r] + 1/r y'[r] + y[r] == BesselJ[0, r], y[r],  r] //
FullSimplify  (* Note: y[r] instead of S[r] *)