MathGroup Archive 2008

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

Search the Archive

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[131]:= ruleFactorDefInt =
  Integrate[a_*b_, {x_, x0_, x1_}] /; FreeQ[a, x] :>
   a*Integrate[b, {x, x0, x1}];

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

Out[132]= (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[1]:= indef = Integrate[a[x] b[y], y]
>
> > Out[1]= a[x] \[Integral]b[y] \[DifferentialD]y
>
> > Nice.  a[x] gets pulled out of the integral.
>
> > In[2]:= def = Integrate[a[x] b[y], {y, s, t}]
>
> > Out[2]= \!\(
> > \*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[3]:= Collect[def, a[x]]
>
> > Out[3]= \!\(
> > \*SubsuperscriptBox[\(\[Integral]\), \(s\), \(t\)]\(\(a[x]\ b[
> >     y]\) \[DifferentialD]y\)\)
>
> > doesn't work. Nor does
>
> > In[4]:= Simplify[def]
>
> > Out[4]= \!\(
> > \*SubsuperscriptBox[\(\[Integral]\), \(s\), \(t\)]\(\(a[x]\ b[
> >     y]\) \[DifferentialD]y\)\)
>
> > I can't even remove a[x] manually:
>
> > In[5]:= FullSimplify[def/a[x]]
>
> > Out[5]= \!\(
> > \*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