Mathematica Asked on April 7, 2021
Here are 2 examples I have examined.
1. Assumptions
in Integrate
.
Integrate[ Sqrt[1 + (b^2 x^2)/(a^4 - a^2 x^2)], {x, 0, a},
Assumptions -> a > b > 0]
Integrate[ Sqrt[1 + (b^2 x^2)/(a^4 - a^2 x^2)], {x, 0, a}, Assumptions -> a > b > 0]
2. Without Assumptions
in Integrate
.
Integrate[ Sqrt[1 + (b^2 x^2)/(a^4 - a^2 x^2)], {x, 0, a}]
ConditionalExpression[ (Sqrt[-(1/a)] a Sqrt[-(b^2/a)] EllipticE[1 - b^2/a^2])/Sqrt[b^2/a^2], Re[a/Sqrt[a^2 - b^2]] > 1 || Re[a/Sqrt[a^2 - b^2]] < -1 || a/Sqrt[a^2 - b^2] [NotElement] Reals]
Is there anyone who can explain this phenomenon?
This type of an integral can be rewritten more explicitly as the complete elliptic integral of the second kind, namely using change of the independent variable $xto frac{x}{a}$ and the integral will be equal (assuming $aneq 0$): $$int_0^{a}sqrt{1+frac{b^2 x^2}{a^4- a^2 x^2}} dx= a int_0^{1}sqrt{1+frac{b^2 x^2}{a^2(1- x^2)}} dx$$
a Integrate[Sqrt[1 + (b^2 x^2)/(a^2(1-x^2))], {x, 0, 1}, Assumptions -> a > b > 0]
a EllipticE[1- b^2/a^2]
Elliptic integrals have branch cuts, e.g. the complete elliptic integral of the second kind $E(m)$ has a branch cut discontinuity from $1$ to $infty$. This is the main reason why elliptic integrals not always evaluate seamlessly on the symbolic level (see this answer) and one has to rewrite given integrals into more familiar forms (see e.g. Why doesn't Integrate evaluate an elliptic integral? where one finds a more extended discussion). It is reasonable to avoid generic (and sometimes unexpectedly incorrect in exceptional cases) symbolic results and provide more special symbolic cases when one can deal with numerics instead. Dealing with Integrate
without Assumptions
one gets generically correct reasult (unless there might be a bug), however using Assumptions
one would expect perfectly correct output and so then the system appears to be more cautious.
We can also evaluate our integral with a bit more general assumptions
a Integrate[ Sqrt[1 + (b^2 x^2)/(a^2(1 - x^2))], {x, 0, 1},
Assumptions-> a > 0 && b > 0 && a != b]
Quite analogous issue one can find in this question Assumptions allowing to calculate an elliptic integral.
Correct answer by Artes on April 7, 2021
For some reason, Mathematica takes a wrong turn in evaluating this integral if the integrand is
$$
sqrt{1 + frac{b^2 x^2}{a^4 - a^2 x^2}}.
$$
However, if the expression under the radical is combined into a single square root, i.e.
$$
sqrt{frac{a^4 - a^2x^2 + b^2 x^2}{a^4 - a^2 x^2}},
$$
Mathematica happily integrates it. This can be accomplished by the Together
function applied under the square root:
Integrate[Sqrt[Together[1 + (b^2 x^2)/(a^4 - a^2 x^2)]], {x, 0, a}, Assumptions -> a > b > 0]
(* a EllipticE[1 - b^2/a^2] *)
(For the record, I am using Mathematica 12.0.0 on Mac OS. Elliptic-integral handling may be different under different recent versions.)
Answered by Michael Seifert on April 7, 2021
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP