x=0 evaluates indeterminate, for any positive x gives negative answer!
Lets fix the code first. You had {}
inside the integrand and better use exact numbers. And use Limit
instead of replacing x
to avoid indeterminate
g = 3/2;
a = 1/6 ;
t = Rationalize@1.54419
c = Rationalize@.124775
anti0 = Integrate[(g +
t X)/((1 + (a c)/X) (X - x) ((g + t X)^2 (g + t x)^2 +
g^4 t^2 a^2)), {X, 0, Infinity}, GenerateConditions -> False,
PrincipalValue -> True];
anti1 = a g^2 t*(g + t*x)*anti0;
Limit[anti1, x -> 0] // N

You say the answer should be positive for any positive $x$, but why? This is not what the answer says
Plot[(anti1 /. x -> 1), {x, 0, 10}]

If we step back and look at the integrand itself, you see it is negative from 0 to 1, then it becomes all positive after x=1
g = 3/2;
a = 1/6 ;
t = Rationalize@1.54419
c = Rationalize@.124775
integrand = (g + t X)/((1 + (a c)/X) (X - x) ((g + t X)^2 (g + t x)^2 + g^4 t^2 a^2))
Plot[integrand /. x -> 1, {X, 0, 2}]

And
Plot[integrand /. x -> 1, {X, 0, 2}, PlotRange -> All]

So I think this explains why you get negative value.
This is really a tricky one, because of the singularity at $X=1$, see
antiFirst =
Integrate[integrand, {X, 0, 1}, GenerateConditions -> False,
PrincipalValue -> True];
antiSecond =
Integrate[integrand, {X, 1, Infinity}, GenerateConditions -> False,
PrincipalValue -> True];
And now
Limit[antiFirst, x -> 1] // N

Limit[antiSecond, x -> 1]

Update
There seem to be a problem, but from comment above thanks to Michael, if you replace x
in the integrand before doing the integration, then you get positive antiderivative. If you do it afterwords, you get negative result as shown above. In theory it should not make difference, but replacing x
in the integrand could greatly simplify the integrand and make it easier to do.
Compare
g = 3/2;
a = 1/6 ;
t = Rationalize@1.54419
c = Rationalize@.124775
integrand =
a g^2 t*(g +
t*x) * (g +
t X)/((1 + (a c)/X) (X - x) ((g + t X)^2 (g + t x)^2 +
g^4 t^2 a^2));
anti0 = Integrate[(integrand /. x -> 1), {X, 0, Infinity},
GenerateConditions -> False, PrincipalValue -> True];
anti0 // N

With
g = 3/2;
a = 1/6 ;
t = Rationalize@1.54419
c = Rationalize@.124775
integrand =
a g^2 t*(g +
t*x) * (g +
t X)/((1 + (a c)/X) (X - x) ((g + t X)^2 (g + t x)^2 +
g^4 t^2 a^2));
anti0 = Integrate[integrand, {X, 0, Infinity},
GenerateConditions -> False, PrincipalValue -> True];
Limit[anti0, x -> 1] // N

So bottom line, replace x
into the integrand before integrating to make life little easier for Integrate
Integrate
andNIntegrate
. It makes me think the integrations are being done correctly. $\endgroup$Integrate
, but it takes too long to evaluate to be worth my exploring. $\endgroup$x->1
inside, but I did haveAssumptions
. I'd bet the assumptions onx
are important forPrincipalValue
to work. $\endgroup$