Group Abstract Group Abstract

Message Boards Message Boards

0
|
4K Views
|
5 Replies
|
1 Total Like
View groups...
Share
Share this post:
GROUPS:

Can't compute a double integral by using If command with Mathematica 10.2

Posted 10 years ago
POSTED BY: Juan Felix Avila
5 Replies
Posted 10 years ago

In 10.1

In[1]:= Simplify[Integrate[Integrate[If[{x^2/a^2+y^2/b^2<=1},1,0], {y,-Infinity,Infinity}], {x,-Infinity,Infinity}], {a>0,b>0}]

Out[1]= a b Pi

In[2]:= Simplify[Integrate[Integrate[If[x^2/a^2+y^2/b^2<=1,1,0], {y,-Infinity,Infinity}], {x,-Infinity,Infinity}], {a>0,b>0}]

Out[2]= a b Pi

In[3]:= Simplify[Integrate[Integrate[Boole[x^2/a^2+y^2/b^2<=1], {y,-Infinity,Infinity}], {x,-Infinity,Infinity}], {a>0,b>0}]

Out[3]= a b Pi

In[4]:= Simplify[Integrate[Integrate[Piecewise[{{1,x^2/a^2+y^2/b^2<=1}}, 0], {y,-Infinity,Infinity}], {x,-Infinity,Infinity}], {a>0,b>0}]

Out[4]= a b Pi

In[5]:= Simplify[Integrate[Integrate[Which[x^2/a^2+y^2/b^2<=1,1,True,0], {y,-Infinity,Infinity}], {x,-Infinity,Infinity}], {a>0,b>0}]

Out[5]= a b Pi
POSTED BY: Bill Simpson

Try copying some of the code people posted below. Do you get the same resutls? If not, please run "Quit" to make sure that the kernel is fresh and has no previously defined values.

POSTED BY: Sean Clarke
In[2]:= Integrate[
 If[x^2/a^2 + y^2/b^2 <= 1, 1, 0], {y, -Infinity, 
  Infinity}, {x, -Infinity, Infinity}]

Out[2]= \[Pi]/Sqrt[1/(a^2 b^2)]
POSTED BY: Frank Kampas

Thank your for your valuable time. There you go:

Hold[Simplify[Integrate[Integrate[ If[{x^2/a^2 + y^2/b^2 <= 1}, 1, 0], {y, -Infinity, Plus[Infinity]}], {x, -Infinity, Plus[Infinity]}], {a > 0, b > 0}]]

Best regards, Juan F. Avila

Attachments:
POSTED BY: Juan Felix Avila

It looks like you were trying to paste Traditional Math notation.

Please run Hold and InputForm on your integral:

putYourIntegralHere//Hold//InputForm

This will show the actual code that you are using, which you can then post here.

POSTED BY: Sean Clarke
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard