MathGroup Archive 2006

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

Search the Archive

Re: Differentiation problem/bug?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg69789] Re: Differentiation problem/bug?
  • From: dimmechan at yahoo.com
  • Date: Sat, 23 Sep 2006 04:44:23 -0400 (EDT)
  • References: <eevrea$gfd$1@smc.vnet.net>

Hi.

I cannot explain you why D[inp, r, NonConstants -> {F}] fails.

I suppose because in the definition of inp there is no explicit
presence of r. This idea came considering the example from
the Mathematica book

D[x^2 + y^2, x, NonConstants -> {y}]
2*x + 2*y*D[y, x, NonConstants -> {y}]

I guess someone more experienced than me will give a better
explanation or maybe he will succeed in applying the option
NonConstants -> {F}.

Options[D]
(Information[Evaluate[#1[[1]]]] & ) /@ %;
{NonConstants -> {}}
"NonConstants is an option for D which gives a list of objects to be
taken to depend implicitly on the differentiation variables."
Attributes[NonConstants] = {Protected}

Anyway you can work as follows:

inp = 1/4 + 3/(8*E^((2*I)*F)) + (3*E^((2*I)*F))/8 - E^((-2*I)*F -
I*θ)/4 + E^((2*I)*F - I*θ)/4 - E^((-2*I)*F + I*θ)/4 +
    E^((2*I)*F + I*θ)/4 + E^((-2*I)*F - (2*I)*θ)/16 + E^((2*I)*F -
(2*I)*θ)/16 + E^((-2*I)*F + (2*I)*θ)/16 +
    E^((2*I)*F + (2*I)*θ)/16 - 1/(8*E^((2*I)*θ)) - E^((2*I)*θ)/8;

g[r_] := inp /. F -> F[r]

Here is the derivative you are looking for

FullSimplify[D[g[r], r]]
((-(1/8))*I*((-1 + E^(I*θ))^4 - E^(4*I*F[r])*(1 +
E^(I*θ))^4)*Derivative[1][F][r])/E^(2*I*(θ + F[r]))

And here is the antiderivative of the last result

Integrate[%, r]
(1/16)*E^(2*I*(θ - F[r]))*((-1 + E^((-I)*θ))^4 + E^(4*I*F[r])*(1 +
E^((-I)*θ))^4)

Finally, here is the verification

FullSimplify[g[r] - %]
Sin[θ]^2/2

The function and the indefinite integral w.r.t. r of its derivative
w.r.t. r differ a constant w.r.t. r function as it should be.

Regards
Dimitrios Anagnostou


  • Prev by Date: Re: Differentiation problem/bug?
  • Next by Date: Re: Differentiation problem/bug?
  • Previous by thread: Re: Re: Differentiation problem/bug?
  • Next by thread: Re: Differentiation problem/bug?