3.817 $$\int (a+b x)^2 \sqrt{-\frac{a^2 c}{b^2}+c x^2} \, dx$$

Optimal. Leaf size=130 $\frac{5}{8} a^2 x \sqrt{c x^2-\frac{a^2 c}{b^2}}+\frac{5 a b \left (c x^2-\frac{a^2 c}{b^2}\right )^{3/2}}{12 c}+\frac{b (a+b x) \left (c x^2-\frac{a^2 c}{b^2}\right )^{3/2}}{4 c}-\frac{5 a^4 \sqrt{c} \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{c x^2-\frac{a^2 c}{b^2}}}\right )}{8 b^2}$

[Out]

(5*a^2*x*Sqrt[-((a^2*c)/b^2) + c*x^2])/8 + (5*a*b*(-((a^2*c)/b^2) + c*x^2)^(3/2))/(12*c) + (b*(a + b*x)*(-((a^
2*c)/b^2) + c*x^2)^(3/2))/(4*c) - (5*a^4*Sqrt[c]*ArcTanh[(Sqrt[c]*x)/Sqrt[-((a^2*c)/b^2) + c*x^2]])/(8*b^2)

________________________________________________________________________________________

Rubi [A]  time = 0.0531535, antiderivative size = 130, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 5, integrand size = 27, $$\frac{\text{number of rules}}{\text{integrand size}}$$ = 0.185, Rules used = {671, 641, 195, 217, 206} $\frac{5}{8} a^2 x \sqrt{c x^2-\frac{a^2 c}{b^2}}+\frac{5 a b \left (c x^2-\frac{a^2 c}{b^2}\right )^{3/2}}{12 c}+\frac{b (a+b x) \left (c x^2-\frac{a^2 c}{b^2}\right )^{3/2}}{4 c}-\frac{5 a^4 \sqrt{c} \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{c x^2-\frac{a^2 c}{b^2}}}\right )}{8 b^2}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(5*a^2*x*Sqrt[-((a^2*c)/b^2) + c*x^2])/8 + (5*a*b*(-((a^2*c)/b^2) + c*x^2)^(3/2))/(12*c) + (b*(a + b*x)*(-((a^
2*c)/b^2) + c*x^2)^(3/2))/(4*c) - (5*a^4*Sqrt[c]*ArcTanh[(Sqrt[c]*x)/Sqrt[-((a^2*c)/b^2) + c*x^2]])/(8*b^2)

Rule 671

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[(2*c*d*(m + p))/(c*(m + 2*p + 1)), Int[(d + e*x)^(m - 1)*(a + c*x^2)^p, x]
, x] /; FreeQ[{a, c, d, e, p}, x] && EqQ[c*d^2 + a*e^2, 0] && GtQ[m, 1] && NeQ[m + 2*p + 1, 0] && IntegerQ[2*p
]

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 195

Int[((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Simp[(x*(a + b*x^n)^p)/(n*p + 1), x] + Dist[(a*n*p)/(n*p + 1),
Int[(a + b*x^n)^(p - 1), x], x] /; FreeQ[{a, b}, x] && IGtQ[n, 0] && GtQ[p, 0] && (IntegerQ[2*p] || (EqQ[n, 2
] && IntegerQ[4*p]) || (EqQ[n, 2] && IntegerQ[3*p]) || LtQ[Denominator[p + 1/n], Denominator[p]])

Rule 217

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

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
/; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rubi steps

\begin{align*} \int (a+b x)^2 \sqrt{-\frac{a^2 c}{b^2}+c x^2} \, dx &=\frac{b (a+b x) \left (-\frac{a^2 c}{b^2}+c x^2\right )^{3/2}}{4 c}+\frac{1}{4} (5 a) \int (a+b x) \sqrt{-\frac{a^2 c}{b^2}+c x^2} \, dx\\ &=\frac{5 a b \left (-\frac{a^2 c}{b^2}+c x^2\right )^{3/2}}{12 c}+\frac{b (a+b x) \left (-\frac{a^2 c}{b^2}+c x^2\right )^{3/2}}{4 c}+\frac{1}{4} \left (5 a^2\right ) \int \sqrt{-\frac{a^2 c}{b^2}+c x^2} \, dx\\ &=\frac{5}{8} a^2 x \sqrt{-\frac{a^2 c}{b^2}+c x^2}+\frac{5 a b \left (-\frac{a^2 c}{b^2}+c x^2\right )^{3/2}}{12 c}+\frac{b (a+b x) \left (-\frac{a^2 c}{b^2}+c x^2\right )^{3/2}}{4 c}-\frac{\left (5 a^4 c\right ) \int \frac{1}{\sqrt{-\frac{a^2 c}{b^2}+c x^2}} \, dx}{8 b^2}\\ &=\frac{5}{8} a^2 x \sqrt{-\frac{a^2 c}{b^2}+c x^2}+\frac{5 a b \left (-\frac{a^2 c}{b^2}+c x^2\right )^{3/2}}{12 c}+\frac{b (a+b x) \left (-\frac{a^2 c}{b^2}+c x^2\right )^{3/2}}{4 c}-\frac{\left (5 a^4 c\right ) \operatorname{Subst}\left (\int \frac{1}{1-c x^2} \, dx,x,\frac{x}{\sqrt{-\frac{a^2 c}{b^2}+c x^2}}\right )}{8 b^2}\\ &=\frac{5}{8} a^2 x \sqrt{-\frac{a^2 c}{b^2}+c x^2}+\frac{5 a b \left (-\frac{a^2 c}{b^2}+c x^2\right )^{3/2}}{12 c}+\frac{b (a+b x) \left (-\frac{a^2 c}{b^2}+c x^2\right )^{3/2}}{4 c}-\frac{5 a^4 \sqrt{c} \tanh ^{-1}\left (\frac{\sqrt{c} x}{\sqrt{-\frac{a^2 c}{b^2}+c x^2}}\right )}{8 b^2}\\ \end{align*}

Mathematica [A]  time = 0.150186, size = 103, normalized size = 0.79 $\frac{\sqrt{c \left (x^2-\frac{a^2}{b^2}\right )} \left (\sqrt{1-\frac{b^2 x^2}{a^2}} \left (9 a^2 b x-16 a^3+16 a b^2 x^2+6 b^3 x^3\right )+15 a^3 \sin ^{-1}\left (\frac{b x}{a}\right )\right )}{24 b \sqrt{1-\frac{b^2 x^2}{a^2}}}$

Antiderivative was successfully veriﬁed.

[In]

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

[Out]

(Sqrt[c*(-(a^2/b^2) + x^2)]*(Sqrt[1 - (b^2*x^2)/a^2]*(-16*a^3 + 9*a^2*b*x + 16*a*b^2*x^2 + 6*b^3*x^3) + 15*a^3
*ArcSin[(b*x)/a]))/(24*b*Sqrt[1 - (b^2*x^2)/a^2])

________________________________________________________________________________________

Maple [A]  time = 0.264, size = 113, normalized size = 0.9 \begin{align*}{\frac{{b}^{2}x}{4\,c} \left ( -{\frac{{a}^{2}c}{{b}^{2}}}+c{x}^{2} \right ) ^{{\frac{3}{2}}}}+{\frac{5\,{a}^{2}x}{8}\sqrt{-{\frac{{a}^{2}c}{{b}^{2}}}+c{x}^{2}}}-{\frac{5\,{a}^{4}}{8\,{b}^{2}}\sqrt{c}\ln \left ( x\sqrt{c}+\sqrt{-{\frac{{a}^{2}c}{{b}^{2}}}+c{x}^{2}} \right ) }+{\frac{2\,ab}{3\,c} \left ({\frac{c \left ({b}^{2}{x}^{2}-{a}^{2} \right ) }{{b}^{2}}} \right ) ^{{\frac{3}{2}}}} \end{align*}

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

[In]

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

[Out]

1/4*b^2*x*(-a^2*c/b^2+c*x^2)^(3/2)/c+5/8*a^2*x*(-a^2*c/b^2+c*x^2)^(1/2)-5/8/b^2*a^4*c^(1/2)*ln(x*c^(1/2)+(-a^2
*c/b^2+c*x^2)^(1/2))+2/3*a*b/c*(c*(b^2*x^2-a^2)/b^2)^(3/2)

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

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

[In]

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

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 2.2209, size = 506, normalized size = 3.89 \begin{align*} \left [\frac{15 \, a^{4} \sqrt{c} \log \left (2 \, b^{2} c x^{2} - 2 \, b^{2} \sqrt{c} x \sqrt{\frac{b^{2} c x^{2} - a^{2} c}{b^{2}}} - a^{2} c\right ) + 2 \,{\left (6 \, b^{4} x^{3} + 16 \, a b^{3} x^{2} + 9 \, a^{2} b^{2} x - 16 \, a^{3} b\right )} \sqrt{\frac{b^{2} c x^{2} - a^{2} c}{b^{2}}}}{48 \, b^{2}}, \frac{15 \, a^{4} \sqrt{-c} \arctan \left (\frac{b^{2} \sqrt{-c} x \sqrt{\frac{b^{2} c x^{2} - a^{2} c}{b^{2}}}}{b^{2} c x^{2} - a^{2} c}\right ) +{\left (6 \, b^{4} x^{3} + 16 \, a b^{3} x^{2} + 9 \, a^{2} b^{2} x - 16 \, a^{3} b\right )} \sqrt{\frac{b^{2} c x^{2} - a^{2} c}{b^{2}}}}{24 \, b^{2}}\right ] \end{align*}

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

[In]

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

[Out]

[1/48*(15*a^4*sqrt(c)*log(2*b^2*c*x^2 - 2*b^2*sqrt(c)*x*sqrt((b^2*c*x^2 - a^2*c)/b^2) - a^2*c) + 2*(6*b^4*x^3
+ 16*a*b^3*x^2 + 9*a^2*b^2*x - 16*a^3*b)*sqrt((b^2*c*x^2 - a^2*c)/b^2))/b^2, 1/24*(15*a^4*sqrt(-c)*arctan(b^2*
sqrt(-c)*x*sqrt((b^2*c*x^2 - a^2*c)/b^2)/(b^2*c*x^2 - a^2*c)) + (6*b^4*x^3 + 16*a*b^3*x^2 + 9*a^2*b^2*x - 16*a
^3*b)*sqrt((b^2*c*x^2 - a^2*c)/b^2))/b^2]

________________________________________________________________________________________

Sympy [C]  time = 6.30035, size = 411, normalized size = 3.16 \begin{align*} a^{2} \left (\begin{cases} - \frac{a^{2} \sqrt{c} \operatorname{acosh}{\left (\frac{b x}{a} \right )}}{2 b^{2}} - \frac{a \sqrt{c} x}{2 b \sqrt{-1 + \frac{b^{2} x^{2}}{a^{2}}}} + \frac{b \sqrt{c} x^{3}}{2 a \sqrt{-1 + \frac{b^{2} x^{2}}{a^{2}}}} & \text{for}\: \frac{\left |{b^{2} x^{2}}\right |}{\left |{a^{2}}\right |} > 1 \\\frac{i a^{2} \sqrt{c} \operatorname{asin}{\left (\frac{b x}{a} \right )}}{2 b^{2}} + \frac{i a \sqrt{c} x \sqrt{1 - \frac{b^{2} x^{2}}{a^{2}}}}{2 b} & \text{otherwise} \end{cases}\right ) + 2 a b \left (\begin{cases} 0 & \text{for}\: c = 0 \\\frac{\left (- \frac{a^{2} c}{b^{2}} + c x^{2}\right )^{\frac{3}{2}}}{3 c} & \text{otherwise} \end{cases}\right ) + b^{2} \left (\begin{cases} - \frac{a^{4} \sqrt{c} \operatorname{acosh}{\left (\frac{b x}{a} \right )}}{8 b^{4}} + \frac{a^{3} \sqrt{c} x}{8 b^{3} \sqrt{-1 + \frac{b^{2} x^{2}}{a^{2}}}} - \frac{3 a \sqrt{c} x^{3}}{8 b \sqrt{-1 + \frac{b^{2} x^{2}}{a^{2}}}} + \frac{b \sqrt{c} x^{5}}{4 a \sqrt{-1 + \frac{b^{2} x^{2}}{a^{2}}}} & \text{for}\: \frac{\left |{b^{2} x^{2}}\right |}{\left |{a^{2}}\right |} > 1 \\\frac{i a^{4} \sqrt{c} \operatorname{asin}{\left (\frac{b x}{a} \right )}}{8 b^{4}} - \frac{i a^{3} \sqrt{c} x}{8 b^{3} \sqrt{1 - \frac{b^{2} x^{2}}{a^{2}}}} + \frac{3 i a \sqrt{c} x^{3}}{8 b \sqrt{1 - \frac{b^{2} x^{2}}{a^{2}}}} - \frac{i b \sqrt{c} x^{5}}{4 a \sqrt{1 - \frac{b^{2} x^{2}}{a^{2}}}} & \text{otherwise} \end{cases}\right ) \end{align*}

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

[In]

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

[Out]

a**2*Piecewise((-a**2*sqrt(c)*acosh(b*x/a)/(2*b**2) - a*sqrt(c)*x/(2*b*sqrt(-1 + b**2*x**2/a**2)) + b*sqrt(c)*
x**3/(2*a*sqrt(-1 + b**2*x**2/a**2)), Abs(b**2*x**2)/Abs(a**2) > 1), (I*a**2*sqrt(c)*asin(b*x/a)/(2*b**2) + I*
a*sqrt(c)*x*sqrt(1 - b**2*x**2/a**2)/(2*b), True)) + 2*a*b*Piecewise((0, Eq(c, 0)), ((-a**2*c/b**2 + c*x**2)**
(3/2)/(3*c), True)) + b**2*Piecewise((-a**4*sqrt(c)*acosh(b*x/a)/(8*b**4) + a**3*sqrt(c)*x/(8*b**3*sqrt(-1 + b
**2*x**2/a**2)) - 3*a*sqrt(c)*x**3/(8*b*sqrt(-1 + b**2*x**2/a**2)) + b*sqrt(c)*x**5/(4*a*sqrt(-1 + b**2*x**2/a
**2)), Abs(b**2*x**2)/Abs(a**2) > 1), (I*a**4*sqrt(c)*asin(b*x/a)/(8*b**4) - I*a**3*sqrt(c)*x/(8*b**3*sqrt(1 -
b**2*x**2/a**2)) + 3*I*a*sqrt(c)*x**3/(8*b*sqrt(1 - b**2*x**2/a**2)) - I*b*sqrt(c)*x**5/(4*a*sqrt(1 - b**2*x*
*2/a**2)), True))

________________________________________________________________________________________

Giac [A]  time = 1.307, size = 136, normalized size = 1.05 \begin{align*} \frac{{\left (\frac{15 \, a^{4} \sqrt{c} \log \left ({\left | -\sqrt{b^{2} c} x + \sqrt{b^{2} c x^{2} - a^{2} c} \right |}\right )}{{\left | b \right |}} - \sqrt{b^{2} c x^{2} - a^{2} c}{\left (\frac{16 \, a^{3}}{b} -{\left (9 \, a^{2} + 2 \,{\left (3 \, b^{2} x + 8 \, a b\right )} x\right )} x\right )}\right )}{\left | b \right |}}{24 \, b^{2}} \end{align*}

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

[In]

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

[Out]

1/24*(15*a^4*sqrt(c)*log(abs(-sqrt(b^2*c)*x + sqrt(b^2*c*x^2 - a^2*c)))/abs(b) - sqrt(b^2*c*x^2 - a^2*c)*(16*a
^3/b - (9*a^2 + 2*(3*b^2*x + 8*a*b)*x)*x))*abs(b)/b^2