MathGroup Archive 2006

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

Search the Archive

Re: Re: Differentiation problem/bug?


On 25/9/06, Arturas Acus wrote:

>  > I never use NonConstants. Also, it is a good idea to avoid using
>>  variables involving capital letters. For calculations where there is
>>  implicit dependence with respect to a variable I use Dt instead.
>>
>>   inp = 1/4 + 3/8/E^(2 I f) + (3/8) E^(2 I f) - (1/4) E^(-2 I f - I t) +
>>   (1/4) E^(2 I f - I t) - (1/4) E^(I t - 2 I f) + (1/4) E^(2 I f + I t) +
>>   (1/16) E^(-2 I f - 2 I t) + (1/16) E^(2 I f - 2 I t) +
>>   (1/16) E^(2 I t - 2 I f) + (1/16) E^(2 I f + 2 I t) -
>>   1/8/E^(2 I t) - (1/8) E^(2 I t)
>>
>>   Dt[t, r] ^= 0;
>>
>>   Dt[inp, r] // FullSimplify
>>
>  > Cheers,
>  > Paul
>
>Could Your share any thoughts why this way is more preferable.

Because it is simple, reliable, and direct.

>For example, using Dt I should explicitly write down rules not only for
>independent variables, but for model parameters also. Thus model 
>variables and parameters mixes up, which for my opinion doesn't look 
>nice from the point of view of logical consistence.

No. Use

   SetAttributes[{a, b, c, ...}, Constant]

for (constant) model parameters.

So, for example, for model parameters a and b,

   SetAttributes[{a, b}, Constant]

and for independent variables x and y,

   Dt[y, x] ^= 0; Dt[x, y] ^= 0

then compute

   Dt[a x + b y, x]

Cheers,
Paul


  • Prev by Date: Re: linear secod order homogeneous differential equation recursions
  • Next by Date: Re: linear secod order homogeneous differential equation recursions
  • Previous by thread: Re: Re: Differentiation problem/bug?
  • Next by thread: Re: Re: Differentiation problem/bug?