TransWikia.com

Well-defined symbolic integral leading to ConditionalExpression

Mathematica Asked by jibe on March 13, 2021

I would like to determine a closed-form expression for the following symbolic integral

$$ int_{-1/2}^{1/2} !!!! mathrm{d} x int_{-1/2}^{1/2} !!!! mathrm{d} y , frac{1 + b x + c y}{1 + e x + f y + i eta} , ,$$

where the coefficients appearing in this expression are such that

$$
begin{cases}
displaystyle b,c,e,f in mathbb{R} , ,

displaystyle eta in mathbb{R}, , , eta neq 0 , .
end{cases}
$$

As a consequence, this integral is always well-defined since its denominator is never equal to 0. To compute this integral in Mathematica, I used the instruction :

int = Integrate[(1 + b x + c y)/(1 + e x + f y + I [Eta]), {x, -1/2,1/2}, {y, -1/2, 1/2}, Assumptions -> {b [Element] Reals, c [Element] Reals, e [Element] Reals, f [Element] Reals, [Eta] [Element] Reals, [Eta] != 0}]

After a quite long calculation (260s) on my computer with Mathematica 10.0.2, I obtained a result of the form

int = ConditionalExpression[......,(f<-2 && (2+f<e<0 || (e>0 && 2+e+f<0))) || (-2<f<0 && ((2+e+f>0 && e<0) || 0<e<2+f)) || (0<f<2 && (-2+f<e<0 || (e>0 && e+f<2))) || (f>2 && ((e+f>2 && e<0) || 0<e<-2+f))]]

Why do I obtain a result with a ConditionalExpression, while my integral should always be correctly defined ? How should I proceed to convince Integrate that this integral is always well-defined ?

I noticed that the result inside the ConditionalExpression involves terms of the form ArcTan[(2 [Eta])/(-2+e+f)], which partially explain the constraints obtained.

Another issue is that the result inside the ConditionalExpression also involves complex logarithmic terms of the form Log[2-e-f+2 I [Eta]] . I know that the complex logarithm has a branch-cut so that the result may not be robust when being evaluated.

Would it also be possible to obtain a result that would not involve expression with branch-cuts, so that the results would always be straightforwardly well defined ?

2 Answers

You can gain insight by evaluating and then simplifying the indefinite integrals.

Integrate[(1 + b x + c y)/(1 + e x + f y + I η), y, x, Assumptions -> {x ∈ Reals, 
  y ∈ Reals, b ∈ Reals, c ∈ Reals, e ∈ Reals,f ∈ Reals, η ∈ Reals, η != 0}];
ans = Collect[%, {ArcTan[η/(1 + e x + f y)], Log[1 + e^2 x^2 + 2 f y + f^2 y^2 + 
  2 e (x + f x y) + η^2]}, Simplify]

The result is free of conditions but contains an ArcTan function, which is multi-valued, changing sign at 1 + e x + f y == 0.

(* ((I/2)*(f*(b*(e^2*x^2 - (1 + f*y + I*η)^2) + 2*e*(1 + e*x + I*η)) - 
            c*e*(1 + e*x + I*η)^2)*ArcTan[η/(1 + e*x + f*y)])/(e^2*f^2) + 
   (y*(f*(-4*e + b*(2 + 2*e*x + f*y + (2*I)*η)) + 
            c*e*(2 + 2*e*x - f*y + (2*I)*η) + 2*e*f*(2 + c*y)*
                Log[1 + e*x + f*y + I*η]))/(4*e^2*f) + 
    ((f*(b*(e^2*x^2 - (1 + f*y + I*η)^2) + 2*e*(1 + e*x + I*η)) - 
            c*e*(1 + e*x + I*η)^2)*Log[1 + e^2*x^2 + 2*f*y + f^2*y^2 + 
                2*e*(x + f*x*y) + η^2])/(4*e^2*f^2) *)

A sample plot of Im[ans] is given by

Plot3D[Evaluate[Im[ans] /. {b -> 3, c -> 3, e -> -3, f -> 3, η -> .1}], 
  {x, -1/2, 1/2}, {y, -1/2, 1/2}, PlotRange -> All, PlotPoints -> 50, 
  AxesLabel -> {x, y, "Im[ans]"}, ImageSize -> 500, Exclusions -> None]

Mathematica graphics

However, obviously the integral itself is not discontinuous, the discontinuity in ans arising from the branch cut in ArcTan. But, we are free to choose a different branch that eliminates this spurious discontinuity. Doing so can be accomplished by defining

myarctan[z_] := Piecewise[{{ArcTan[z], z > 0}, {Pi + ArcTan[z], z < 0}}, Pi/2];

and making the substitution

ans = ans /. ArcTan -> myarctan

The redefined ans is continuous.

Mathematica graphics

Alternative to myarctan

The substitution

ans = ans /. ArcTan[z_] :> Pi/2 - ArcTan[1/z]

has the same effect as ans = ans /. ArcTan -> myarctan but does not require definition of a new function. This alternative is based on equations 4.236 and 4.239 of the digital revised version of Handbook of Mathematical Functions.

Addendum

In answer to the additional question posed in a Comment below, the corresponding definite integral is given by

(ans /. {x -> 1/2, y -> 1/2}) - (ans /. {x -> 1/2, y -> -1/2}) - 
  (ans /. {x -> -1/2, y -> 1/2}) + (ans /. {x -> -1/2, y -> -1/2})

Correct answer by bbgodfrey on March 13, 2021

One way to approach this is to look for the source of the problem. In this case, the outer integral (on y) is irrelevant to the problem, because even the simpler integral

int = Integrate[(1 + b x)/(1 + e x + I η), {x, -1/2, 1/2}, 
  Assumptions -> {b ∈ Reals, c ∈ Reals, e ∈ Reals, η ∈ Reals, η != 0}]

gives a conditional expression. But now the answer is smaller and easier to see. The answer contains the term

Log[2 - e + 2 I η]

and the condition is that -2 < e < 2. So what is happening is that you are encountering different branches of the Log function.

You can evaluate this for different branches. For instance, instead of the assumption e ∈ Reals, use e<-2, e>2 or e==0. These all return (nonconditional) answers. The last one is even simple:

1/(1 + I η)

Hopefully these answers can feed back into the original problem with the double integral.

Answered by bill s on March 13, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP