3.29.17 \(\int \frac {d+c x}{(-d+c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx\) [2817]

3.29.17.1 Optimal result
3.29.17.2 Mathematica [A] (verified)
3.29.17.3 Rubi [A] (verified)
3.29.17.4 Maple [F]
3.29.17.5 Fricas [B] (verification not implemented)
3.29.17.6 Sympy [F]
3.29.17.7 Maxima [F]
3.29.17.8 Giac [F]
3.29.17.9 Mupad [F(-1)]

3.29.17.1 Optimal result

Integrand size = 38, antiderivative size = 278 \[ \int \frac {d+c x}{(-d+c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\frac {2 (6 a d+3 a c x) \sqrt {b^2+a^2 x^2}+2 \left (b^2 c+6 a^2 d x+3 a^2 c x^2\right )}{3 a c \left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}+\frac {4 d \arctan \left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {-a d-\sqrt {b^2 c^2+a^2 d^2}}}\right )}{\sqrt {c} \sqrt {-a d-\sqrt {b^2 c^2+a^2 d^2}}}+\frac {4 d \arctan \left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {-a d+\sqrt {b^2 c^2+a^2 d^2}}}\right )}{\sqrt {c} \sqrt {-a d+\sqrt {b^2 c^2+a^2 d^2}}} \]

output
1/3*(2*(3*a*c*x+6*a*d)*(a^2*x^2+b^2)^(1/2)+6*a^2*c*x^2+12*a^2*d*x+2*b^2*c) 
/a/c/(a*x+(a^2*x^2+b^2)^(1/2))^(3/2)+4*d*arctan(c^(1/2)*(a*x+(a^2*x^2+b^2) 
^(1/2))^(1/2)/(-a*d-(a^2*d^2+b^2*c^2)^(1/2))^(1/2))/c^(1/2)/(-a*d-(a^2*d^2 
+b^2*c^2)^(1/2))^(1/2)+4*d*arctan(c^(1/2)*(a*x+(a^2*x^2+b^2)^(1/2))^(1/2)/ 
(-a*d+(a^2*d^2+b^2*c^2)^(1/2))^(1/2))/c^(1/2)/(-a*d+(a^2*d^2+b^2*c^2)^(1/2 
))^(1/2)
 
3.29.17.2 Mathematica [A] (verified)

Time = 0.79 (sec) , antiderivative size = 262, normalized size of antiderivative = 0.94 \[ \int \frac {d+c x}{(-d+c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\frac {2 \left (\frac {b^2 c+3 a (2 d+c x) \left (a x+\sqrt {b^2+a^2 x^2}\right )}{a \left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}+\frac {6 \sqrt {c} d \arctan \left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {-a d-\sqrt {b^2 c^2+a^2 d^2}}}\right )}{\sqrt {-a d-\sqrt {b^2 c^2+a^2 d^2}}}+\frac {6 \sqrt {c} d \arctan \left (\frac {\sqrt {c} \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{\sqrt {-a d+\sqrt {b^2 c^2+a^2 d^2}}}\right )}{\sqrt {-a d+\sqrt {b^2 c^2+a^2 d^2}}}\right )}{3 c} \]

input
Integrate[(d + c*x)/((-d + c*x)*Sqrt[a*x + Sqrt[b^2 + a^2*x^2]]),x]
 
output
(2*((b^2*c + 3*a*(2*d + c*x)*(a*x + Sqrt[b^2 + a^2*x^2]))/(a*(a*x + Sqrt[b 
^2 + a^2*x^2])^(3/2)) + (6*Sqrt[c]*d*ArcTan[(Sqrt[c]*Sqrt[a*x + Sqrt[b^2 + 
 a^2*x^2]])/Sqrt[-(a*d) - Sqrt[b^2*c^2 + a^2*d^2]]])/Sqrt[-(a*d) - Sqrt[b^ 
2*c^2 + a^2*d^2]] + (6*Sqrt[c]*d*ArcTan[(Sqrt[c]*Sqrt[a*x + Sqrt[b^2 + a^2 
*x^2]])/Sqrt[-(a*d) + Sqrt[b^2*c^2 + a^2*d^2]]])/Sqrt[-(a*d) + Sqrt[b^2*c^ 
2 + a^2*d^2]]))/(3*c)
 
3.29.17.3 Rubi [A] (verified)

Time = 1.07 (sec) , antiderivative size = 278, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.053, Rules used = {7293, 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 \frac {c x+d}{\sqrt {\sqrt {a^2 x^2+b^2}+a x} (c x-d)} \, dx\)

\(\Big \downarrow \) 7293

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

\(\Big \downarrow \) 2009

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

input
Int[(d + c*x)/((-d + c*x)*Sqrt[a*x + Sqrt[b^2 + a^2*x^2]]),x]
 
output
-1/3*b^2/(a*(a*x + Sqrt[b^2 + a^2*x^2])^(3/2)) + (4*d)/(c*Sqrt[a*x + Sqrt[ 
b^2 + a^2*x^2]]) + Sqrt[a*x + Sqrt[b^2 + a^2*x^2]]/a - (4*d*ArcTanh[(Sqrt[ 
c]*Sqrt[a*x + Sqrt[b^2 + a^2*x^2]])/Sqrt[a*d - Sqrt[b^2*c^2 + a^2*d^2]]])/ 
(Sqrt[c]*Sqrt[a*d - Sqrt[b^2*c^2 + a^2*d^2]]) - (4*d*ArcTanh[(Sqrt[c]*Sqrt 
[a*x + Sqrt[b^2 + a^2*x^2]])/Sqrt[a*d + Sqrt[b^2*c^2 + a^2*d^2]]])/(Sqrt[c 
]*Sqrt[a*d + Sqrt[b^2*c^2 + a^2*d^2]])
 

3.29.17.3.1 Defintions of rubi rules used

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

rule 7293
Int[u_, x_Symbol] :> With[{v = ExpandIntegrand[u, x]}, Int[v, x] /; SumQ[v] 
]
 
3.29.17.4 Maple [F]

\[\int \frac {c x +d}{\left (c x -d \right ) \sqrt {a x +\sqrt {a^{2} x^{2}+b^{2}}}}d x\]

input
int((c*x+d)/(c*x-d)/(a*x+(a^2*x^2+b^2)^(1/2))^(1/2),x)
 
output
int((c*x+d)/(c*x-d)/(a*x+(a^2*x^2+b^2)^(1/2))^(1/2),x)
 
3.29.17.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 781 vs. \(2 (234) = 468\).

Time = 0.29 (sec) , antiderivative size = 781, normalized size of antiderivative = 2.81 \[ \int \frac {d+c x}{(-d+c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\frac {2 \, {\left (3 \, a b^{2} c \sqrt {-\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}}{b^{2} c^{3}}} \log \left (32 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d^{3} + 32 \, {\left (b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}\right )} \sqrt {-\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}}{b^{2} c^{3}}}\right ) - 3 \, a b^{2} c \sqrt {-\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}}{b^{2} c^{3}}} \log \left (32 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d^{3} - 32 \, {\left (b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}\right )} \sqrt {-\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}}{b^{2} c^{3}}}\right ) - 3 \, a b^{2} c \sqrt {\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}}{b^{2} c^{3}}} \log \left (32 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d^{3} + 32 \, {\left (b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}\right )} \sqrt {\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}}{b^{2} c^{3}}}\right ) + 3 \, a b^{2} c \sqrt {\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}}{b^{2} c^{3}}} \log \left (32 \, \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} d^{3} - 32 \, {\left (b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} + a d^{3}\right )} \sqrt {\frac {b^{2} c^{3} \sqrt {\frac {b^{2} c^{2} d^{4} + a^{2} d^{6}}{b^{4} c^{6}}} - a d^{3}}{b^{2} c^{3}}}\right ) - {\left (a^{2} c x^{2} + 6 \, a^{2} d x - b^{2} c - \sqrt {a^{2} x^{2} + b^{2}} {\left (a c x + 6 \, a d\right )}\right )} \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}}\right )}}{3 \, a b^{2} c} \]

input
integrate((c*x+d)/(c*x-d)/(a*x+(a^2*x^2+b^2)^(1/2))^(1/2),x, algorithm="fr 
icas")
 
output
2/3*(3*a*b^2*c*sqrt(-(b^2*c^3*sqrt((b^2*c^2*d^4 + a^2*d^6)/(b^4*c^6)) + a* 
d^3)/(b^2*c^3))*log(32*sqrt(a*x + sqrt(a^2*x^2 + b^2))*d^3 + 32*(b^2*c^3*s 
qrt((b^2*c^2*d^4 + a^2*d^6)/(b^4*c^6)) - a*d^3)*sqrt(-(b^2*c^3*sqrt((b^2*c 
^2*d^4 + a^2*d^6)/(b^4*c^6)) + a*d^3)/(b^2*c^3))) - 3*a*b^2*c*sqrt(-(b^2*c 
^3*sqrt((b^2*c^2*d^4 + a^2*d^6)/(b^4*c^6)) + a*d^3)/(b^2*c^3))*log(32*sqrt 
(a*x + sqrt(a^2*x^2 + b^2))*d^3 - 32*(b^2*c^3*sqrt((b^2*c^2*d^4 + a^2*d^6) 
/(b^4*c^6)) - a*d^3)*sqrt(-(b^2*c^3*sqrt((b^2*c^2*d^4 + a^2*d^6)/(b^4*c^6) 
) + a*d^3)/(b^2*c^3))) - 3*a*b^2*c*sqrt((b^2*c^3*sqrt((b^2*c^2*d^4 + a^2*d 
^6)/(b^4*c^6)) - a*d^3)/(b^2*c^3))*log(32*sqrt(a*x + sqrt(a^2*x^2 + b^2))* 
d^3 + 32*(b^2*c^3*sqrt((b^2*c^2*d^4 + a^2*d^6)/(b^4*c^6)) + a*d^3)*sqrt((b 
^2*c^3*sqrt((b^2*c^2*d^4 + a^2*d^6)/(b^4*c^6)) - a*d^3)/(b^2*c^3))) + 3*a* 
b^2*c*sqrt((b^2*c^3*sqrt((b^2*c^2*d^4 + a^2*d^6)/(b^4*c^6)) - a*d^3)/(b^2* 
c^3))*log(32*sqrt(a*x + sqrt(a^2*x^2 + b^2))*d^3 - 32*(b^2*c^3*sqrt((b^2*c 
^2*d^4 + a^2*d^6)/(b^4*c^6)) + a*d^3)*sqrt((b^2*c^3*sqrt((b^2*c^2*d^4 + a^ 
2*d^6)/(b^4*c^6)) - a*d^3)/(b^2*c^3))) - (a^2*c*x^2 + 6*a^2*d*x - b^2*c - 
sqrt(a^2*x^2 + b^2)*(a*c*x + 6*a*d))*sqrt(a*x + sqrt(a^2*x^2 + b^2)))/(a*b 
^2*c)
 
3.29.17.6 Sympy [F]

\[ \int \frac {d+c x}{(-d+c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\int \frac {c x + d}{\sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} \left (c x - d\right )}\, dx \]

input
integrate((c*x+d)/(c*x-d)/(a*x+(a**2*x**2+b**2)**(1/2))**(1/2),x)
 
output
Integral((c*x + d)/(sqrt(a*x + sqrt(a**2*x**2 + b**2))*(c*x - d)), x)
 
3.29.17.7 Maxima [F]

\[ \int \frac {d+c x}{(-d+c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\int { \frac {c x + d}{\sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} {\left (c x - d\right )}} \,d x } \]

input
integrate((c*x+d)/(c*x-d)/(a*x+(a^2*x^2+b^2)^(1/2))^(1/2),x, algorithm="ma 
xima")
 
output
integrate((c*x + d)/(sqrt(a*x + sqrt(a^2*x^2 + b^2))*(c*x - d)), x)
 
3.29.17.8 Giac [F]

\[ \int \frac {d+c x}{(-d+c x) \sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\int { \frac {c x + d}{\sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}} {\left (c x - d\right )}} \,d x } \]

input
integrate((c*x+d)/(c*x-d)/(a*x+(a^2*x^2+b^2)^(1/2))^(1/2),x, algorithm="gi 
ac")
 
output
integrate((c*x + d)/(sqrt(a*x + sqrt(a^2*x^2 + b^2))*(c*x - d)), x)
 
3.29.17.9 Mupad [F(-1)]

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

input
int(-(d + c*x)/((a*x + (b^2 + a^2*x^2)^(1/2))^(1/2)*(d - c*x)),x)
 
output
int(-(d + c*x)/((a*x + (b^2 + a^2*x^2)^(1/2))^(1/2)*(d - c*x)), x)