Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: "Transparency" with respect to differentiation

  • To: mathgroup at
  • Subject: [mg74088] Re: "Transparency" with respect to differentiation
  • From: Martin Schoenecker <ms_usenet at>
  • Date: Fri, 9 Mar 2007 02:03:47 -0500 (EST)
  • Organization: Technische Universitaet Darmstadt
  • References: <es909c$2c5$> <eslrt9$ptl$> <esolc1$efq$>

> Does something like the following meet your needs?
> In[1]:=
> quat[(a_) + (b_)] := quat[a] + quat[b];
> quat /: D[quat[fun_], var__] := quat[D[fun, var]];
> Unprotect[D];
> D[quat[(a_) + (b_)], var__] := D[quat[a], var] + D[quat[b], var];
> Protect[D];
> In[6]:=
> quat[f[x] + g[x] + h[x]]
> Out[6]=
> quat[f[x]] + quat[g[x]] + quat[h[x]]

Thank you! Yes, that works perfectly.  I'm just wondering if it was more 
proper style to achieve that without changing the definition of built-in 
commands, i.e. without having to Unprotect[D].  In the meanwhile, I will 
use your approach.

Best Regards,

  • Prev by Date: Re: Multi-core Support in Mathematica 5.2
  • Next by Date: Re: Rigid body equations
  • Previous by thread: Re: "Transparency" with respect to differentiation
  • Next by thread: analytic integration of InterpolatingFunction compositions