\(\int \frac {(A+B x) (c+d x)^3}{\sqrt {c^2-d^2 x^2}} \, dx\) [40]

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

Optimal result

Integrand size = 29, antiderivative size = 150 \[ \int \frac {(A+B x) (c+d x)^3}{\sqrt {c^2-d^2 x^2}} \, dx=-\frac {(3 B c+4 A d) (c+d x)^2 \sqrt {c^2-d^2 x^2}}{12 d^2}-\frac {B (c+d x)^3 \sqrt {c^2-d^2 x^2}}{4 d^2}-\frac {5 c (3 B c+4 A d) (4 c+d x) \sqrt {c^2-d^2 x^2}}{24 d^2}+\frac {5 c^3 (3 B c+4 A d) \arctan \left (\frac {d x}{\sqrt {c^2-d^2 x^2}}\right )}{8 d^2} \] Output:

-1/12*(4*A*d+3*B*c)*(d*x+c)^2*(-d^2*x^2+c^2)^(1/2)/d^2-1/4*B*(d*x+c)^3*(-d 
^2*x^2+c^2)^(1/2)/d^2-5/24*c*(4*A*d+3*B*c)*(d*x+4*c)*(-d^2*x^2+c^2)^(1/2)/ 
d^2+5/8*c^3*(4*A*d+3*B*c)*arctan(d*x/(-d^2*x^2+c^2)^(1/2))/d^2
 

Mathematica [A] (verified)

Time = 0.77 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.85 \[ \int \frac {(A+B x) (c+d x)^3}{\sqrt {c^2-d^2 x^2}} \, dx=-\frac {\sqrt {c^2-d^2 x^2} \left (4 A d \left (22 c^2+9 c d x+2 d^2 x^2\right )+3 B \left (24 c^3+15 c^2 d x+8 c d^2 x^2+2 d^3 x^3\right )\right )+30 c^3 (3 B c+4 A d) \arctan \left (\frac {d x}{\sqrt {c^2}-\sqrt {c^2-d^2 x^2}}\right )}{24 d^2} \] Input:

Integrate[((A + B*x)*(c + d*x)^3)/Sqrt[c^2 - d^2*x^2],x]
 

Output:

-1/24*(Sqrt[c^2 - d^2*x^2]*(4*A*d*(22*c^2 + 9*c*d*x + 2*d^2*x^2) + 3*B*(24 
*c^3 + 15*c^2*d*x + 8*c*d^2*x^2 + 2*d^3*x^3)) + 30*c^3*(3*B*c + 4*A*d)*Arc 
Tan[(d*x)/(Sqrt[c^2] - Sqrt[c^2 - d^2*x^2])])/d^2
 

Rubi [A] (verified)

Time = 0.46 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.10, number of steps used = 7, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.207, Rules used = {672, 469, 469, 455, 224, 216}

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 {(A+B x) (c+d x)^3}{\sqrt {c^2-d^2 x^2}} \, dx\)

\(\Big \downarrow \) 672

\(\displaystyle \frac {(4 A d+3 B c) \int \frac {(c+d x)^3}{\sqrt {c^2-d^2 x^2}}dx}{4 d}-\frac {B (c+d x)^3 \sqrt {c^2-d^2 x^2}}{4 d^2}\)

\(\Big \downarrow \) 469

\(\displaystyle \frac {(4 A d+3 B c) \left (\frac {5}{3} c \int \frac {(c+d x)^2}{\sqrt {c^2-d^2 x^2}}dx-\frac {(c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d}\right )}{4 d}-\frac {B (c+d x)^3 \sqrt {c^2-d^2 x^2}}{4 d^2}\)

\(\Big \downarrow \) 469

\(\displaystyle \frac {(4 A d+3 B c) \left (\frac {5}{3} c \left (\frac {3}{2} c \int \frac {c+d x}{\sqrt {c^2-d^2 x^2}}dx-\frac {(c+d x) \sqrt {c^2-d^2 x^2}}{2 d}\right )-\frac {(c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d}\right )}{4 d}-\frac {B (c+d x)^3 \sqrt {c^2-d^2 x^2}}{4 d^2}\)

\(\Big \downarrow \) 455

\(\displaystyle \frac {(4 A d+3 B c) \left (\frac {5}{3} c \left (\frac {3}{2} c \left (c \int \frac {1}{\sqrt {c^2-d^2 x^2}}dx-\frac {\sqrt {c^2-d^2 x^2}}{d}\right )-\frac {(c+d x) \sqrt {c^2-d^2 x^2}}{2 d}\right )-\frac {(c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d}\right )}{4 d}-\frac {B (c+d x)^3 \sqrt {c^2-d^2 x^2}}{4 d^2}\)

\(\Big \downarrow \) 224

\(\displaystyle \frac {(4 A d+3 B c) \left (\frac {5}{3} c \left (\frac {3}{2} c \left (c \int \frac {1}{\frac {d^2 x^2}{c^2-d^2 x^2}+1}d\frac {x}{\sqrt {c^2-d^2 x^2}}-\frac {\sqrt {c^2-d^2 x^2}}{d}\right )-\frac {(c+d x) \sqrt {c^2-d^2 x^2}}{2 d}\right )-\frac {(c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d}\right )}{4 d}-\frac {B (c+d x)^3 \sqrt {c^2-d^2 x^2}}{4 d^2}\)

\(\Big \downarrow \) 216

\(\displaystyle \frac {(4 A d+3 B c) \left (\frac {5}{3} c \left (\frac {3}{2} c \left (\frac {c \arctan \left (\frac {d x}{\sqrt {c^2-d^2 x^2}}\right )}{d}-\frac {\sqrt {c^2-d^2 x^2}}{d}\right )-\frac {(c+d x) \sqrt {c^2-d^2 x^2}}{2 d}\right )-\frac {(c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d}\right )}{4 d}-\frac {B (c+d x)^3 \sqrt {c^2-d^2 x^2}}{4 d^2}\)

Input:

Int[((A + B*x)*(c + d*x)^3)/Sqrt[c^2 - d^2*x^2],x]
 

Output:

-1/4*(B*(c + d*x)^3*Sqrt[c^2 - d^2*x^2])/d^2 + ((3*B*c + 4*A*d)*(-1/3*((c 
+ d*x)^2*Sqrt[c^2 - d^2*x^2])/d + (5*c*(-1/2*((c + d*x)*Sqrt[c^2 - d^2*x^2 
])/d + (3*c*(-(Sqrt[c^2 - d^2*x^2]/d) + (c*ArcTan[(d*x)/Sqrt[c^2 - d^2*x^2 
]])/d))/2))/3))/(4*d)
 

Defintions of rubi rules used

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

rule 224
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 455
Int[((c_) + (d_.)*(x_))*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Simp[d*(( 
a + b*x^2)^(p + 1)/(2*b*(p + 1))), x] + Simp[c   Int[(a + b*x^2)^p, x], x] 
/; FreeQ[{a, b, c, d, p}, x] &&  !LeQ[p, -1]
 

rule 469
Int[((c_) + (d_.)*(x_))^(n_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[ 
d*(c + d*x)^(n - 1)*((a + b*x^2)^(p + 1)/(b*(n + 2*p + 1))), x] + Simp[2*c* 
((n + p)/(n + 2*p + 1))   Int[(c + d*x)^(n - 1)*(a + b*x^2)^p, x], x] /; Fr 
eeQ[{a, b, c, d, p}, x] && EqQ[b*c^2 + a*d^2, 0] && GtQ[n, 0] && NeQ[n + 2* 
p + 1, 0] && IntegerQ[2*p]
 

rule 672
Int[((d_) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p_ 
), x_Symbol] :> Simp[g*(d + e*x)^m*((a + c*x^2)^(p + 1)/(c*(m + 2*p + 2))), 
 x] + Simp[(m*(d*g + e*f) + 2*e*f*(p + 1))/(e*(m + 2*p + 2))   Int[(d + e*x 
)^m*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g, m, p}, x] && EqQ[c*d^ 
2 + a*e^2, 0] && NeQ[m + 2*p + 2, 0]
 
Maple [A] (verified)

Time = 0.48 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.82

method result size
risch \(-\frac {\left (6 B \,d^{3} x^{3}+8 A \,d^{3} x^{2}+24 B c \,d^{2} x^{2}+36 A c \,d^{2} x +45 B \,c^{2} d x +88 A \,c^{2} d +72 B \,c^{3}\right ) \sqrt {-d^{2} x^{2}+c^{2}}}{24 d^{2}}+\frac {5 c^{3} \left (4 A d +3 B c \right ) \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right )}{8 d \sqrt {d^{2}}}\) \(123\)
default \(\frac {A \,c^{3} \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right )}{\sqrt {d^{2}}}+d^{2} \left (A d +3 B c \right ) \left (-\frac {x^{2} \sqrt {-d^{2} x^{2}+c^{2}}}{3 d^{2}}-\frac {2 c^{2} \sqrt {-d^{2} x^{2}+c^{2}}}{3 d^{4}}\right )+3 c d \left (A d +B c \right ) \left (-\frac {x \sqrt {-d^{2} x^{2}+c^{2}}}{2 d^{2}}+\frac {c^{2} \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right )}{2 d^{2} \sqrt {d^{2}}}\right )-\frac {c^{2} \left (3 A d +B c \right ) \sqrt {-d^{2} x^{2}+c^{2}}}{d^{2}}+B \,d^{3} \left (-\frac {x^{3} \sqrt {-d^{2} x^{2}+c^{2}}}{4 d^{2}}+\frac {3 c^{2} \left (-\frac {x \sqrt {-d^{2} x^{2}+c^{2}}}{2 d^{2}}+\frac {c^{2} \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right )}{2 d^{2} \sqrt {d^{2}}}\right )}{4 d^{2}}\right )\) \(280\)

Input:

int((B*x+A)*(d*x+c)^3/(-d^2*x^2+c^2)^(1/2),x,method=_RETURNVERBOSE)
 

Output:

-1/24/d^2*(6*B*d^3*x^3+8*A*d^3*x^2+24*B*c*d^2*x^2+36*A*c*d^2*x+45*B*c^2*d* 
x+88*A*c^2*d+72*B*c^3)*(-d^2*x^2+c^2)^(1/2)+5/8*c^3/d*(4*A*d+3*B*c)/(d^2)^ 
(1/2)*arctan((d^2)^(1/2)*x/(-d^2*x^2+c^2)^(1/2))
 

Fricas [A] (verification not implemented)

Time = 0.08 (sec) , antiderivative size = 123, normalized size of antiderivative = 0.82 \[ \int \frac {(A+B x) (c+d x)^3}{\sqrt {c^2-d^2 x^2}} \, dx=-\frac {30 \, {\left (3 \, B c^{4} + 4 \, A c^{3} d\right )} \arctan \left (-\frac {c - \sqrt {-d^{2} x^{2} + c^{2}}}{d x}\right ) + {\left (6 \, B d^{3} x^{3} + 72 \, B c^{3} + 88 \, A c^{2} d + 8 \, {\left (3 \, B c d^{2} + A d^{3}\right )} x^{2} + 9 \, {\left (5 \, B c^{2} d + 4 \, A c d^{2}\right )} x\right )} \sqrt {-d^{2} x^{2} + c^{2}}}{24 \, d^{2}} \] Input:

integrate((B*x+A)*(d*x+c)^3/(-d^2*x^2+c^2)^(1/2),x, algorithm="fricas")
 

Output:

-1/24*(30*(3*B*c^4 + 4*A*c^3*d)*arctan(-(c - sqrt(-d^2*x^2 + c^2))/(d*x)) 
+ (6*B*d^3*x^3 + 72*B*c^3 + 88*A*c^2*d + 8*(3*B*c*d^2 + A*d^3)*x^2 + 9*(5* 
B*c^2*d + 4*A*c*d^2)*x)*sqrt(-d^2*x^2 + c^2))/d^2
 

Sympy [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 287 vs. \(2 (139) = 278\).

Time = 0.61 (sec) , antiderivative size = 287, normalized size of antiderivative = 1.91 \[ \int \frac {(A+B x) (c+d x)^3}{\sqrt {c^2-d^2 x^2}} \, dx=\begin {cases} \sqrt {c^{2} - d^{2} x^{2}} \left (- \frac {B d x^{3}}{4} - \frac {x^{2} \left (A d^{3} + 3 B c d^{2}\right )}{3 d^{2}} - \frac {x \left (3 A c d^{2} + \frac {15 B c^{2} d}{4}\right )}{2 d^{2}} - \frac {3 A c^{2} d + B c^{3} + \frac {2 c^{2} \left (A d^{3} + 3 B c d^{2}\right )}{3 d^{2}}}{d^{2}}\right ) + \left (A c^{3} + \frac {c^{2} \cdot \left (3 A c d^{2} + \frac {15 B c^{2} d}{4}\right )}{2 d^{2}}\right ) \left (\begin {cases} \frac {\log {\left (- 2 d^{2} x + 2 \sqrt {- d^{2}} \sqrt {c^{2} - d^{2} x^{2}} \right )}}{\sqrt {- d^{2}}} & \text {for}\: c^{2} \neq 0 \\\frac {x \log {\left (x \right )}}{\sqrt {- d^{2} x^{2}}} & \text {otherwise} \end {cases}\right ) & \text {for}\: d^{2} \neq 0 \\\frac {A c^{3} x + \frac {B d^{3} x^{5}}{5} + \frac {x^{4} \left (A d^{3} + 3 B c d^{2}\right )}{4} + \frac {x^{3} \cdot \left (3 A c d^{2} + 3 B c^{2} d\right )}{3} + \frac {x^{2} \cdot \left (3 A c^{2} d + B c^{3}\right )}{2}}{\sqrt {c^{2}}} & \text {otherwise} \end {cases} \] Input:

integrate((B*x+A)*(d*x+c)**3/(-d**2*x**2+c**2)**(1/2),x)
 

Output:

Piecewise((sqrt(c**2 - d**2*x**2)*(-B*d*x**3/4 - x**2*(A*d**3 + 3*B*c*d**2 
)/(3*d**2) - x*(3*A*c*d**2 + 15*B*c**2*d/4)/(2*d**2) - (3*A*c**2*d + B*c** 
3 + 2*c**2*(A*d**3 + 3*B*c*d**2)/(3*d**2))/d**2) + (A*c**3 + c**2*(3*A*c*d 
**2 + 15*B*c**2*d/4)/(2*d**2))*Piecewise((log(-2*d**2*x + 2*sqrt(-d**2)*sq 
rt(c**2 - d**2*x**2))/sqrt(-d**2), Ne(c**2, 0)), (x*log(x)/sqrt(-d**2*x**2 
), True)), Ne(d**2, 0)), ((A*c**3*x + B*d**3*x**5/5 + x**4*(A*d**3 + 3*B*c 
*d**2)/4 + x**3*(3*A*c*d**2 + 3*B*c**2*d)/3 + x**2*(3*A*c**2*d + B*c**3)/2 
)/sqrt(c**2), True))
 

Maxima [A] (verification not implemented)

Time = 0.12 (sec) , antiderivative size = 254, normalized size of antiderivative = 1.69 \[ \int \frac {(A+B x) (c+d x)^3}{\sqrt {c^2-d^2 x^2}} \, dx=-\frac {1}{4} \, \sqrt {-d^{2} x^{2} + c^{2}} B d x^{3} + \frac {3 \, B c^{4} \arcsin \left (\frac {d x}{c}\right )}{8 \, d^{2}} + \frac {A c^{3} \arcsin \left (\frac {d x}{c}\right )}{d} - \frac {3 \, \sqrt {-d^{2} x^{2} + c^{2}} B c^{2} x}{8 \, d} - \frac {\sqrt {-d^{2} x^{2} + c^{2}} B c^{3}}{d^{2}} - \frac {3 \, \sqrt {-d^{2} x^{2} + c^{2}} A c^{2}}{d} - \frac {{\left (3 \, B c d^{2} + A d^{3}\right )} \sqrt {-d^{2} x^{2} + c^{2}} x^{2}}{3 \, d^{2}} + \frac {3 \, {\left (B c^{2} d + A c d^{2}\right )} c^{2} \arcsin \left (\frac {d x}{c}\right )}{2 \, d^{3}} - \frac {3 \, {\left (B c^{2} d + A c d^{2}\right )} \sqrt {-d^{2} x^{2} + c^{2}} x}{2 \, d^{2}} - \frac {2 \, {\left (3 \, B c d^{2} + A d^{3}\right )} \sqrt {-d^{2} x^{2} + c^{2}} c^{2}}{3 \, d^{4}} \] Input:

integrate((B*x+A)*(d*x+c)^3/(-d^2*x^2+c^2)^(1/2),x, algorithm="maxima")
 

Output:

-1/4*sqrt(-d^2*x^2 + c^2)*B*d*x^3 + 3/8*B*c^4*arcsin(d*x/c)/d^2 + A*c^3*ar 
csin(d*x/c)/d - 3/8*sqrt(-d^2*x^2 + c^2)*B*c^2*x/d - sqrt(-d^2*x^2 + c^2)* 
B*c^3/d^2 - 3*sqrt(-d^2*x^2 + c^2)*A*c^2/d - 1/3*(3*B*c*d^2 + A*d^3)*sqrt( 
-d^2*x^2 + c^2)*x^2/d^2 + 3/2*(B*c^2*d + A*c*d^2)*c^2*arcsin(d*x/c)/d^3 - 
3/2*(B*c^2*d + A*c*d^2)*sqrt(-d^2*x^2 + c^2)*x/d^2 - 2/3*(3*B*c*d^2 + A*d^ 
3)*sqrt(-d^2*x^2 + c^2)*c^2/d^4
 

Giac [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 128, normalized size of antiderivative = 0.85 \[ \int \frac {(A+B x) (c+d x)^3}{\sqrt {c^2-d^2 x^2}} \, dx=\frac {5 \, {\left (3 \, B c^{4} + 4 \, A c^{3} d\right )} \arcsin \left (\frac {d x}{c}\right ) \mathrm {sgn}\left (c\right ) \mathrm {sgn}\left (d\right )}{8 \, d {\left | d \right |}} - \frac {1}{24} \, \sqrt {-d^{2} x^{2} + c^{2}} {\left ({\left (2 \, {\left (3 \, B d x + \frac {4 \, {\left (3 \, B c d^{4} + A d^{5}\right )}}{d^{4}}\right )} x + \frac {9 \, {\left (5 \, B c^{2} d^{3} + 4 \, A c d^{4}\right )}}{d^{4}}\right )} x + \frac {8 \, {\left (9 \, B c^{3} d^{2} + 11 \, A c^{2} d^{3}\right )}}{d^{4}}\right )} \] Input:

integrate((B*x+A)*(d*x+c)^3/(-d^2*x^2+c^2)^(1/2),x, algorithm="giac")
 

Output:

5/8*(3*B*c^4 + 4*A*c^3*d)*arcsin(d*x/c)*sgn(c)*sgn(d)/(d*abs(d)) - 1/24*sq 
rt(-d^2*x^2 + c^2)*((2*(3*B*d*x + 4*(3*B*c*d^4 + A*d^5)/d^4)*x + 9*(5*B*c^ 
2*d^3 + 4*A*c*d^4)/d^4)*x + 8*(9*B*c^3*d^2 + 11*A*c^2*d^3)/d^4)
 

Mupad [F(-1)]

Timed out. \[ \int \frac {(A+B x) (c+d x)^3}{\sqrt {c^2-d^2 x^2}} \, dx=\int \frac {\left (A+B\,x\right )\,{\left (c+d\,x\right )}^3}{\sqrt {c^2-d^2\,x^2}} \,d x \] Input:

int(((A + B*x)*(c + d*x)^3)/(c^2 - d^2*x^2)^(1/2),x)
 

Output:

int(((A + B*x)*(c + d*x)^3)/(c^2 - d^2*x^2)^(1/2), x)
 

Reduce [B] (verification not implemented)

Time = 0.22 (sec) , antiderivative size = 194, normalized size of antiderivative = 1.29 \[ \int \frac {(A+B x) (c+d x)^3}{\sqrt {c^2-d^2 x^2}} \, dx=\frac {60 \mathit {asin} \left (\frac {d x}{c}\right ) a \,c^{3} d +45 \mathit {asin} \left (\frac {d x}{c}\right ) b \,c^{4}-88 \sqrt {-d^{2} x^{2}+c^{2}}\, a \,c^{2} d -36 \sqrt {-d^{2} x^{2}+c^{2}}\, a c \,d^{2} x -8 \sqrt {-d^{2} x^{2}+c^{2}}\, a \,d^{3} x^{2}-72 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,c^{3}-45 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,c^{2} d x -24 \sqrt {-d^{2} x^{2}+c^{2}}\, b c \,d^{2} x^{2}-6 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,d^{3} x^{3}+88 a \,c^{3} d +72 b \,c^{4}}{24 d^{2}} \] Input:

int((B*x+A)*(d*x+c)^3/(-d^2*x^2+c^2)^(1/2),x)
 

Output:

(60*asin((d*x)/c)*a*c**3*d + 45*asin((d*x)/c)*b*c**4 - 88*sqrt(c**2 - d**2 
*x**2)*a*c**2*d - 36*sqrt(c**2 - d**2*x**2)*a*c*d**2*x - 8*sqrt(c**2 - d** 
2*x**2)*a*d**3*x**2 - 72*sqrt(c**2 - d**2*x**2)*b*c**3 - 45*sqrt(c**2 - d* 
*2*x**2)*b*c**2*d*x - 24*sqrt(c**2 - d**2*x**2)*b*c*d**2*x**2 - 6*sqrt(c** 
2 - d**2*x**2)*b*d**3*x**3 + 88*a*c**3*d + 72*b*c**4)/(24*d**2)