0
$\begingroup$

For an assignment I have to use numerical integration technique to calculate volume with cylindrical surface

Ω=(x−0.5)^2 +(y−0.5)^2 ≤0.25 and height is ln(x+y)

I have used Monte Carlo technique to calculate the volume. But to be sure the answer is correct I want to check the exact volume. I have been searching online on how to do it but couldn't find it.

So the question is, is there a way to calculate exact volume for that object or integral like this:

enter image description here

$\endgroup$
  • $\begingroup$ This site is for Mathematica questions. $\endgroup$ – J. M.'s technical difficulties Aug 13 '17 at 13:08
  • $\begingroup$ is there a way to calculate that volume using Mathematica $\endgroup$ – Jack Aug 13 '17 at 13:14
  • $\begingroup$ Yes; look up NIntegrate[]. $\endgroup$ – J. M.'s technical difficulties Aug 13 '17 at 13:56
1
$\begingroup$

You can specify the region of integration using Boole

NIntegrate[Abs[Log[x + y]]* Boole[(x - 0.5)^2 + (y - 0.5)^2 <= 0.25], 
  {x, -0.5, 0.5}, {y, -0.5, 0.5}]
|improve this answer|||||
$\endgroup$
  • $\begingroup$ thanks for your reply @bill s Does that work in mathematica online? $\endgroup$ – Jack Aug 14 '17 at 17:52
  • $\begingroup$ is there a reason that you used {x, -0.5, 0.5}, {y, -0.5, 0.5} $\endgroup$ – Jack Aug 14 '17 at 18:03

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.