\(\int \frac {\sqrt {c-d x} (c+d x)^{3/2}}{x} \, dx\) [252]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [C] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [A] (verification not implemented)
Giac [B] (verification not implemented)
Mupad [F(-1)]
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 23, antiderivative size = 102 \[ \int \frac {\sqrt {c-d x} (c+d x)^{3/2}}{x} \, dx=\frac {1}{2} c \sqrt {c-d x} \sqrt {c+d x}+\frac {1}{2} \sqrt {c-d x} (c+d x)^{3/2}+c^2 \arctan \left (\frac {\sqrt {c+d x}}{\sqrt {c-d x}}\right )-c^2 \text {arctanh}\left (\frac {\sqrt {c-d x} \sqrt {c+d x}}{c}\right ) \] Output:

1/2*c*(-d*x+c)^(1/2)*(d*x+c)^(1/2)+1/2*(-d*x+c)^(1/2)*(d*x+c)^(3/2)+c^2*ar 
ctan((d*x+c)^(1/2)/(-d*x+c)^(1/2))-c^2*arctanh((-d*x+c)^(1/2)*(d*x+c)^(1/2 
)/c)
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.92 \[ \int \frac {\sqrt {c-d x} (c+d x)^{3/2}}{x} \, dx=\frac {\sqrt {c-d x} \left (2 c^2+3 c d x+d^2 x^2\right )}{2 \sqrt {c+d x}}-c^2 \arctan \left (\frac {\sqrt {c-d x}}{\sqrt {c+d x}}\right )-2 c^2 \text {arctanh}\left (\frac {\sqrt {c-d x}}{\sqrt {c+d x}}\right ) \] Input:

Integrate[(Sqrt[c - d*x]*(c + d*x)^(3/2))/x,x]
 

Output:

(Sqrt[c - d*x]*(2*c^2 + 3*c*d*x + d^2*x^2))/(2*Sqrt[c + d*x]) - c^2*ArcTan 
[Sqrt[c - d*x]/Sqrt[c + d*x]] - 2*c^2*ArcTanh[Sqrt[c - d*x]/Sqrt[c + d*x]]
 

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 102, normalized size of antiderivative = 1.00, number of steps used = 12, number of rules used = 11, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.478, Rules used = {112, 25, 27, 171, 25, 27, 175, 45, 103, 218, 221}

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 \frac {\sqrt {c-d x} (c+d x)^{3/2}}{x} \, dx\)

\(\Big \downarrow \) 112

\(\displaystyle \frac {1}{2} \sqrt {c-d x} (c+d x)^{3/2}-\frac {1}{2} \int -\frac {c (2 c-d x) \sqrt {c+d x}}{x \sqrt {c-d x}}dx\)

\(\Big \downarrow \) 25

\(\displaystyle \frac {1}{2} \int \frac {c (2 c-d x) \sqrt {c+d x}}{x \sqrt {c-d x}}dx+\frac {1}{2} \sqrt {c-d x} (c+d x)^{3/2}\)

\(\Big \downarrow \) 27

\(\displaystyle \frac {1}{2} c \int \frac {(2 c-d x) \sqrt {c+d x}}{x \sqrt {c-d x}}dx+\frac {1}{2} \sqrt {c-d x} (c+d x)^{3/2}\)

\(\Big \downarrow \) 171

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

\(\Big \downarrow \) 25

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

\(\Big \downarrow \) 27

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

\(\Big \downarrow \) 175

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

\(\Big \downarrow \) 45

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

\(\Big \downarrow \) 103

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

\(\Big \downarrow \) 218

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

\(\Big \downarrow \) 221

\(\displaystyle \frac {1}{2} c \left (c \left (-2 \arctan \left (\frac {\sqrt {c-d x}}{\sqrt {c+d x}}\right )-2 \text {arctanh}\left (\frac {\sqrt {c-d x} \sqrt {c+d x}}{c}\right )\right )+\sqrt {c-d x} \sqrt {c+d x}\right )+\frac {1}{2} \sqrt {c-d x} (c+d x)^{3/2}\)

Input:

Int[(Sqrt[c - d*x]*(c + d*x)^(3/2))/x,x]
 

Output:

(Sqrt[c - d*x]*(c + d*x)^(3/2))/2 + (c*(Sqrt[c - d*x]*Sqrt[c + d*x] + c*(- 
2*ArcTan[Sqrt[c - d*x]/Sqrt[c + d*x]] - 2*ArcTanh[(Sqrt[c - d*x]*Sqrt[c + 
d*x])/c])))/2
 

Defintions of rubi rules used

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

rule 27
Int[(a_)*(Fx_), x_Symbol] :> Simp[a   Int[Fx, x], x] /; FreeQ[a, x] &&  !Ma 
tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
 

rule 45
Int[1/(Sqrt[(a_) + (b_.)*(x_)]*Sqrt[(c_) + (d_.)*(x_)]), x_Symbol] :> Simp[ 
2   Subst[Int[1/(b - d*x^2), x], x, Sqrt[a + b*x]/Sqrt[c + d*x]], x] /; Fre 
eQ[{a, b, c, d}, x] && EqQ[b*c + a*d, 0] &&  !GtQ[c, 0]
 

rule 103
Int[1/(Sqrt[(a_.) + (b_.)*(x_)]*Sqrt[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_ 
))), x_] :> Simp[b*f   Subst[Int[1/(d*(b*e - a*f)^2 + b*f^2*x^2), x], x, Sq 
rt[a + b*x]*Sqrt[c + d*x]], x] /; FreeQ[{a, b, c, d, e, f}, x] && EqQ[2*b*d 
*e - f*(b*c + a*d), 0]
 

rule 112
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_), x_] :> Simp[(a + b*x)^m*(c + d*x)^n*((e + f*x)^(p + 1)/(f*(m + n + 
p + 1))), x] - Simp[1/(f*(m + n + p + 1))   Int[(a + b*x)^(m - 1)*(c + d*x) 
^(n - 1)*(e + f*x)^p*Simp[c*m*(b*e - a*f) + a*n*(d*e - c*f) + (d*m*(b*e - a 
*f) + b*n*(d*e - c*f))*x, x], x], x] /; FreeQ[{a, b, c, d, e, f, p}, x] && 
GtQ[m, 0] && GtQ[n, 0] && NeQ[m + n + p + 1, 0] && (IntegersQ[2*m, 2*n, 2*p 
] || (IntegersQ[m, n + p] || IntegersQ[p, m + n]))
 

rule 171
Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_) 
)^(p_)*((g_.) + (h_.)*(x_)), x_] :> Simp[h*(a + b*x)^m*(c + d*x)^(n + 1)*(( 
e + f*x)^(p + 1)/(d*f*(m + n + p + 2))), x] + Simp[1/(d*f*(m + n + p + 2)) 
  Int[(a + b*x)^(m - 1)*(c + d*x)^n*(e + f*x)^p*Simp[a*d*f*g*(m + n + p + 2 
) - h*(b*c*e*m + a*(d*e*(n + 1) + c*f*(p + 1))) + (b*d*f*g*(m + n + p + 2) 
+ h*(a*d*f*m - b*(d*e*(m + n + 1) + c*f*(m + p + 1))))*x, x], x], x] /; Fre 
eQ[{a, b, c, d, e, f, g, h, n, p}, x] && GtQ[m, 0] && NeQ[m + n + p + 2, 0] 
 && IntegersQ[2*m, 2*n, 2*p]
 

rule 175
Int[(((c_.) + (d_.)*(x_))^(n_)*((e_.) + (f_.)*(x_))^(p_)*((g_.) + (h_.)*(x_ 
)))/((a_.) + (b_.)*(x_)), x_] :> Simp[h/b   Int[(c + d*x)^n*(e + f*x)^p, x] 
, x] + Simp[(b*g - a*h)/b   Int[(c + d*x)^n*((e + f*x)^p/(a + b*x)), x], x] 
 /; FreeQ[{a, b, c, d, e, f, g, h, n, p}, x]
 

rule 218
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R 
t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
 

rule 221
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x 
/Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.22 (sec) , antiderivative size = 138, normalized size of antiderivative = 1.35

method result size
default \(\frac {\sqrt {-x d +c}\, \sqrt {x d +c}\, \left (\sqrt {-d^{2} x^{2}+c^{2}}\, \operatorname {csgn}\left (c \right ) \operatorname {csgn}\left (d \right ) d x +2 \sqrt {-d^{2} x^{2}+c^{2}}\, \operatorname {csgn}\left (c \right ) \operatorname {csgn}\left (d \right ) c +\operatorname {csgn}\left (c \right ) \arctan \left (\frac {\operatorname {csgn}\left (d \right ) d x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right ) c^{2}-2 \,\operatorname {csgn}\left (d \right ) \ln \left (\frac {2 c \left (\sqrt {-d^{2} x^{2}+c^{2}}\, \operatorname {csgn}\left (c \right )+c \right )}{x}\right ) c^{2}\right ) \operatorname {csgn}\left (d \right ) \operatorname {csgn}\left (c \right )}{2 \sqrt {-d^{2} x^{2}+c^{2}}}\) \(138\)

Input:

int((-d*x+c)^(1/2)*(d*x+c)^(3/2)/x,x,method=_RETURNVERBOSE)
 

Output:

1/2*(-d*x+c)^(1/2)*(d*x+c)^(1/2)*((-d^2*x^2+c^2)^(1/2)*csgn(c)*csgn(d)*d*x 
+2*(-d^2*x^2+c^2)^(1/2)*csgn(c)*csgn(d)*c+csgn(c)*arctan(csgn(d)*d*x/(-d^2 
*x^2+c^2)^(1/2))*c^2-2*csgn(d)*ln(2*c*((-d^2*x^2+c^2)^(1/2)*csgn(c)+c)/x)* 
c^2)*csgn(d)*csgn(c)/(-d^2*x^2+c^2)^(1/2)
 

Fricas [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 87, normalized size of antiderivative = 0.85 \[ \int \frac {\sqrt {c-d x} (c+d x)^{3/2}}{x} \, dx=-c^{2} \arctan \left (\frac {\sqrt {d x + c} \sqrt {-d x + c} - c}{d x}\right ) + c^{2} \log \left (\frac {\sqrt {d x + c} \sqrt {-d x + c} - c}{x}\right ) + \frac {1}{2} \, {\left (d x + 2 \, c\right )} \sqrt {d x + c} \sqrt {-d x + c} \] Input:

integrate((-d*x+c)^(1/2)*(d*x+c)^(3/2)/x,x, algorithm="fricas")
 

Output:

-c^2*arctan((sqrt(d*x + c)*sqrt(-d*x + c) - c)/(d*x)) + c^2*log((sqrt(d*x 
+ c)*sqrt(-d*x + c) - c)/x) + 1/2*(d*x + 2*c)*sqrt(d*x + c)*sqrt(-d*x + c)
 

Sympy [F]

\[ \int \frac {\sqrt {c-d x} (c+d x)^{3/2}}{x} \, dx=\int \frac {\sqrt {c - d x} \left (c + d x\right )^{\frac {3}{2}}}{x}\, dx \] Input:

integrate((-d*x+c)**(1/2)*(d*x+c)**(3/2)/x,x)
 

Output:

Integral(sqrt(c - d*x)*(c + d*x)**(3/2)/x, x)
 

Maxima [A] (verification not implemented)

Time = 0.13 (sec) , antiderivative size = 84, normalized size of antiderivative = 0.82 \[ \int \frac {\sqrt {c-d x} (c+d x)^{3/2}}{x} \, dx=\frac {1}{2} \, c^{2} \arcsin \left (\frac {d x}{c}\right ) - c^{2} \log \left (\frac {2 \, c^{2}}{{\left | x \right |}} + \frac {2 \, \sqrt {-d^{2} x^{2} + c^{2}} c}{{\left | x \right |}}\right ) + \frac {1}{2} \, \sqrt {-d^{2} x^{2} + c^{2}} d x + \sqrt {-d^{2} x^{2} + c^{2}} c \] Input:

integrate((-d*x+c)^(1/2)*(d*x+c)^(3/2)/x,x, algorithm="maxima")
 

Output:

1/2*c^2*arcsin(d*x/c) - c^2*log(2*c^2/abs(x) + 2*sqrt(-d^2*x^2 + c^2)*c/ab 
s(x)) + 1/2*sqrt(-d^2*x^2 + c^2)*d*x + sqrt(-d^2*x^2 + c^2)*c
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 232 vs. \(2 (82) = 164\).

Time = 0.37 (sec) , antiderivative size = 232, normalized size of antiderivative = 2.27 \[ \int \frac {\sqrt {c-d x} (c+d x)^{3/2}}{x} \, dx=\frac {{\left (\pi + 2 \, \arctan \left (\frac {\sqrt {d x + c} {\left (\frac {{\left (\sqrt {2} \sqrt {c} - \sqrt {-d x + c}\right )}^{2}}{d x + c} - 1\right )}}{2 \, {\left (\sqrt {2} \sqrt {c} - \sqrt {-d x + c}\right )}}\right )\right )} c^{2} d - 2 \, c^{2} d \log \left ({\left | -\frac {\sqrt {2} \sqrt {c} - \sqrt {-d x + c}}{\sqrt {d x + c}} + \frac {\sqrt {d x + c}}{\sqrt {2} \sqrt {c} - \sqrt {-d x + c}} + 2 \right |}\right ) + 2 \, c^{2} d \log \left ({\left | -\frac {\sqrt {2} \sqrt {c} - \sqrt {-d x + c}}{\sqrt {d x + c}} + \frac {\sqrt {d x + c}}{\sqrt {2} \sqrt {c} - \sqrt {-d x + c}} - 2 \right |}\right ) + {\left ({\left (d x + c\right )} d + c d\right )} \sqrt {d x + c} \sqrt {-d x + c}}{2 \, d} \] Input:

integrate((-d*x+c)^(1/2)*(d*x+c)^(3/2)/x,x, algorithm="giac")
 

Output:

1/2*((pi + 2*arctan(1/2*sqrt(d*x + c)*((sqrt(2)*sqrt(c) - sqrt(-d*x + c))^ 
2/(d*x + c) - 1)/(sqrt(2)*sqrt(c) - sqrt(-d*x + c))))*c^2*d - 2*c^2*d*log( 
abs(-(sqrt(2)*sqrt(c) - sqrt(-d*x + c))/sqrt(d*x + c) + sqrt(d*x + c)/(sqr 
t(2)*sqrt(c) - sqrt(-d*x + c)) + 2)) + 2*c^2*d*log(abs(-(sqrt(2)*sqrt(c) - 
 sqrt(-d*x + c))/sqrt(d*x + c) + sqrt(d*x + c)/(sqrt(2)*sqrt(c) - sqrt(-d* 
x + c)) - 2)) + ((d*x + c)*d + c*d)*sqrt(d*x + c)*sqrt(-d*x + c))/d
 

Mupad [F(-1)]

Timed out. \[ \int \frac {\sqrt {c-d x} (c+d x)^{3/2}}{x} \, dx=\int \frac {{\left (c+d\,x\right )}^{3/2}\,\sqrt {c-d\,x}}{x} \,d x \] Input:

int(((c + d*x)^(3/2)*(c - d*x)^(1/2))/x,x)
 

Output:

int(((c + d*x)^(3/2)*(c - d*x)^(1/2))/x, x)
 

Reduce [B] (verification not implemented)

Time = 0.18 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.74 \[ \int \frac {\sqrt {c-d x} (c+d x)^{3/2}}{x} \, dx=-\mathit {asin} \left (\frac {\sqrt {-d x +c}}{\sqrt {c}\, \sqrt {2}}\right ) c^{2}+\sqrt {d x +c}\, \sqrt {-d x +c}\, c +\frac {\sqrt {d x +c}\, \sqrt {-d x +c}\, d x}{2}-\mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +c}}{\sqrt {c}\, \sqrt {2}}\right )}{2}\right )-1\right ) c^{2}+\mathrm {log}\left (-\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +c}}{\sqrt {c}\, \sqrt {2}}\right )}{2}\right )+1\right ) c^{2}-\mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +c}}{\sqrt {c}\, \sqrt {2}}\right )}{2}\right )-1\right ) c^{2}+\mathrm {log}\left (\sqrt {2}+\tan \left (\frac {\mathit {asin} \left (\frac {\sqrt {-d x +c}}{\sqrt {c}\, \sqrt {2}}\right )}{2}\right )+1\right ) c^{2} \] Input:

int((-d*x+c)^(1/2)*(d*x+c)^(3/2)/x,x)
 

Output:

( - 2*asin(sqrt(c - d*x)/(sqrt(c)*sqrt(2)))*c**2 + 2*sqrt(c + d*x)*sqrt(c 
- d*x)*c + sqrt(c + d*x)*sqrt(c - d*x)*d*x - 2*log( - sqrt(2) + tan(asin(s 
qrt(c - d*x)/(sqrt(c)*sqrt(2)))/2) - 1)*c**2 + 2*log( - sqrt(2) + tan(asin 
(sqrt(c - d*x)/(sqrt(c)*sqrt(2)))/2) + 1)*c**2 - 2*log(sqrt(2) + tan(asin( 
sqrt(c - d*x)/(sqrt(c)*sqrt(2)))/2) - 1)*c**2 + 2*log(sqrt(2) + tan(asin(s 
qrt(c - d*x)/(sqrt(c)*sqrt(2)))/2) + 1)*c**2)/2