Message Boards Message Boards

0
|
1238 Views
|
4 Replies
|
0 Total Likes
View groups...
Share
Share this post:

Conditions of Integration results are against Assumptions used?

Posted 7 months ago

I am trying to do an integration:

Integrate[x^2/(r - x), {x, 0, R}, 
 Assumptions -> Element[x | r | R, Reals], Assumptions -> R < r, 
 Assumptions -> r > 0]

But the results are conditional, that r < 0. But I've already declared that r > 0.
Do I have this expression wrong?
The original integration was

Integrate[x^2/abs[r - x], {x, 0, R}, 
 Assumptions -> Element[x | r | R, Reals], Assumptions -> R < r, 
 Assumptions -> r > 0]

but that didn't work out. And since I have r > x over the integration domain, I thought I could drop the abs[] function.

Can anyone spot the problem?

Thanks,
Bob Gray

POSTED BY: Robert Gray
4 Replies
Posted 7 months ago

I thank you very much for taking the time to teach me this. It is working now. :)

Cheers, Bob Gray

POSTED BY: Robert Gray
Posted 7 months ago

Thanks, Bill. I guess I don't understand how to specify Assumptions. I also tried another case:

Integrate[1/(x (r - x)), {x, Ra, Rs}, 
 Assumptions -> Element[x | r | Ra | Rs, Reals], 
 Assumptions -> 0 < Ra < Rs, Assumptions -> r > Rs, 
 Assumptions -> r > Ra]

But the result was a conditional with r < Ra. But I said r > Ra in the Assumptions. Am I specifying Assumptions incorrectly? When I do a numerical example, setting real values to Ra, Rs, r it has no problem providing a real number answer. So why is it not able to provide a symbolic answer under these Assumptions?

Cheers, Bob Gray

POSTED BY: Robert Gray
Posted 7 months ago

Assumptions is an option. If an option is repeated, only the first one is used, the rest are ignored. E.g. compare

Plot[Sin[x], {x, 0, 2 Pi}, PlotStyle -> Thick, PlotStyle -> Dashed]
Plot[Sin[x], {x, 0, 2 Pi}, PlotStyle -> Dashed, PlotStyle -> Thick]

Combine the Assumptions. E.g.

Integrate[1/(x (r - x)), {x, Ra, Rs}, 
 Assumptions -> 
  Element[x | r | Ra | Rs, Reals] && 0 < Ra < Rs && r > Rs && r > Ra]
POSTED BY: Rohit Namjoshi
Posted 7 months ago

Try

Integrate[x^2/(r-x),{x,0,R},Assumptions->0<R<r]

which seems to express all the necessary assumptions and quickly returns

-1/2*(R*(2*r+R))+r^2*Log[r/(r-R)]
POSTED BY: Bill Nelson
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