I want to change the following integral to the polar form $$\int_{y=0}^a \int_y^{\sqrt{1-y^2}}(x^2+y^2) dx dy,\ a>0$$ in Mathematica.I would be highly obliged for any help
1 Answer
$\begingroup$
$\endgroup$
8
- The formula is wrong.
Sqrt[1 - y^2]
should beSqrt[a^2 - y^2]
Mathematica can handle such integration directly.
Clear[reg];
reg = ImplicitRegion[{0 <= y <= a, y <= x <= Sqrt[a^2 - y^2]}, {x, y}];
Integrate[x^2 + y^2, {x, y} ∈ reg, Assumptions -> a > 0]
- For the corrected integral, we can also use
IntegrateChangeVariables
.
intCartesian =
Inactive[Integrate][x^2 + y^2, {y, 0, a}, {x, y, Sqrt[a^2 - y^2]}]
intPolar =
IntegrateChangeVariables[intCartesian, {r, θ},
"Cartesian" -> "Polar"]
Activate[intPolar]
Appendix
When a
is less equal to 1/Sqrt[2]
, for example a=1/2
, the questioner's region
is
reg = ImplicitRegion[{0 <= y <= 1/2, y <= x <= Sqrt[1 - y^2]}, {x, y}];
% // Region
It is not a regular sector,so it it hardly to use polar coordinate to calculate such integration(but cartesian coordinate work),that is why the IntegrateChangeVariables
cann't work for this case.
-
1$\begingroup$ What if the formula is not wrong and OP just want to study that integral :) ? $\endgroup$– xzczd ♦Commented Aug 25, 2022 at 6:21
-
$\begingroup$ By the way : Mathematica is able to solve the "wrong" integral analytically. $\endgroup$ Commented Aug 25, 2022 at 6:23
-
$\begingroup$ @xzczd It seems that
IntegrateChangeVariables
not easy to do with the parametrica
. $\endgroup$– cvgmtCommented Aug 25, 2022 at 6:24 -
$\begingroup$ @UlrichNeumann Yes, I have test the wrong integral, for example ,when
a=1/2
, it is impossible calculate the integral by change the variable using polar coordinate since the region in not a regular sector. $\endgroup$– cvgmtCommented Aug 25, 2022 at 6:33 -
$\begingroup$ @cvgmt I tried (Mathematica v12.2)
Integrate[(x^2 + y^2), {y, 0, a}, {x, y, Sqrt[1 - y^2]}]
which evaluates to1/12 (a Sqrt[1 - a^2] + 2 a^3 (-2 a + Sqrt[1 - a^2]) + 3 ArcSin[a]) for -1<a<1
$\endgroup$ Commented Aug 25, 2022 at 6:39
IntegrateChangeVariables
! " <- Sadly this isn't an answer to your question. (Your example is an extension of 3rd example ofIntegrateChangeVariables
, though. Do you intentionally ask this after reading the document ofIntegrateChangeVariables
?) BTW, I think the integral can be transformed to polar coordinates only if $-1\leq a\leq1$? $\endgroup$