MathGroup Archive 1999

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

Search the Archive

Re: unevaluatedsdi integral

  • To: mathgroup at
  • Subject: [mg19475] Re: [mg19441] unevaluatedsdi integral
  • From: "David Park" <djmp at>
  • Date: Sat, 28 Aug 1999 15:53:05 -0400
  • Sender: owner-wri-mathgroup at

Jack Michel Cornil wrote:

>Does someone knows elegant mean of working (with MATHEMATICE ) with
>unevaluated integral in order to show change of variables, integration
>by parts, simplification of the integrang ?
>Thanks a lot
>Jack Michel  CORNIL

The integral has to be put in HoldForm to prevent automatic evaluation.

Here is a routine which defines a rule for direct substitution which allows the user
to specify the substitution rule as a parameter of the rule:

DirectIntegralSubstitution[u_ -> subexpr_] :=
  HoldForm[Integrate[integrand_, x_]] :>
   Module[{newintegrand, a, b},
    newintegrand = integrand /. subexpr -> u;
     newintegrand = newintegrand/D[subexpr, x];
     HoldForm[Integrate[a, b]] /. {a -> newintegrand, b -> u}]

Here is a similar routine which defines a rule for integration by parts which allows
the user to specify the u part of u dv. It also allows an optional print out of the

Options[IntegrationByParts] = {Details -> False};
IntegrationByParts[u_, (opts___)?OptionQ] :=
  HoldForm[Integrate[integrand_, x_]] :>
   Module[{newintegrand, v, du, dv, dx, a, b, print},
    print = Details /. {opts} /. Options[IntegrationByParts];
     dx = StringJoin["d", SymbolName[x]]; du = D[u, x];
     dv = integrand/u*dx; v = Integrate[integrand/u, x];
     If[print, Print[TableForm[{"u" -> u, "du" -> du*dx,
         "dv" -> dv, "v" -> v}]]];
     u*v - HoldForm[Integrate[a, b]] /. {a -> v*du, b -> x}]

I am sending you a notebook by separate email which illustrates the use of these

David Park
djmp at

  • Prev by Date: How to use sign[] for symbolic operations?
  • Next by Date: Re: Behavior of Array[]
  • Previous by thread: unevaluatedsdi integral
  • Next by thread: Re: unevaluatedsdi integral