# Doesn't analytically integrate sensibly let alone correctly

(This is induced x velocity on vortex sheet y=1+gtax/g+tx by strength 1+ac/X)

    Us[x_, g_, t_, c_] = a g^2 t*(g + t*x)* 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]


a,g,t,c are all positive g=3/2 a= 1/6 t = 1.54419; c = .124775 so answer should be positive, At front of sheet x=0 evaluates indeterminate, for any positive x gives negative answer! At x=0 hand simplifies to a g^3 t *Integrate[(g + t X)/((1 + (a c)/X) (X) {(g + t X)^2 g^2 + g^4 t^2 a^2}), {X, 0, Infinity}, GenerateConditions -> False]/Pi

which does give positive value .308 that checks with a numerical integration

Please What's wrong with the general principal value integration back on the sheet?

• I get a positive answer for $x=1$. I get the same negative answer for $x=10$ from both Integrate and NIntegrate. It makes me think the integrations are being done correctly. Mar 4 at 19:12
• @MichaelE2 I get negative value for $x=1$. Screen shot !Mathematica graphics using the code below. Mar 4 at 19:20
• @Nasser: i.stack.imgur.com/LiaPx.png Similar result for Integrate, but it takes too long to evaluate to be worth my exploring. Mar 4 at 19:26
• @MichaelE2 I am using exact numbers below. May be this is why there is a difference. Mar 4 at 19:27
• I think I first did it without x->1 inside, but I did have Assumptions. I'd bet the assumptions on x are important for PrincipalValue to work. Mar 4 at 20:07

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

• Thanks for all the work everyone has done so quickly. I am still trying to digest it all. Physically I expect the induced velocity to be positive at all x and certainly at very small x where all the vorticity is at bigger x. Mar 4 at 19:59

So to try to summarise everyone else's super problem solving and remove a distraction my erroneous intuition caused, the simple answer to my question is just that a real integration, at least a Principal value one should include in the conditions list Assumptions -> {a > 0, g > 0, t > 0, c > 0, x > 0} where this list is declaring all parameters to be positive and definitely real. This suppresses strange imaginary symbolic output, and corrected wildly erroneous evaluations.