Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2006

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

Search the Archive

Two small problems compute OK, but not their sum.

  • To: mathgroup at smc.vnet.net
  • Subject: [mg70901] Two small problems compute OK, but not their sum.
  • From: aaronfude at gmail.com
  • Date: Wed, 1 Nov 2006 03:55:18 -0500 (EST)

Hi,

I needed to intergate a linear function times Log of something, and
Mathematica would give me a too-compicated answer. So I broke it up
into two smaller programs and it worked much better as you can see
below. Although the answer is probably correct in both cases, I'm just
trying to understand why the difference in appearance is quite so
significant.

Thanks!

Aaron Fude

In[31]:=
Zero=A*Log[c^2+x^2]/2;
One=(B-A)/a*x*Log[c^2+x^2]/2;
Assuming[a>0&&c>0, Integrate[Zero, {x, 0, a}]]
Assuming[a>0&&c>0, Integrate[One, {x, 0, a}]]
Assuming[a>0&&c>0, Integrate[Zero+One, {x, 0, a}]]

Out[33]=
\!\(1\/2\ A\ \((2\ c\ ArcTan[a\/c] + a\ \((\(-2\) + Log[a\^2 +
c\^2])\))\)\)

Out[34]=
\!\(\(-\(\(\((A -
      B)\)\ \((\(-a\^2\) - 2\ c\^2\ Log[
            c] + \((a\^2 + c\^2)\)\ Log[a\^2 + c\^2])\)\)\/\(4\
a\)\)\)\)

Out[35]=
\!\(\(\(1\/\(4\ a\ c\)\)\((\(-\[ImaginaryI]\)\ a\
    A\ \((a\^2 + c\^2)\)\ HypergeometricPFQ[{1\/2, 1, 1}, {2,
          2}, 1 + a\^2\/c\^2] + c\ \((\((
          a + \[ImaginaryI]\ c)\)\ \((a\ \((A + B)\) + \[ImaginaryI]\
\((A - \
B)\)\ c)\)\ Log[1 + a\^2\/c\^2] + a\ \((a\ \((A -
      B)\) - 2\ \[ImaginaryI]\ A\ c\ \((\(-2\) + Log[4])\) + 2\ a\ \((A
+ 
                B)\)\ Log[c])\))\))\)\)\)


  • Prev by Date: Re: "unload" a package
  • Next by Date: Re: surface plot of an image
  • Previous by thread: Re: "unload" a package
  • Next by thread: Re: Two small problems compute OK, but not their sum.