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

Optimal. Leaf size=41 \[ a^2 x+\frac {4 a b (c+d x)^{3/2}}{3 d}+\frac {b^2 (c+d x)^2}{2 d} \]

[Out]

a^2*x+4/3*a*b*(d*x+c)^(3/2)/d+1/2*b^2*(d*x+c)^2/d

________________________________________________________________________________________

Rubi [A]
time = 0.02, antiderivative size = 41, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, integrand size = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {253, 196, 45} \begin {gather*} a^2 x+\frac {4 a b (c+d x)^{3/2}}{3 d}+\frac {b^2 (c+d x)^2}{2 d} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

a^2*x + (4*a*b*(c + d*x)^(3/2))/(3*d) + (b^2*(c + d*x)^2)/(2*d)

Rule 45

Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int[ExpandIntegrand[(a + b*x)^m*(c + d
*x)^n, x], x] /; FreeQ[{a, b, c, d, n}, x] && NeQ[b*c - a*d, 0] && IGtQ[m, 0] && ( !IntegerQ[n] || (EqQ[c, 0]
&& LeQ[7*m + 4*n + 4, 0]) || LtQ[9*m + 5*(n + 1), 0] || GtQ[m + n + 2, 0])

Rule 196

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(1/n - 1)*(a + b*x)^p, x], x, x^n], x] /
; FreeQ[{a, b, p}, x] && FractionQ[n] && IntegerQ[1/n]

Rule 253

Int[((a_.) + (b_.)*(v_)^(n_))^(p_), x_Symbol] :> Dist[1/Coefficient[v, x, 1], Subst[Int[(a + b*x^n)^p, x], x,
v], x] /; FreeQ[{a, b, n, p}, x] && LinearQ[v, x] && NeQ[v, x]

Rubi steps

\begin {align*} \int \left (a+b \sqrt {c+d x}\right )^2 \, dx &=\frac {\text {Subst}\left (\int \left (a+b \sqrt {x}\right )^2 \, dx,x,c+d x\right )}{d}\\ &=\frac {2 \text {Subst}\left (\int x (a+b x)^2 \, dx,x,\sqrt {c+d x}\right )}{d}\\ &=\frac {2 \text {Subst}\left (\int \left (a^2 x+2 a b x^2+b^2 x^3\right ) \, dx,x,\sqrt {c+d x}\right )}{d}\\ &=a^2 x+\frac {4 a b (c+d x)^{3/2}}{3 d}+\frac {b^2 (c+d x)^2}{2 d}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.02, size = 41, normalized size = 1.00 \begin {gather*} \frac {(c+d x) \left (6 a^2+8 a b \sqrt {c+d x}+3 b^2 (c+d x)\right )}{6 d} \end {gather*}

Antiderivative was successfully verified.

[In]

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

[Out]

((c + d*x)*(6*a^2 + 8*a*b*Sqrt[c + d*x] + 3*b^2*(c + d*x)))/(6*d)

________________________________________________________________________________________

Maple [A]
time = 0.26, size = 35, normalized size = 0.85

method result size
default \(b^{2} \left (c x +\frac {1}{2} d \,x^{2}\right )+\frac {4 a b \left (d x +c \right )^{\frac {3}{2}}}{3 d}+a^{2} x\) \(35\)
trager \(\frac {\left (b^{2} d x +2 b^{2} c +2 a^{2}\right ) x}{2}+\frac {4 a b \left (d x +c \right )^{\frac {3}{2}}}{3 d}\) \(37\)
derivativedivides \(\frac {\frac {b^{2} \left (d x +c \right )^{2}}{2}+\frac {4 a b \left (d x +c \right )^{\frac {3}{2}}}{3}+a^{2} \left (d x +c \right )}{d}\) \(40\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b^2*(c*x+1/2*d*x^2)+4/3*a*b*(d*x+c)^(3/2)/d+a^2*x

________________________________________________________________________________________

Maxima [A]
time = 0.28, size = 35, normalized size = 0.85 \begin {gather*} \frac {1}{2} \, {\left (d x^{2} + 2 \, c x\right )} b^{2} + a^{2} x + \frac {4 \, {\left (d x + c\right )}^{\frac {3}{2}} a b}{3 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*(d*x^2 + 2*c*x)*b^2 + a^2*x + 4/3*(d*x + c)^(3/2)*a*b/d

________________________________________________________________________________________

Fricas [A]
time = 0.37, size = 49, normalized size = 1.20 \begin {gather*} \frac {3 \, b^{2} d^{2} x^{2} + 6 \, {\left (b^{2} c + a^{2}\right )} d x + 8 \, {\left (a b d x + a b c\right )} \sqrt {d x + c}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/6*(3*b^2*d^2*x^2 + 6*(b^2*c + a^2)*d*x + 8*(a*b*d*x + a*b*c)*sqrt(d*x + c))/d

________________________________________________________________________________________

Sympy [A]
time = 0.07, size = 68, normalized size = 1.66 \begin {gather*} \begin {cases} a^{2} x + \frac {4 a b c \sqrt {c + d x}}{3 d} + \frac {4 a b x \sqrt {c + d x}}{3} + b^{2} c x + \frac {b^{2} d x^{2}}{2} & \text {for}\: d \neq 0 \\x \left (a + b \sqrt {c}\right )^{2} & \text {otherwise} \end {cases} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

Piecewise((a**2*x + 4*a*b*c*sqrt(c + d*x)/(3*d) + 4*a*b*x*sqrt(c + d*x)/3 + b**2*c*x + b**2*d*x**2/2, Ne(d, 0)
), (x*(a + b*sqrt(c))**2, True))

________________________________________________________________________________________

Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 82 vs. \(2 (35) = 70\).
time = 4.09, size = 82, normalized size = 2.00 \begin {gather*} \frac {6 \, {\left (d x + c\right )} b^{2} c + 24 \, \sqrt {d x + c} a b c + 6 \, {\left (d x + c\right )} a^{2} + 8 \, {\left ({\left (d x + c\right )}^{\frac {3}{2}} - 3 \, \sqrt {d x + c} c\right )} a b + 3 \, {\left ({\left (d x + c\right )}^{2} - 2 \, {\left (d x + c\right )} c\right )} b^{2}}{6 \, d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/6*(6*(d*x + c)*b^2*c + 24*sqrt(d*x + c)*a*b*c + 6*(d*x + c)*a^2 + 8*((d*x + c)^(3/2) - 3*sqrt(d*x + c)*c)*a*
b + 3*((d*x + c)^2 - 2*(d*x + c)*c)*b^2)/d

________________________________________________________________________________________

Mupad [B]
time = 0.05, size = 36, normalized size = 0.88 \begin {gather*} \frac {3\,b^2\,{\left (c+d\,x\right )}^2+8\,a\,b\,{\left (c+d\,x\right )}^{3/2}+6\,a^2\,d\,x}{6\,d} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

(3*b^2*(c + d*x)^2 + 8*a*b*(c + d*x)^(3/2) + 6*a^2*d*x)/(6*d)

________________________________________________________________________________________