|
[Date Index]
[Thread Index]
[Author Index]
Re: "Transparency" with respect to differentiation
- To: mathgroup at smc.vnet.net
- Subject: [mg74088] Re: "Transparency" with respect to differentiation
- From: Martin Schoenecker <ms_usenet at gmx.de>
- Date: Fri, 9 Mar 2007 02:03:47 -0500 (EST)
- Organization: Technische Universitaet Darmstadt
- References: <es909c$2c5$1@smc.vnet.net> <eslrt9$ptl$1@smc.vnet.net> <esolc1$efq$1@smc.vnet.net>
> 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,
Martin
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
|