I have a function defined within the domain 0<=x<=2*Pi.
f = Cos[x] * (a - 1 - r*Cos[x])^1.5 on the domain: ArcCos[(a-1)/r] < x < 2*Pi-ArcCos[(a-1)/r]
f = 0 elsewhere
'a' and 'r' are constants. I need to find the area under this curve from 0 to 2 Pi. Mathematically this is the same as saying:
Integrate[Cos[x] * (a - 1 - r*Cos[x])^1.5, {x, ArcCos[(a-1)/r], 2*Pi-ArcCos[(a-1)/r]}]
Sadly Mathematica struggles to evaluate this correctly. So I tried investigating by plotting the first part of the function f (using a=0.1, r=4) and plotting its indefinite integral (call it g). The function g looks incorrect because it has a discontinuity at Pi. Since it's the area under the curve f you'd expect g(x) < 0 and continuous within this domain.
I'm no expert at Matheamtica so I don't want to claim it's a bug, but if someone can help me find out what I'm doing wrong or help me find the area under the curve then I would be very appreciative!