2
$\begingroup$

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

$\endgroup$
1
  • $\begingroup$ "Use IntegrateChangeVariables! " <- Sadly this isn't an answer to your question. (Your example is an extension of 3rd example of IntegrateChangeVariables, though. Do you intentionally ask this after reading the document of IntegrateChangeVariables?) BTW, I think the integral can be transformed to polar coordinates only if $-1\leq a\leq1$? $\endgroup$
    – xzczd
    Commented Aug 25, 2022 at 5:56

1 Answer 1

5
$\begingroup$
  • The formula is wrong. Sqrt[1 - y^2] should be Sqrt[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]

enter image description here

  • 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]

enter image description here

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

enter image description here

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.

$\endgroup$
8
  • 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 parametric a. $\endgroup$
    – cvgmt
    Commented 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$
    – cvgmt
    Commented 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 to 1/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

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.