0
$\begingroup$

Why is the following integral not evaluated by Mathematica (ver. 11.3, Windows 10)

Integrate[1, {x, 2 - Sqrt[2], 1}, {y, 
  1/2 - 1/2 Sqrt[(-4 + 8 x - 4 x^3 + x^4)/((-2 + x)^2 x^2)], 
  1/2 + 1/2 Sqrt[(-4 + 8 x - 4 x^3 + x^4)/((-2 + x)^2 x^2)]}]

Edit: This is actually a double integral $\int_{2-\sqrt{2}}^{1} dx \int_{ \frac{1}{2} - \frac{1}{2} \sqrt{(-4 + 8 x - 4 x^3 + x^4)/((-2 + x)^2 x^2)}}^{ \frac{1}{2} + \frac{1}{2} \sqrt{(-4 + 8 x - 4 x^3 + x^4)/((-2 + x)^2 x^2)}} dy$.

$\endgroup$
2
  • $\begingroup$ What integral do you want to solve? Could you write it out or post a picture? $\endgroup$
    – Tomi
    Commented Aug 28, 2021 at 19:51
  • 1
    $\begingroup$ This integral is difficult to solve analytically, but simple numerically. Therefore, use NIntegrate instead of Integrate $\endgroup$ Commented Aug 28, 2021 at 20:12

2 Answers 2

1
$\begingroup$

I am confused as to what integral you want to be solved.

You need to write the integral function in a form like

(*integrand*)
eq = 1;
(*limits*)
limits = {x, 2 - Sqrt[2], 1};

result = Integrate[eq, limits]

So, I don't understand your question - are you trying to integrate it twice?

eq = 1;
limits = {y, 
   1/2 - 1/2 Sqrt[(-4 + 8 x - 4 x^3 + x^4)/((-2 + x)^2 x^2)], 
   1/2 + 1/2 Sqrt[(-4 + 8 x - 4 x^3 + x^4)/((-2 + x)^2 x^2)]};
result1 = Integrate[eq, limits]
limits2 = {x, 2 - Sqrt[2], 1};
NIntegrate[result1, limits2]
$\endgroup$
2
  • $\begingroup$ I have edited my question. What I wrote is actually a double integral. $\endgroup$
    – Zubin
    Commented Aug 28, 2021 at 20:01
  • $\begingroup$ Edited my answer $\endgroup$
    – Tomi
    Commented Aug 28, 2021 at 20:05
1
$\begingroup$

As an alternative to @Tomi's solution, define a two-dimensional region:

R = ImplicitRegion[x*(x-2)*(x*y*(x-2)*(y-1)+1)+1 <= 0 &&
                   2 - Sqrt[2] <= x <= 1,
                   {x, y}];

Numerical integration over regions is straightforward:

NIntegrate[1, Element[{x, y}, R]]
(*    0.339303    *)

You can of course also use your original parametrization of the region:

R0 = ImplicitRegion[2 - Sqrt[2] <= x <= 1 &&
       1/2 - 1/2 Sqrt[(-4 + 8 x - 4 x^3 + x^4)/((-2 + x)^2 x^2)] <= y <=
       1/2 + 1/2 Sqrt[(-4 + 8 x - 4 x^3 + x^4)/((-2 + x)^2 x^2)],
       {x, y}];
NIntegrate[1, Element[{x, y}, R0]]
(*    0.339303    *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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