Re: Re: Re: DSolve and N do not commute

• To: mathgroup at smc.vnet.net
• Subject: [mg40254] Re: [mg40242] Re: [mg40213] Re: [mg40184] DSolve and N do not commute
• From: Dr Bob <majort at cox-internet.com>
• Date: Fri, 28 Mar 2003 04:30:22 -0500 (EST)
• References: <200303271151.GAA22120@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```The bug is there in version 4.2.1 (for Windows).

Bobby

On Thu, 27 Mar 2003 06:51:02 -0500 (EST), Selwyn Hollis

> Very strange... No such "bug" in Version 4.1.5 for Mac OS X:
>
> eq := (f''[r] + 8 2^(2/3)/3 f'[r] == -8 2^(1/3)/3 f[r])
>
> DSolve[eq, f[r], r]
>
> {{f[r] -> C[1]/E^((2/3)*2^(2/3)*r) + C[2]/E^(2*2^(2/3)*r)}}
>
> DSolve[N[eq], f[r], r]
>
> {{f[r] -> C[1]/E^(3.1748*r) + C[2]/E^(1.05827*r)}}
>
> -----
> Selwyn Hollis
> http://www.math.armstrong.edu/faculty/hollis
>
>
> On Wednesday, March 26, 2003, at 02:42  AM, Dr Bob wrote:
>
>> It's a bug.  Here's the general solution:
>>
>> <snip>
>
>> On Tue, 25 Mar 2003 03:04:52 -0500 (EST), arkadas ozakin
>>
>>> Take the following differential equation,
>>>
>>> eq = (f''[r] + 8 2^(2/3)/3 f'[r] == -8 2^(1/3)/3 f[r])
>>>
>>> DSolve[eq, f[r], r] gives something like
>>>
>>> f[r] -> C[1] Exp[k1 r] + C[2] Exp[k2 r]
>>>
>>> where k1 and k2 are two different numbers.
>>>
>>> However,
>>>
>>> DSolve[N[eq],f[r],r] gives something like
>>>
>>> f[r] -> (C[1] + C[2] r) Exp[k2num r]
>>>
>>> where k2num is the numerical version of the constant k2 above.
>>>
>>> I don't know how DSolve handles numerical constants, but the
>>> discrepancy between the two results wasn't something I expected
>>> (that's why it took me quite a bit of time to figure out what was
>>> going wrong in my longish Mathematica notebook...)
>>>
>>> Does anyone know why this happened? Is this a bug, or am I doing
>>> something wrong? Any suggestions for avoiding similar things in the
>>> future?
>>>
>>>
>>>
>>
>>
>>
>> -- majort at cox-internet.com
>> Bobby R. Treat
>>
>>
>>
>
>
>

--
majort at cox-internet.com
Bobby R. Treat

```

• Prev by Date: Re: waiting command
• Next by Date: Re: waiting command
• Previous by thread: Re: Re: DSolve and N do not commute
• Next by thread: Re: DSolve and N do not commute