Re: Definite Integration in Mathematica

*To*: mathgroup at smc.vnet.net*Subject*: [mg74507] Re: Definite Integration in Mathematica*From*: m.r at inbox.ru*Date*: Fri, 23 Mar 2007 19:12:06 -0500 (EST)*References*: <etqo3f$10i$1@smc.vnet.net><ett6i6$gd2$1@smc.vnet.net>

On Mar 22, 12:09 am, "dimitris" <dimmec... at yahoo.com> wrote: > Hello Daniel! > > Of course I am aware of branch cuts and the stuff! > > May be I was not too clear in order someone to understand me! > > Read the first 4 pages of the paper of V Adamichik's Definite > Integration > in Mathematica v. 3.0. available from here: > > http://library.wolfram.com/infocenter/Articles/3157/ > > I will try to set my question as clear as I can! > > The integral that appears in V.A. paper is > > f = HoldForm[Integrate[(4 + 2*x + x^2)/(17 + 2*x - 7*x^2 + x^4), {x, > 0, 4}]] > > and the integrand is a smooth integrable function in the whole real > axis. > > Mathematica's answer of (symbolic) definite integration is > > ReleaseHold@% > Pi - ArcTan[1/4] - ArcTan[5/12] > > which agrees with the result obtained by numerical integration > > {(N[#1, 20] & )[%], ReleaseHold[f /. Integrate[x___] :> NIntegrate[x, > WorkingPrecision -> 40, > AccuracyGoal -> 20]]} > {2.5018228707631675676, 2.50182287076316756755} > > Everything is ok up to now! And as I have shown in an old post you can > using Mathematica to get a continuus > antiderivative in the integration range but this is not my goal! I am > very happy by Mathematica's antiderivative which is rather simple > contrary to my expression. > > Mathematica uses (an extended version of) Risch algorithm in order to > get an antiderivative > for [(x^2 + 2*x + 4)/(x^4 - 7*x^2 + 2*x + 17) > > Simplify[Integrate[(x^2 + 2*x + 4)/(x^4 - 7*x^2 + 2*x + 17), x]] > ArcTan[(1 + x)/(4 - x^2)] > > and due to the jump discontinuity of ArcTan at x=2 the correct way in > order to apply the Newton-Leibniz formula > is > > (% /. x -> 4) - Limit[%, x -> 2, Direction -> -1] + Limit[%, x -> 2, > Direction -> 1] - (% /. x -> 0) > Pi - ArcTan[1/4] - ArcTan[5/12] > > Again everything is clear and absolutely easy to understand! > > My query appears exactly after this point! > > Victor Adamchik tries next (in the same article) to explain the > situation. > > He states that discontinuities of antiderivatives along the path of > integration are due to the nature of the integrand-not the method of > indefinite integration. In the above example, the integrand has four > singular poles that become branch points for the antiderivative. > Connected in pairs these points make two branch cuts. The path of > integration crosses one of them > > The poles of the integrand are at the following points in the complex > plain > > NSolve[x^4 - 7*x^2 + 2*x + 17 == 0, x] > {{x -> -1.9533360788744223 - 0.2440276635405635*I}, {x -> > -1.9533360788744223 + 0.2440276635405635*I}, > {x -> 1.9533360788744223 - 0.7559723364594371*I}, {x -> > 1.9533360788744223 + 0.7559723364594371*I}} > > (ContourPlot[Evaluate[#1[ArcTan[(1 + x)/(4 - x^2)] /. x -> x + I*y]], > {x, -3, 4}, {y, -3, 4}, ContourShading -> False, > Contours -> 20, PlotPoints -> 40, Epilog -> {Hue[0], > Thickness[0.005], Line[{{0, 0}, {4, 0}}]}] & ) /@ {Re, Im} > > What I don't understand is exactly his statement "... Connected in > pairs these points make two branch cuts..." > and how is connected with the jump discontinuity at x=2. > > These pairs of chosen branch cuts by Mathematica for the > antiderivative cross the horizontal axis at x=+/-2? > > If the answer is yes at last I have understand it! > > dh <d... at metrohm.ch> wrote: > The branch cuts in this case are not straight line segments. Here's a way to visualize them. Take the antiderivative: In[1]:= adz = Integrate[(z^2 + 2*z + 4)/(z^4 - 7*z^2 + 2*z + 17), z] Out[1]= (1/2)*ArcTan[(-1 - z)/(-4 + z^2)] - (1/2)*ArcTan[(1 + z)/(-4 + z^2)] In[2]:= adz = ComplexExpand[adz, z, TargetFunctions -> {Re, Im}] // Simplify The discontinuities might occur because of ArcTan[x, y] with x negative and y zero: In[3]:= dc = Union@ Cases[adz, ArcTan[x_, y_] :> {x, y}, -1] /. {Re[z] -> u, Im[z] -> v} In[4]:= <<graphics` DisplayTogether[ {InequalityPlot[#[[1]] < 0, {u, -3, 3}, {v, -3, 3}], ImplicitPlot[#[[2]] == 0, {u, -3, 3}, {v, -3, 3}]}& /@ dc] The disks show where x < 0 and the curves show where y == 0. So the branch cuts are the pieces of the curves that lie inside the circles. The picture doesn't show which curve belongs to which disks, but it gives the general idea. Maxim Rytin m.r at inbox.ru

**Re: Mathematica 4.0**

**Re: Integrate (discontinuous antiderivatives by Mathematica)**

**Re: Re: Definite Integration in Mathematica**

**Re: Definite Integration in Mathematica**