Message Boards Message Boards

GROUPS:

How to check in Wolfram|Alpha double integral?

Posted 20 days ago
235 Views
|
6 Replies
|
2 Total Likes
|
6 Replies
Plot[{x^2, x + 2}, {x, 0, 3}]
Integrate[x + 2 - x^2, {x, 0, 2}]

it's wrong, another shape is bounded by these lines. y^2=x and x-y=2 enter image description here

1) you didn't specify your problem exactly

2) I interchanged x and y, So your figure is basically the same as my region

3) Try

Plot[{x^2, x + 2}, {x, -2, 3}]
Integrate[x + 2 - x^2, {x, -1, 2}]
Posted 20 days ago

Does this match what you expect?

Integrate[Integrate[y^2,{x,xlow(y),xhigh(y)}],{y,ylow,yhigh}]

so

Integrate[Integrate[y^2,{x,y^2,2+y}],{y,-1,2}]

Giving exactly that to either WolframAlpha or to Mathematica returns 63/20==3.15

It is also possible to do the same with

Integrate[y^2,{y,-1,2},{x,y^2,2+y}]

but the y and x must be given in exactly that order if you use that form.

As a check, If you are using Mathematica or other calculation tools then it is possible to calculate a crude manual approximation of this

total=0;d=1/100;
For[y=-1,y<=2,y=y+d,
  For[x=y^2,x<=2+y,x=x+d,
    total=total+y^2*d^2
]];
total//N

which returns

3.1652

and that is approximately the same as the result from the integration and smaller values for d will give better approximations..

But after doing that be sure to tell Mathematica to forget the cached assigned values to x and y with

x=.;y=.;

before doing further Integrate which do not expect to have x or y have been assigned values.

Posted 19 days ago

Thx you for your answers!!

Here is another approach

Integrate[Integrate[1, {x, y^2, y + 2}], {y, -1, 2}]

Or did you mean this?

Integrate[Integrate[y^2, {x, y^2, y + 2}], {y, -1, 2}]
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract