MathGroup Archive 2006

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

Search the Archive

Re: Re: Differentiation problem/bug?

> >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]

Well, what then is difference between You approach and  Dt[a x,x,
Constants->a], which is like oposite approach of D[expr, Nonconstants
->aaaa]. I would guess, that the main point is the use of Attribute.
This actually affects evaluation procedure, and most probably positively
(rezulting in faster evaluation). Nice.

The only problem I see is how to define diferential operators using Your
approach, where differentiation variables are unknown in advance. For
example in my approach definition of one of nabla operator component (in
circular basis -1,0,1) was easy:

SetAttributes[\[EmptyDownTriangle], {HoldFirst}];

    vars = Variables /. {opts} /. Options[\[EmptyDownTriangle],
    re = vars[[1]]; th = vars[[2]]; ph = vars[[3]];




But when I have to deal with rules like  Dt[th, r] ^= 0 ; Dt[ph, r] ^= 0
etc... in operator definition, then I have in some way to temporary
isolate them in Block or Module. Would it work nice?

> Cheers,
> Paul
Arturas Acus <acus at>

  • Prev by Date: Re: Mapping Functions That Take More Than One Argument
  • Next by Date: Re: problem evaluating a function on a list
  • Previous by thread: Re: Re: Differentiation problem/bug?
  • Next by thread: Re: Differentiation problem/bug?