       Differentiation problem/bug?

• To: mathgroup at smc.vnet.net
• Subject: [mg69734] Differentiation problem/bug?
• From: Arturas Acus <acus at itpa.lt>
• Date: Fri, 22 Sep 2006 01:04:00 -0400 (EDT)

```Dear group,

the only way I can explain the rezults of simple differentiation command
D[] bellow is the dissapointing bug, which was absent in 5.0, but exist
in:
\$Version
5.2 for Linux (June 20, 2005)

In: inp = 1/4 + 3/(8*E^((2*I)*F)) + (3*E^((2*I)*F))/8 -
E^((-2*I)*F - I*\[Theta])/4 + E^((2*I)*F - I*\[Theta])/4 -
E^((-2*I)*F + I*\[Theta])/4 + E^((2*I)*F + I*\[Theta])/4 +
E^((-2*I)*F - (2*I)*\[Theta])/16 + E^((2*I)*F - (2*I)*\[Theta])/16+
E^((-2*I)*F + (2*I)*\[Theta])/16 + E^((2*I)*F + (2*I)*\[Theta])/16-
1/(8*E^((2*I)*\[Theta])) - E^((2*I)*\[Theta])/8

In: D[inp, r, NonConstants -> {F}]
Out: 0

how it was found:

In: D[#, r, NonConstants -> {F}] & /@ Expand[inp]
Out: (((-3*I)/4)*D[F, r, NonConstants -> {F}])/E^((2*I)*F) +
((3*I)/4)*E^((2*I)*F)*D[F, r, NonConstants -> {F}]

check:

In: D[Evaluate[inp /. {F -> F[r]}], r] // FullSimplify
Out: ((-I/8)*((-1 + E^(I*\[Theta]))^4 - E^((4*I)*F[r])*(1 + E^(I*
\[Theta]))^4)*Derivative[F][r])/E^((2*I)*(\[Theta] + F[r]))

I believe I can trust the Out rezult. Most dissapointing is that now
I cannot trust my previous calculations, because somwhere I changed from
version 5.0 to 5.2, and 5.0 gives correct rezult. Please check this
behaviour for other versions/OS and be carefull using NonConstants
option.

Sincerely,

--
Arturas Acus <acus at itpa.lt>

```

• Prev by Date: Off[General::spell1] and StyleSheet Notepad
• Next by Date: Re: Extracting terms from an equation
• Previous by thread: Off[General::spell1] and StyleSheet Notepad
• Next by thread: Re: Differentiation problem/bug?