       Re: simplifying definite vs indefinite integrals

• To: mathgroup at smc.vnet.net
• Subject: [mg90689] Re: simplifying definite vs indefinite integrals
• From: Rik Blok <rikblok at gmail.com>
• Date: Sat, 19 Jul 2008 04:50:38 -0400 (EDT)
• References: <g5n464\$sbm\$1@smc.vnet.net> <g5piu6\$qab\$1@smc.vnet.net>

Thanks Jens!  With a ReplaceRepeated it works great, even for more
complicated expressions!

In:= ruleFactorDefInt =
Integrate[a_*b_, {x_, x0_, x1_}] /; FreeQ[a, x] :>
a*Integrate[b, {x, x0, x1}];

In:= Integrate[
a[x]^2 b[y] c[x] / Sqrt[d[x] + 1] e[y], {y, s,
t}] //. ruleFactorDefInt

Out= (a[x]^2 c[x] \!\(
\*SubsuperscriptBox[\(\[Integral]\), \(s\), \(t\)]\(\(b[y]\ e[
y]\) \[DifferentialD]y\)\))/Sqrt[1 + d[x]]

Now I'm off to learn *why* it works...

Cheers,
Rik

On Jul 18, 1:06 am, Jens-Peer Kuska <ku... at informatik.uni-leipzig.de>
wrote:
> Hi,
>
> Integrate[a[x] b[y], {y, s, t}] /.
>   Integrate[a_*b_, {x_, x0_, x1_}] /; FreeQ[a, x] :>
>    a*Integrate[b, {x, x0, x1}]
>
> ??
>
> Regards
>    Jens
>
> rikb... at gmail.com wrote:
> > Hi Mathematica gurus (& sorry if this is a dupe post),
>
> > I'm new to Mathematica and I was surprised to see that it handles
> > definite versus indefinite integrals differently. For example:
>
> > In:= indef = Integrate[a[x] b[y], y]
>
> > Out= a[x] \[Integral]b[y] \[DifferentialD]y
>
> > Nice.  a[x] gets pulled out of the integral.
>
> > In:= def = Integrate[a[x] b[y], {y, s, t}]
>
> > Out= \!\(
> > \*SubsuperscriptBox[\(\[Integral]\), \(s\), \(t\)]\(\(a[x]\ b[
> >     y]\) \[DifferentialD]y\)\)
>
> > But not for the definite integral.  Why?  And how can I make it fac=
tor
> > out?
>
> > In:= Collect[def, a[x]]
>
> > Out= \!\(
> > \*SubsuperscriptBox[\(\[Integral]\), \(s\), \(t\)]\(\(a[x]\ b[
> >     y]\) \[DifferentialD]y\)\)
>
> > doesn't work. Nor does
>
> > In:= Simplify[def]
>
> > Out= \!\(
> > \*SubsuperscriptBox[\(\[Integral]\), \(s\), \(t\)]\(\(a[x]\ b[
> >     y]\) \[DifferentialD]y\)\)
>
> > I can't even remove a[x] manually:
>
> > In:= FullSimplify[def/a[x]]
>
> > Out= \!\(
> > \*SubsuperscriptBox[\(\[Integral]\), \(s\), \(t\)]\(\(a[x]\ b[
> >     y]\) \[DifferentialD]y\)\)/a[x]
>
> > Suggestions?  Thanks for your help!
>
> > Rik

• Prev by Date: Re: Re: Re: Collapsing cell groups [was: Mathematica
• Next by Date: Re: ListPlot, Inverse plotting
• Previous by thread: Re: simplifying definite vs indefinite integrals
• Next by thread: Save as PDF with color