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

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

Optimal result

Integrand size = 31, antiderivative size = 282 \[ \int \frac {(d+c x)^2}{\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\frac {2 \sqrt {b^2+a^2 x^2} \left (4 b^4 c d-4 b^4 c^2 x+25 a^2 b^2 d^2 x+30 a^2 b^2 c d x^2-3 a^2 b^2 c^2 x^3+60 a^4 d^2 x^3+40 a^4 c d x^4+12 a^4 c^2 x^5\right )}{15 a^2 \left (a x+\sqrt {b^2+a^2 x^2}\right )^{7/2}}+\frac {2 \left (-8 b^6 c^2+35 a^2 b^4 d^2+98 a^2 b^4 c d x-49 a^2 b^4 c^2 x^2+385 a^4 b^2 d^2 x^2+350 a^4 b^2 c d x^3+21 a^4 b^2 c^2 x^4+420 a^6 d^2 x^4+280 a^6 c d x^5+84 a^6 c^2 x^6\right )}{105 a^3 \left (a x+\sqrt {b^2+a^2 x^2}\right )^{7/2}} \]

[Out]

2/15*(a^2*x^2+b^2)^(1/2)*(12*a^4*c^2*x^5+40*a^4*c*d*x^4+60*a^4*d^2*x^3-3*a^2*b^2*c^2*x^3+30*a^2*b^2*c*d*x^2+25
*a^2*b^2*d^2*x-4*b^4*c^2*x+4*b^4*c*d)/a^2/(a*x+(a^2*x^2+b^2)^(1/2))^(7/2)+2/105*(84*a^6*c^2*x^6+280*a^6*c*d*x^
5+420*a^6*d^2*x^4+21*a^4*b^2*c^2*x^4+350*a^4*b^2*c*d*x^3+385*a^4*b^2*d^2*x^2-49*a^2*b^4*c^2*x^2+98*a^2*b^4*c*d
*x+35*a^2*b^4*d^2-8*b^6*c^2)/a^3/(a*x+(a^2*x^2+b^2)^(1/2))^(7/2)

Rubi [A] (verified)

Time = 0.22 (sec) , antiderivative size = 232, normalized size of antiderivative = 0.82, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.065, Rules used = {2144, 1642} \[ \int \frac {(d+c x)^2}{\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\frac {c d \left (\sqrt {a^2 x^2+b^2}+a x\right )^{3/2}}{3 a^2}+\frac {b^4 c d}{5 a^2 \left (\sqrt {a^2 x^2+b^2}+a x\right )^{5/2}}+\frac {b^2 \left (b^2 c^2-4 a^2 d^2\right )}{12 a^3 \left (\sqrt {a^2 x^2+b^2}+a x\right )^{3/2}}-\frac {\sqrt {\sqrt {a^2 x^2+b^2}+a x} \left (b^2 c^2-4 a^2 d^2\right )}{4 a^3}+\frac {c^2 \left (\sqrt {a^2 x^2+b^2}+a x\right )^{5/2}}{20 a^3}-\frac {b^6 c^2}{28 a^3 \left (\sqrt {a^2 x^2+b^2}+a x\right )^{7/2}} \]

[In]

Int[(d + c*x)^2/Sqrt[a*x + Sqrt[b^2 + a^2*x^2]],x]

[Out]

-1/28*(b^6*c^2)/(a^3*(a*x + Sqrt[b^2 + a^2*x^2])^(7/2)) + (b^4*c*d)/(5*a^2*(a*x + Sqrt[b^2 + a^2*x^2])^(5/2))
+ (b^2*(b^2*c^2 - 4*a^2*d^2))/(12*a^3*(a*x + Sqrt[b^2 + a^2*x^2])^(3/2)) - ((b^2*c^2 - 4*a^2*d^2)*Sqrt[a*x + S
qrt[b^2 + a^2*x^2]])/(4*a^3) + (c*d*(a*x + Sqrt[b^2 + a^2*x^2])^(3/2))/(3*a^2) + (c^2*(a*x + Sqrt[b^2 + a^2*x^
2])^(5/2))/(20*a^3)

Rule 1642

Int[(Pq_)*((d_.) + (e_.)*(x_))^(m_.)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegra
nd[(d + e*x)^m*Pq*(a + b*x + c*x^2)^p, x], x] /; FreeQ[{a, b, c, d, e, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 2144

Int[((g_.) + (h_.)*(x_))^(m_.)*((e_.)*(x_) + (f_.)*Sqrt[(a_.) + (c_.)*(x_)^2])^(n_.), x_Symbol] :> Dist[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] && IntegerQ[m]

Rubi steps \begin{align*} \text {integral}& = \frac {\text {Subst}\left (\int \frac {\left (b^2+x^2\right ) \left (-b^2 c+2 a d x+c x^2\right )^2}{x^{9/2}} \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{8 a^3} \\ & = \frac {\text {Subst}\left (\int \left (\frac {b^6 c^2}{x^{9/2}}-\frac {4 a b^4 c d}{x^{7/2}}-\frac {b^2 \left (b^2 c^2-4 a^2 d^2\right )}{x^{5/2}}+\frac {-b^2 c^2+4 a^2 d^2}{\sqrt {x}}+4 a c d \sqrt {x}+c^2 x^{3/2}\right ) \, dx,x,a x+\sqrt {b^2+a^2 x^2}\right )}{8 a^3} \\ & = -\frac {b^6 c^2}{28 a^3 \left (a x+\sqrt {b^2+a^2 x^2}\right )^{7/2}}+\frac {b^4 c d}{5 a^2 \left (a x+\sqrt {b^2+a^2 x^2}\right )^{5/2}}+\frac {b^2 \left (b^2 c^2-4 a^2 d^2\right )}{12 a^3 \left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}-\frac {\left (b^2 c^2-4 a^2 d^2\right ) \sqrt {a x+\sqrt {b^2+a^2 x^2}}}{4 a^3}+\frac {c d \left (a x+\sqrt {b^2+a^2 x^2}\right )^{3/2}}{3 a^2}+\frac {c^2 \left (a x+\sqrt {b^2+a^2 x^2}\right )^{5/2}}{20 a^3} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.30 (sec) , antiderivative size = 204, normalized size of antiderivative = 0.72 \[ \int \frac {(d+c x)^2}{\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=\frac {2 \left (-8 b^6 c^2+28 a^5 x^3 \left (15 d^2+10 c d x+3 c^2 x^2\right ) \left (a x+\sqrt {b^2+a^2 x^2}\right )+7 a b^4 \left (4 c (d-c x) \sqrt {b^2+a^2 x^2}+a \left (5 d^2+14 c d x-7 c^2 x^2\right )\right )+7 a^3 b^2 x \left (\sqrt {b^2+a^2 x^2} \left (25 d^2+30 c d x-3 c^2 x^2\right )+a x \left (55 d^2+50 c d x+3 c^2 x^2\right )\right )\right )}{105 a^3 \left (a x+\sqrt {b^2+a^2 x^2}\right )^{7/2}} \]

[In]

Integrate[(d + c*x)^2/Sqrt[a*x + Sqrt[b^2 + a^2*x^2]],x]

[Out]

(2*(-8*b^6*c^2 + 28*a^5*x^3*(15*d^2 + 10*c*d*x + 3*c^2*x^2)*(a*x + Sqrt[b^2 + a^2*x^2]) + 7*a*b^4*(4*c*(d - c*
x)*Sqrt[b^2 + a^2*x^2] + a*(5*d^2 + 14*c*d*x - 7*c^2*x^2)) + 7*a^3*b^2*x*(Sqrt[b^2 + a^2*x^2]*(25*d^2 + 30*c*d
*x - 3*c^2*x^2) + a*x*(55*d^2 + 50*c*d*x + 3*c^2*x^2))))/(105*a^3*(a*x + Sqrt[b^2 + a^2*x^2])^(7/2))

Maple [F]

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

[In]

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

[Out]

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

Fricas [A] (verification not implemented)

none

Time = 0.32 (sec) , antiderivative size = 167, normalized size of antiderivative = 0.59 \[ \int \frac {(d+c x)^2}{\sqrt {a x+\sqrt {b^2+a^2 x^2}}} \, dx=-\frac {2 \, {\left (15 \, a^{4} c^{2} x^{4} + 42 \, a^{4} c d x^{3} + 14 \, a^{2} b^{2} c d x + 8 \, b^{4} c^{2} - 35 \, a^{2} b^{2} d^{2} + {\left (a^{2} b^{2} c^{2} + 35 \, a^{4} d^{2}\right )} x^{2} - {\left (15 \, a^{3} c^{2} x^{3} + 42 \, a^{3} c d x^{2} + 28 \, a b^{2} c d + {\left (4 \, a b^{2} c^{2} + 35 \, a^{3} d^{2}\right )} x\right )} \sqrt {a^{2} x^{2} + b^{2}}\right )} \sqrt {a x + \sqrt {a^{2} x^{2} + b^{2}}}}{105 \, a^{3} b^{2}} \]

[In]

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

[Out]

-2/105*(15*a^4*c^2*x^4 + 42*a^4*c*d*x^3 + 14*a^2*b^2*c*d*x + 8*b^4*c^2 - 35*a^2*b^2*d^2 + (a^2*b^2*c^2 + 35*a^
4*d^2)*x^2 - (15*a^3*c^2*x^3 + 42*a^3*c*d*x^2 + 28*a*b^2*c*d + (4*a*b^2*c^2 + 35*a^3*d^2)*x)*sqrt(a^2*x^2 + b^
2))*sqrt(a*x + sqrt(a^2*x^2 + b^2))/(a^3*b^2)

Sympy [F]

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

[In]

integrate((c*x+d)**2/(a*x+(a**2*x**2+b**2)**(1/2))**(1/2),x)

[Out]

Integral((c*x + d)**2/sqrt(a*x + sqrt(a**2*x**2 + b**2)), x)

Maxima [F]

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

[In]

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

[Out]

integrate((c*x + d)^2/sqrt(a*x + sqrt(a^2*x^2 + b^2)), x)

Giac [F]

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

[In]

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

[Out]

integrate((c*x + d)^2/sqrt(a*x + sqrt(a^2*x^2 + b^2)), x)

Mupad [F(-1)]

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

[In]

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

[Out]

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