Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Integrate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg74164] Re: Integrate
  • From: "dimitris" <dimmechan at yahoo.com>
  • Date: Tue, 13 Mar 2007 03:38:53 -0500 (EST)
  • References: <esls78$q0v$1@smc.vnet.net>

Evaluating your integral was a really tough procedure for Mathematica.

I want to know how you actually evaluated the integral by hand
"easily"...

Anyway, all indefinite integrals in Mathematica are evaluated by
application of the Risch Algorithm (R.A.)
Exceptions are elliptic integrals, antiderivatives that require
special functions and antiderivatives of
special functions.

(see http://library.wolfram.com/infocenter/Conferences/5832/
http://library.wolfram.com/infocenter/Conferences/4684/
http://72.14.203.104/search?q=cache:_LK2UsI5d_UJ:www-sop.inria.fr/cafe/Ma=
nuel.Bronstein/publications/issac98.pdf+symbolic+integration+tutorial&hl==
en&ct=clnk&cd=1
and references therein.)

Hence, since you integrand contain only elementary functions Integrate
will use R.A.
As a critical concept required in the application of the R.A. is the
notion of the partial
fraction decomposition (I believe that) the problem must be the
considerable difficult partial fraction
decomposition of your integrand.

However helping a little Integrate you get the desired results very
quickly!
Note that helping Mathematica does not say anything for her
efficiencies.
Mathematica and as well the other CAS are here to help you; but some
times
they also require help by you. It's an interactive relation!
So, here goes...


In[104]:=
Quit

In[1]:=
$Version
Out[1]=
"5.2 for Microsoft Windows (June 20, 2005)"

In[2]:=
SessionTime[]
rep = {b1 -> a1 + t, b2 -> a2 + t, b3 -> a3 + t, b4 -> a4 + t}
test = -((1/((b1*b3 - t13^2)^3*((-b2)*b4 + t24^2)^2))*(b3*b4*t13^2*((-
b2)*b4 + t24^2) -
      b1^2*b3*(b2*b4^2 - b4*t24^2 + b3*(b4^2 + t24^2)) + b1*((-
b2)*b4^2*(b3^2 + t13^2) + b3^2*b4*t24^2 + b4*t13^2*t24^2 +
        b3*t13^2*(b4^2 + t24^2)))) /. rep
test2 = FullSimplify[test /. t -> y - a4 /. {a3 - a4 -> c, a2 - a4 ->
d, a1 - a4 -> e}](*helping Mathematica*)
Integrate[test2, y]
Reverse /@ {a3 - a4 -> c, a2 - a4 -> d, a1 - a4 -> e}
ff=%% /. y -> t + a4 /. {c -> a3 - a4, d -> a2 - a4, e -> a1 - a4}
(*returning to original variable and parameters*)
D[ff,t]==test//Simplify (*check*)
SessionTime[]

Out[2]=
0=2E375`7.0255762612236925

Out[3]=
{b1 -> a1 + t, b2 -> a2 + t, b3 -> a3 + t, b4 -> a4 + t}

Out[4]=
-(((a3 + t)*(a4 + t)*t13^2*((-(a2 + t))*(a4 + t) + t24^2) - (a1 +
t)^2*(a3 + t)*((a2 + t)*(a4 + t)^2 - (a4 + t)*t24^2 +
      (a3 + t)*((a4 + t)^2 + t24^2)) + (a1 + t)*((-(a2 + t))*(a4 +
t)^2*((a3 + t)^2 + t13^2) + (a3 + t)^2*(a4 + t)*t24^2 +
      (a4 + t)*t13^2*t24^2 + (a3 + t)*t13^2*((a4 + t)^2 + t24^2)))/
(((a1 + t)*(a3 + t) - t13^2)^3*
    ((-(a2 + t))*(a4 + t) + t24^2)^2))

Out[5]=
-(((-(c + y))*(e + y)^2*(c*t24^2 + (c + d)*y^2 + 2*y^3) + t13^2*y*(c +
y)*(t24^2 - y*(d + y)) +
    (e + y)*(t13^2*t24^2*y + t24^2*y*(c + y)^2 + t13^2*(c + y)*(t24^2
+ y^2) - y^2*(d + y)*(t13^2 + (c + y)^2)))/
   ((t24^2 - y*(d + y))^2*(-t13^2 + (c + y)*(e + y))^3))

Out[6]=
(y*(c + y)*(e + y))/((t24^2 - y*(d + y))*(-t13^2 + c*(e + y) + y*(e +
y))^2)

Out[7]=
{c -> a3 - a4, d -> a2 - a4, e -> a1 - a4}

Out[8]=
((a1 + t)*(a3 + t)*(a4 + t))/(((a3 - a4)*(a1 + t) + (a1 + t)*(a4 + t)
- t13^2)^2*((-(a2 + t))*(a4 + t) + t24^2))

Out[9]=
True

Out[10]=
17.28125`8.689120146480764


I think almost 17 seconds is more than just reasonable timing!


"Stay tuned" with this forum for other Integrate queries!!!


Kind Regards
Dimitris

=CF/=C7 Michael Weyrauch =DD=E3=F1=E1=F8=E5:
> Hello,
>
> I seem to have a problem with Integrate using Mathematica 5.2 on a
> Windows PC.
>
> In fact, I would like to integrate the following somewhat lengthy
> rational function of  t. (I use a replacement rule to save some typing)
>
> rep={b1\[Rule]a1+t,b2\[Rule]a2+t,b3\[Rule]a3+t,b4\[Rule]a4+t}
>
> \!\(test = \(-\(\((b3\ b4\ t13\^2\ \((\(-b2\)\ b4 + t24\^2)\) -
>                 b1\^2\ b3\ \((b2\ b4\^2 - b4\ t24\^2 +
>                       b3\ \((b4\^2 + t24\^2)\))\) +
>                 b1\ \((\(-b2\)\ b4\^2\ \((b3\^2 + t13\^2)\) +
>                       b3\^2\ b4\ t24\^2 + b4\ t13\^2\ t24\^2 +
>                       b3\ t13\^2\ \((b4\^2 +
>                             t24\^2)\))\))\)\/\(\((b1\ b3 - t13\^2)\)\^3\ \
> \((\(-b2\)\ b4 + t24\^2)\)\^2\)\)\) /. rep\)
>
> If I try to determine the indefinite integral using
>
> Integrate[test,t]
>
> Mathematica never returns a result on my computer. It works hard, consume=
s eventually all memory of my computer ( I have up to 32 GB
> on a Linux workstation) and eventually shuts down the kernel. But that ta=
kes very long!
>
> However, the integral is actually relatively easily determined "by hand".=
 The result is
>
>  \!\(test3 = \(\((a1 + t)\)\ \((a3 + t)\)\ \((a4 + t)\)\)\/\(\((\(-t13\=
^2\) + \
> \((a1 + t)\)\ \((a3 + t)\))\)\^2\ \((t24\^2 - \((a2 + t)\)\ \((a4 + t)\))=
\)\)\
> \)
>
> as can be verified by differentiation.
>
> Since I have to do more of such integrals, it would be nice if I could ge=
t Mathematica to do the work. Does anyone have an idea what
> could be done about that? Is there any trick or option in order to do suc=
h integrals using Mathematica?
>
> Moreover, it would be nice to know what Mathematica is actually doing whi=
le it suffers through that calculation, it also does not
> give me an error message.
>
> Thanks for any help.
>
> Michael Weyrauch



  • Prev by Date: NDSolve and Systems of DEs
  • Next by Date: draw question 2 (cusp-like curve)
  • Previous by thread: Re: Integrate
  • Next by thread: Re: Integrate