MathGroup Archive 2003

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

Search the Archive

Re: Fw: Integrate...

  • To: mathgroup at smc.vnet.net
  • Subject: [mg44389] Re: [mg44304] Fw: Integrate...
  • From: Dr Bob <drbob at bigfoot.com>
  • Date: Fri, 7 Nov 2003 05:16:55 -0500 (EST)
  • Reply-to: drbob at bigfoot.com
  • Sender: owner-wri-mathgroup at wolfram.com

Try this:

f = Cos[#1] + Sin[#1] &;
Assuming[{b > a, a > 0}, Integrate[Abs[f[r]],
    {r, a, b}]]
Simplify[D[%, b]]
Expand[f[b]^2 - %^2]
Simplify[%]

(Cos[a + b]*(Sqrt[1 + Sin[2*a]] -
      Sqrt[1 + Sin[2*b]]) -
    Sin[a - b]*(Sqrt[1 + Sin[2*a]] +
      Sqrt[1 + Sin[2*b]]))/
   ((Cos[a] + Sin[a])*(Cos[b] + Sin[b]))

Sqrt[1 + Sin[2*b]]

-1 + Cos[b]^2 + 2*Cos[b]*Sin[b] + Sin[b]^2 - Sin[2*b]

0

Sqrt[1 + Sin[2*r]] is equal to the original integrand.

Bobby

Fw: Integrate...
Subject: [mg44389] [mg44304] Fw: Integrate...
From: "Christos Argyropoulos M.D." <argchris at otenet.gr>
To: mathgroup at smc.vnet.net

Hi,
I think the problem goes deeper than simply mixing symbolic/numerical 
stuff.
Try symbolic integration of the original function to get:
In[9]:=
Integrate[Abs[ Cos[r] + Sin[r]], {r, a,b}]


Out[9]=
\!\(\((\(-a\) +
         b)\)\ \((\(-\(\(Cos[a]\ \ at \((Cos[a] + Sin[a])\)\^2 -
                 Sin[a]\ \ at \((Cos[a] + Sin[a])\)\^2\)\/\(\((a -
                     b)\)\ \((Cos[a] +
                     Sin[a])\)\)\)\) + \(Cos[b]\ \ at \((Cos[b] 
+ Sin[b])\)\^2 -
\
Sin[b]\ \ at \((Cos[b] + Sin[b])\)\^2\)\/\(\((a - b)\)\ \((Cos[b] +
Sin[b])\)\))\
\)\)

Simplification of the result gives:
\!\(\(\((Cos[a] - Sin[a])\)\ \ at \(1 + Sin[2\ a]\)\)\/\(Cos[a] + Sin[a]\) 
+ \
\(\((\(-Cos[b]\) + Sin[b])\)\ \ at \(1 + Sin[2\ b]\)\)\/\(Cos[b] 
+ Sin[b]\)\)
Results of the original, simplified versions and the numerical integration
agree for 0<=a<=2.35 and 0<=b<2.35
After they diverge dramatically. I suspect this is a bug somewhere inside
Integrate, but I do not have the guts to evaluate the
integral by hand to see, if the expression returned for symbolic a,b are
correct.

Any ideas?

Christos Argyropoulos
Patras Greece


  • Prev by Date: Re: Assumptions in fancy-notation integrals
  • Next by Date: RE: Re: simple equation system -- crashing M5?
  • Previous by thread: Re: Integrate...
  • Next by thread: Re: Fw: Integrate...