3.4.15 \(\int (-\sqrt {x}+\sqrt {1+x})^{\pi } \, dx\) [315]

3.4.15.1 Optimal result
3.4.15.2 Mathematica [B] (verified)
3.4.15.3 Rubi [A] (warning: unable to verify)
3.4.15.4 Maple [F]
3.4.15.5 Fricas [A] (verification not implemented)
3.4.15.6 Sympy [B] (verification not implemented)
3.4.15.7 Maxima [F]
3.4.15.8 Giac [F]
3.4.15.9 Mupad [F(-1)]

3.4.15.1 Optimal result

Integrand size = 17, antiderivative size = 45 \[ \int \left (-\sqrt {x}+\sqrt {1+x}\right )^{\pi } \, dx=-\frac {2 \left (-\sqrt {x}+\sqrt {1+x}\right )^{\pi } \left (1+2 x+\pi \sqrt {x} \sqrt {1+x}\right )}{-4+\pi ^2} \]

output
-2*(-x^(1/2)+(1+x)^(1/2))^Pi*(1+2*x+Pi*x^(1/2)*(1+x)^(1/2))/(Pi^2-4)
 
3.4.15.2 Mathematica [B] (verified)

Leaf count is larger than twice the leaf count of optimal. \(107\) vs. \(2(45)=90\).

Time = 0.54 (sec) , antiderivative size = 107, normalized size of antiderivative = 2.38 \[ \int \left (-\sqrt {x}+\sqrt {1+x}\right )^{\pi } \, dx=\frac {2 \sqrt {1+x} \left (-\sqrt {x}+\sqrt {1+x}\right )^{-1+\pi } \left (1-2 (-2+\pi ) x-2 (-2+\pi ) x^2+(-2+\pi ) \sqrt {x} \sqrt {1+x}+2 (-2+\pi ) x^{3/2} \sqrt {1+x}\right )}{(-2+\pi ) (2+\pi ) \left (-1-x+\sqrt {x} \sqrt {1+x}\right )} \]

input
Integrate[(-Sqrt[x] + Sqrt[1 + x])^Pi,x]
 
output
(2*Sqrt[1 + x]*(-Sqrt[x] + Sqrt[1 + x])^(-1 + Pi)*(1 - 2*(-2 + Pi)*x - 2*( 
-2 + Pi)*x^2 + (-2 + Pi)*Sqrt[x]*Sqrt[1 + x] + 2*(-2 + Pi)*x^(3/2)*Sqrt[1 
+ x]))/((-2 + Pi)*(2 + Pi)*(-1 - x + Sqrt[x]*Sqrt[1 + x]))
 
3.4.15.3 Rubi [A] (warning: unable to verify)

Time = 0.28 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.82, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.353, Rules used = {7296, 2544, 25, 335, 802, 2009}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int \left (\sqrt {x+1}-\sqrt {x}\right )^{\pi } \, dx\)

\(\Big \downarrow \) 7296

\(\displaystyle 2 \int \sqrt {x} \left (\sqrt {x+1}-\sqrt {x}\right )^{\pi }d\sqrt {x}\)

\(\Big \downarrow \) 2544

\(\displaystyle \frac {1}{2} \int -\left ((1-x) x^{\frac {1}{2} (-3+\pi )} (x+1)\right )d\left (\sqrt {x+1}-\sqrt {x}\right )\)

\(\Big \downarrow \) 25

\(\displaystyle -\frac {1}{2} \int (1-x) x^{\frac {1}{2} (-3+\pi )} (x+1)d\left (\sqrt {x+1}-\sqrt {x}\right )\)

\(\Big \downarrow \) 335

\(\displaystyle -\frac {1}{2} \int x^{\frac {1}{2} (-3+\pi )} \left (1-x^2\right )d\left (\sqrt {x+1}-\sqrt {x}\right )\)

\(\Big \downarrow \) 802

\(\displaystyle -\frac {1}{2} \int \left (x^{\frac {1}{2} (-3+\pi )}-x^{\frac {1+\pi }{2}}\right )d\left (\sqrt {x+1}-\sqrt {x}\right )\)

\(\Big \downarrow \) 2009

\(\displaystyle \frac {1}{2} \left (\frac {x^{\frac {1}{2} (\pi -2)}}{2-\pi }+\frac {x^{\frac {2+\pi }{2}}}{2+\pi }\right )\)

input
Int[(-Sqrt[x] + Sqrt[1 + x])^Pi,x]
 
output
(x^((-2 + Pi)/2)/(2 - Pi) + x^((2 + Pi)/2)/(2 + Pi))/2
 

3.4.15.3.1 Defintions of rubi rules used

rule 25
Int[-(Fx_), x_Symbol] :> Simp[Identity[-1]   Int[Fx, x], x]
 

rule 335
Int[((e_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.)*((c_) + (d_.)*(x_)^2)^(p 
_.), x_Symbol] :> Int[(e*x)^m*(a*c + b*d*x^4)^p, x] /; FreeQ[{a, b, c, d, e 
, m, p}, x] && EqQ[b*c + a*d, 0] && (IntegerQ[p] || (GtQ[a, 0] && GtQ[c, 0] 
))
 

rule 802
Int[((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_.), x_Symbol] :> Int[Exp 
andIntegrand[(c*x)^m*(a + b*x^n)^p, x], x] /; FreeQ[{a, b, c, m, n}, x] && 
IGtQ[p, 0]
 

rule 2009
Int[u_, x_Symbol] :> Simp[IntSum[u, x], x] /; SumQ[u]
 

rule 2544
Int[((g_.) + (h_.)*(x_))^(m_.)*((e_.)*(x_) + (f_.)*Sqrt[(a_.) + (c_.)*(x_)^ 
2])^(n_.), x_Symbol] :> Simp[1/(2^(m + 1)*e^(m + 1))   Subst[Int[x^(n - m - 
 2)*(a*f^2 + x^2)*((-a)*f^2*h + 2*e*g*x + h*x^2)^m, x], x, e*x + f*Sqrt[a + 
 c*x^2]], x] /; FreeQ[{a, c, e, f, g, h, n}, x] && EqQ[e^2 - c*f^2, 0] && I 
ntegerQ[m]
 

rule 7296
Int[u_, x_Symbol] :> With[{lst = SubstForFractionalPowerOfLinear[u, x]}, Si 
mp[lst[[2]]*lst[[4]]   Subst[Int[lst[[1]], x], x, lst[[3]]^(1/lst[[2]])], x 
] /;  !FalseQ[lst]]
 
3.4.15.4 Maple [F]

\[\int \left (\sqrt {1+x}-\sqrt {x}\right )^{\pi }d x\]

input
int(((1+x)^(1/2)-x^(1/2))^Pi,x)
 
output
int(((1+x)^(1/2)-x^(1/2))^Pi,x)
 
3.4.15.5 Fricas [A] (verification not implemented)

Time = 0.30 (sec) , antiderivative size = 37, normalized size of antiderivative = 0.82 \[ \int \left (-\sqrt {x}+\sqrt {1+x}\right )^{\pi } \, dx=-\frac {2 \, {\left (\pi \sqrt {x + 1} \sqrt {x} + 2 \, x + 1\right )} {\left (\sqrt {x + 1} - \sqrt {x}\right )}^{\pi }}{\pi ^{2} - 4} \]

input
integrate(((1+x)^(1/2)-x^(1/2))^pi,x, algorithm="fricas")
 
output
-2*(pi*sqrt(x + 1)*sqrt(x) + 2*x + 1)*(sqrt(x + 1) - sqrt(x))^pi/(pi^2 - 4 
)
 
3.4.15.6 Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 4362 vs. \(2 (39) = 78\).

Time = 3.88 (sec) , antiderivative size = 4362, normalized size of antiderivative = 96.93 \[ \int \left (-\sqrt {x}+\sqrt {1+x}\right )^{\pi } \, dx=\text {Too large to display} \]

input
integrate(((1+x)**(1/2)-x**(1/2))**pi,x)
 
output
Piecewise((4*x**(13/2)*sqrt(1 + 1/x)*sinh(asinh(sqrt(x)) + pi*asinh(sqrt(x 
)))*gamma(1 + pi/2)/(-4*x**5*gamma(1 + pi/2) + pi**2*x**5*gamma(1 + pi/2) 
- 4*x**4*gamma(1 + pi/2) + pi**2*x**4*gamma(1 + pi/2)) + 2*pi*x**(13/2)*sq 
rt(1 + 1/x)*sinh(asinh(sqrt(x)) + pi*asinh(sqrt(x)))*gamma(1 + pi/2)/(-4*x 
**5*gamma(1 + pi/2) + pi**2*x**5*gamma(1 + pi/2) - 4*x**4*gamma(1 + pi/2) 
+ pi**2*x**4*gamma(1 + pi/2)) - 2*pi*x**(13/2)*cosh(asinh(sqrt(x)) + pi*as 
inh(sqrt(x)))*gamma(1 + pi/2)/(-4*x**5*gamma(1 + pi/2) + pi**2*x**5*gamma( 
1 + pi/2) - 4*x**4*gamma(1 + pi/2) + pi**2*x**4*gamma(1 + pi/2)) - 4*x**(1 
3/2)*cosh(asinh(sqrt(x)) + pi*asinh(sqrt(x)))*gamma(1 + pi/2)/(-4*x**5*gam 
ma(1 + pi/2) + pi**2*x**5*gamma(1 + pi/2) - 4*x**4*gamma(1 + pi/2) + pi**2 
*x**4*gamma(1 + pi/2)) + 6*x**(11/2)*sqrt(1 + 1/x)*sinh(asinh(sqrt(x)) + p 
i*asinh(sqrt(x)))*gamma(1 + pi/2)/(-4*x**5*gamma(1 + pi/2) + pi**2*x**5*ga 
mma(1 + pi/2) - 4*x**4*gamma(1 + pi/2) + pi**2*x**4*gamma(1 + pi/2)) + 2*p 
i*x**(11/2)*sqrt(1 + 1/x)*sinh(asinh(sqrt(x)) + pi*asinh(sqrt(x)))*gamma(1 
 + pi/2)/(-4*x**5*gamma(1 + pi/2) + pi**2*x**5*gamma(1 + pi/2) - 4*x**4*ga 
mma(1 + pi/2) + pi**2*x**4*gamma(1 + pi/2)) - 4*pi*x**(11/2)*cosh(asinh(sq 
rt(x)) + pi*asinh(sqrt(x)))*gamma(1 + pi/2)/(-4*x**5*gamma(1 + pi/2) + pi* 
*2*x**5*gamma(1 + pi/2) - 4*x**4*gamma(1 + pi/2) + pi**2*x**4*gamma(1 + pi 
/2)) - 6*x**(11/2)*cosh(asinh(sqrt(x)) + pi*asinh(sqrt(x)))*gamma(1 + pi/2 
)/(-4*x**5*gamma(1 + pi/2) + pi**2*x**5*gamma(1 + pi/2) - 4*x**4*gamma(...
 
3.4.15.7 Maxima [F]

\[ \int \left (-\sqrt {x}+\sqrt {1+x}\right )^{\pi } \, dx=\int { {\left (\sqrt {x + 1} - \sqrt {x}\right )}^{\pi } \,d x } \]

input
integrate(((1+x)^(1/2)-x^(1/2))^pi,x, algorithm="maxima")
 
output
integrate((sqrt(x + 1) - sqrt(x))^pi, x)
 
3.4.15.8 Giac [F]

\[ \int \left (-\sqrt {x}+\sqrt {1+x}\right )^{\pi } \, dx=\int { {\left (\sqrt {x + 1} - \sqrt {x}\right )}^{\pi } \,d x } \]

input
integrate(((1+x)^(1/2)-x^(1/2))^pi,x, algorithm="giac")
 
output
integrate((sqrt(x + 1) - sqrt(x))^pi, x)
 
3.4.15.9 Mupad [F(-1)]

Timed out. \[ \int \left (-\sqrt {x}+\sqrt {1+x}\right )^{\pi } \, dx=\int {\left (\sqrt {x+1}-\sqrt {x}\right )}^\Pi \,d x \]

input
int(((x + 1)^(1/2) - x^(1/2))^Pi,x)
 
output
int(((x + 1)^(1/2) - x^(1/2))^Pi, x)