3
$\begingroup$

I want to directly use the x function to find the exact value of the following bivariate definite integral:

reg = ImplicitRegion[x^2 + y^2 <= 1 && x >= 0, {x, y}];
(* the answer should be π/2*Log[2] *)
Integrate[(1 + x*y)/(1 + x^2 + y^2), Element[{x, y}, reg]]

This bivariate integral is not complicated, but the above formula returns as it is. I want to know where the problem is and how I should modify it.

NIntegrate[(1 + x*y)/(1 + x^2 + y^2), Element[{x, y}, reg]]
(*1.08879304515*)
$\endgroup$
2
  • 1
    $\begingroup$ This is worth reporting to Support. $\endgroup$ – J. M.'s torpor Aug 16 '20 at 3:52
  • 1
    $\begingroup$ Despite your words, this is not a simple integral in the cartesian coordinates: both Integrate[(1 + x*y)/(1 + x^2 + y^2), {x, 0, 1}, {y, -Sqrt[1 - x^2], Sqrt[1 - x^2]}] and Integrate[(1 + x*y)/(1 + x^2 + y^2), {y, -1, 1}, {x, 0, Sqrt[1 - y^2]}] fail. $\endgroup$ – user64494 Aug 16 '20 at 4:05
8
$\begingroup$
Integrate[(1 + x*y)/(1 + x^2 + y^2), {x, y} ∈ Disk[{0, 0}, 1, {-π/2, π/2}]]
$\endgroup$
1
  • $\begingroup$ Ah, I forgot that you can use Disk[] to make sectors. $\endgroup$ – J. M.'s torpor Aug 16 '20 at 4:14
7
$\begingroup$

One could just use an alternative region specification:

reg = RegionIntersection[Disk[], HalfPlane[{0, 0}, {0, 1}, {1, 0}]];
Integrate[(1 + x y)/(1 + x^2 + y^2), {x, y} ∈ reg]
   1/2 π Log[2]

or switch to polar coordinates:

Simplify[((1 + x y)/(1 + x^2 + y^2) /. Thread[{x, y} -> r AngleVector[θ]])
         Det[D[r AngleVector[θ], {{r, θ}}]]]
   (r + r^3 Cos[θ] Sin[θ])/(1 + r^2)

Integrate[(r + r^3 Cos[θ] Sin[θ])/(1 + r^2), {r, 0, 1}, {θ, -π/2, π/2}]
   1/2 π Log[2]
$\endgroup$
2
  • $\begingroup$ Thank you very much. I want to know why we can't solve this problem directly. If you can, you can tag this post with bugs to attract professional attention. $\endgroup$ – A little mouse on the pampas Aug 16 '20 at 3:58
  • 2
    $\begingroup$ @Monte, it's more of a "missing feature" than a bug. As you are already aware, Mathematica echoes the input if it doesn't know what to do with it, which is the case here. $\endgroup$ – J. M.'s torpor Aug 16 '20 at 4:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.