### 3.589 $$\int \frac{(a+b x)^2}{\sqrt{1+x^2}} \, dx$$

Optimal. Leaf size=52 $\frac{1}{2} \left (2 a^2-b^2\right ) \sinh ^{-1}(x)+\frac{3}{2} a b \sqrt{x^2+1}+\frac{1}{2} b \sqrt{x^2+1} (a+b x)$

[Out]

(3*a*b*Sqrt[1 + x^2])/2 + (b*(a + b*x)*Sqrt[1 + x^2])/2 + ((2*a^2 - b^2)*ArcSinh[x])/2

________________________________________________________________________________________

Rubi [A]  time = 0.0203178, antiderivative size = 52, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 17, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.176, Rules used = {743, 641, 215} $\frac{1}{2} \left (2 a^2-b^2\right ) \sinh ^{-1}(x)+\frac{3}{2} a b \sqrt{x^2+1}+\frac{1}{2} b \sqrt{x^2+1} (a+b x)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(3*a*b*Sqrt[1 + x^2])/2 + (b*(a + b*x)*Sqrt[1 + x^2])/2 + ((2*a^2 - b^2)*ArcSinh[x])/2

Rule 743

Int[((d_) + (e_.)*(x_))^(m_)*((a_) + (c_.)*(x_)^2)^(p_), x_Symbol] :> Simp[(e*(d + e*x)^(m - 1)*(a + c*x^2)^(p
+ 1))/(c*(m + 2*p + 1)), x] + Dist[1/(c*(m + 2*p + 1)), Int[(d + e*x)^(m - 2)*Simp[c*d^2*(m + 2*p + 1) - a*e^
2*(m - 1) + 2*c*d*e*(m + p)*x, x]*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, m, p}, x] && NeQ[c*d^2 + a*e^2,
0] && If[RationalQ[m], GtQ[m, 1], SumSimplerQ[m, -2]] && NeQ[m + 2*p + 1, 0] && IntQuadraticQ[a, 0, c, d, e, m
, p, x]

Rule 641

Int[((d_) + (e_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[(e*(a + c*x^2)^(p + 1))/(2*c*(p + 1)),
x] + Dist[d, Int[(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, p}, x] && NeQ[p, -1]

Rule 215

Int[1/Sqrt[(a_) + (b_.)*(x_)^2], x_Symbol] :> Simp[ArcSinh[(Rt[b, 2]*x)/Sqrt[a]]/Rt[b, 2], x] /; FreeQ[{a, b},
x] && GtQ[a, 0] && PosQ[b]

Rubi steps

\begin{align*} \int \frac{(a+b x)^2}{\sqrt{1+x^2}} \, dx &=\frac{1}{2} b (a+b x) \sqrt{1+x^2}+\frac{1}{2} \int \frac{2 a^2-b^2+3 a b x}{\sqrt{1+x^2}} \, dx\\ &=\frac{3}{2} a b \sqrt{1+x^2}+\frac{1}{2} b (a+b x) \sqrt{1+x^2}+\frac{1}{2} \left (2 a^2-b^2\right ) \int \frac{1}{\sqrt{1+x^2}} \, dx\\ &=\frac{3}{2} a b \sqrt{1+x^2}+\frac{1}{2} b (a+b x) \sqrt{1+x^2}+\frac{1}{2} \left (2 a^2-b^2\right ) \sinh ^{-1}(x)\\ \end{align*}

Mathematica [A]  time = 0.0259011, size = 36, normalized size = 0.69 $\left (a^2-\frac{b^2}{2}\right ) \sinh ^{-1}(x)+\frac{1}{2} b \sqrt{x^2+1} (4 a+b x)$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(b*(4*a + b*x)*Sqrt[1 + x^2])/2 + (a^2 - b^2/2)*ArcSinh[x]

________________________________________________________________________________________

Maple [A]  time = 0.045, size = 38, normalized size = 0.7 \begin{align*}{b}^{2} \left ({\frac{x}{2}\sqrt{{x}^{2}+1}}-{\frac{{\it Arcsinh} \left ( x \right ) }{2}} \right ) +2\,ab\sqrt{{x}^{2}+1}+{a}^{2}{\it Arcsinh} \left ( x \right ) \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

b^2*(1/2*x*(x^2+1)^(1/2)-1/2*arcsinh(x))+2*a*b*(x^2+1)^(1/2)+a^2*arcsinh(x)

________________________________________________________________________________________

Maxima [A]  time = 1.6898, size = 51, normalized size = 0.98 \begin{align*} \frac{1}{2} \, \sqrt{x^{2} + 1} b^{2} x + a^{2} \operatorname{arsinh}\left (x\right ) - \frac{1}{2} \, b^{2} \operatorname{arsinh}\left (x\right ) + 2 \, \sqrt{x^{2} + 1} a b \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

1/2*sqrt(x^2 + 1)*b^2*x + a^2*arcsinh(x) - 1/2*b^2*arcsinh(x) + 2*sqrt(x^2 + 1)*a*b

________________________________________________________________________________________

Fricas [A]  time = 1.81245, size = 108, normalized size = 2.08 \begin{align*} -\frac{1}{2} \,{\left (2 \, a^{2} - b^{2}\right )} \log \left (-x + \sqrt{x^{2} + 1}\right ) + \frac{1}{2} \,{\left (b^{2} x + 4 \, a b\right )} \sqrt{x^{2} + 1} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(2*a^2 - b^2)*log(-x + sqrt(x^2 + 1)) + 1/2*(b^2*x + 4*a*b)*sqrt(x^2 + 1)

________________________________________________________________________________________

Sympy [A]  time = 0.251236, size = 42, normalized size = 0.81 \begin{align*} a^{2} \operatorname{asinh}{\left (x \right )} + 2 a b \sqrt{x^{2} + 1} + \frac{b^{2} x \sqrt{x^{2} + 1}}{2} - \frac{b^{2} \operatorname{asinh}{\left (x \right )}}{2} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

a**2*asinh(x) + 2*a*b*sqrt(x**2 + 1) + b**2*x*sqrt(x**2 + 1)/2 - b**2*asinh(x)/2

________________________________________________________________________________________

Giac [A]  time = 1.50868, size = 61, normalized size = 1.17 \begin{align*} -\frac{1}{2} \,{\left (2 \, a^{2} - b^{2}\right )} \log \left (-x + \sqrt{x^{2} + 1}\right ) + \frac{1}{2} \,{\left (b^{2} x + 4 \, a b\right )} \sqrt{x^{2} + 1} \end{align*}

Veriﬁcation of antiderivative is not currently implemented for this CAS.

[In]

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

[Out]

-1/2*(2*a^2 - b^2)*log(-x + sqrt(x^2 + 1)) + 1/2*(b^2*x + 4*a*b)*sqrt(x^2 + 1)