Re: own package doesnt work correctly?
- To: mathgroup at smc.vnet.net
- Subject: [mg63200] Re: own package doesnt work correctly?
- From: Martin <ms_usenet at gmx.de>
- Date: Sun, 18 Dec 2005 07:34:37 -0500 (EST)
- Organization: Technische Universitaet Darmstadt
- References: <dnv3hc$o7b$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hello,
I would like to apologize for the illegibility of my posted rule, using
greek letters that convert to something like =CE=B4 was no good idea.
Thank you all for your comments!
> Symbols like x and I are set up in the package`Private` context [...]
> [...] pass them as parameters to the rule.
It works very fine, I wasn't aware that rules can have arguments - like
many other things I still am not aware of. Is there a standard work,
which can help to learn all the subtleties of Mathematica - I think 'The
Mathematica Book' delivered with the software is a great reference, but
there might be better textbooks?
BTW, the following is my new rule for integrating by parts with respect
to t_, reducing the order of derivative of the function inside the
d_[...] function. Still seems to be much code for little task...
Best Regards,
Martin
intByParts[d_, t_] :=
Integrate[d[Derivative[n___][v_][a___, t, b___]]*(u_),
{t, ug_, og_}] :>
(u*d[Derivative[Sequence @@ ReplacePart[{n},
{n}[[Flatten[Position[{a, t, b}, t]][[1]]]] - 1,
Flatten[Position[{a, t, b}, t]][[1]]]][v][a, t, b]] /.
t -> og) -
(u*d[Derivative[Sequence @@ ReplacePart[{n},
{n}[[Flatten[Position[{a, t, b}, t]][[1]]]] - 1,
Flatten[Position[{a, t, b}, t]][[1]]]][v][a, t, b]] /.
t -> ug) -
Integrate[D[u, t]* d[Derivative[Sequence @@ ReplacePart[{n},
{n}[[Flatten[Position[{a, t, b}, t]][[1]]]] - 1,
Flatten[Position[{a, t, b}, t]][[1]]]][v][a, t, b]],
{t, ug, og}] /;
{n}[[Flatten[Position[{a, t, b}, t]][[1]]]] >= 1