Integrand size = 29, antiderivative size = 110 \[ \int \frac {(A+B x) (c+d x)^2}{\sqrt {c^2-d^2 x^2}} \, dx=-\frac {B (c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d^2}-\frac {(2 B c+3 A d) (4 c+d x) \sqrt {c^2-d^2 x^2}}{6 d^2}+\frac {c^2 (2 B c+3 A d) \arctan \left (\frac {d x}{\sqrt {c^2-d^2 x^2}}\right )}{2 d^2} \] Output:
-1/3*B*(d*x+c)^2*(-d^2*x^2+c^2)^(1/2)/d^2-1/6*(3*A*d+2*B*c)*(d*x+4*c)*(-d^ 2*x^2+c^2)^(1/2)/d^2+1/2*c^2*(3*A*d+2*B*c)*arctan(d*x/(-d^2*x^2+c^2)^(1/2) )/d^2
Time = 0.64 (sec) , antiderivative size = 104, normalized size of antiderivative = 0.95 \[ \int \frac {(A+B x) (c+d x)^2}{\sqrt {c^2-d^2 x^2}} \, dx=-\frac {\sqrt {c^2-d^2 x^2} \left (3 A d (4 c+d x)+2 B \left (5 c^2+3 c d x+d^2 x^2\right )\right )+6 c^2 (2 B c+3 A d) \arctan \left (\frac {d x}{\sqrt {c^2}-\sqrt {c^2-d^2 x^2}}\right )}{6 d^2} \] Input:
Integrate[((A + B*x)*(c + d*x)^2)/Sqrt[c^2 - d^2*x^2],x]
Output:
-1/6*(Sqrt[c^2 - d^2*x^2]*(3*A*d*(4*c + d*x) + 2*B*(5*c^2 + 3*c*d*x + d^2* x^2)) + 6*c^2*(2*B*c + 3*A*d)*ArcTan[(d*x)/(Sqrt[c^2] - Sqrt[c^2 - d^2*x^2 ])])/d^2
Time = 0.40 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.17, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.172, Rules used = {672, 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)^2}{\sqrt {c^2-d^2 x^2}} \, dx\) |
\(\Big \downarrow \) 672 |
\(\displaystyle \frac {(3 A d+2 B c) \int \frac {(c+d x)^2}{\sqrt {c^2-d^2 x^2}}dx}{3 d}-\frac {B (c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d^2}\) |
\(\Big \downarrow \) 469 |
\(\displaystyle \frac {(3 A d+2 B 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 )}{3 d}-\frac {B (c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d^2}\) |
\(\Big \downarrow \) 455 |
\(\displaystyle \frac {(3 A d+2 B 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 )}{3 d}-\frac {B (c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d^2}\) |
\(\Big \downarrow \) 224 |
\(\displaystyle \frac {(3 A d+2 B 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 )}{3 d}-\frac {B (c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d^2}\) |
\(\Big \downarrow \) 216 |
\(\displaystyle \frac {(3 A d+2 B 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 )}{3 d}-\frac {B (c+d x)^2 \sqrt {c^2-d^2 x^2}}{3 d^2}\) |
Input:
Int[((A + B*x)*(c + d*x)^2)/Sqrt[c^2 - d^2*x^2],x]
Output:
-1/3*(B*(c + d*x)^2*Sqrt[c^2 - d^2*x^2])/d^2 + ((2*B*c + 3*A*d)*(-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*d)
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])
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]
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]
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]
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]
Time = 0.42 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.90
method | result | size |
risch | \(-\frac {\left (2 B \,d^{2} x^{2}+3 A \,d^{2} x +6 B c d x +12 A c d +10 B \,c^{2}\right ) \sqrt {-d^{2} x^{2}+c^{2}}}{6 d^{2}}+\frac {c^{2} \left (3 A d +2 B c \right ) \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right )}{2 d \sqrt {d^{2}}}\) | \(99\) |
default | \(\frac {A \,c^{2} \arctan \left (\frac {\sqrt {d^{2}}\, x}{\sqrt {-d^{2} x^{2}+c^{2}}}\right )}{\sqrt {d^{2}}}+d \left (A d +2 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 \left (2 A d +B c \right ) \sqrt {-d^{2} x^{2}+c^{2}}}{d^{2}}+B \,d^{2} \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 )\) | \(178\) |
Input:
int((B*x+A)*(d*x+c)^2/(-d^2*x^2+c^2)^(1/2),x,method=_RETURNVERBOSE)
Output:
-1/6*(2*B*d^2*x^2+3*A*d^2*x+6*B*c*d*x+12*A*c*d+10*B*c^2)/d^2*(-d^2*x^2+c^2 )^(1/2)+1/2*c^2/d*(3*A*d+2*B*c)/(d^2)^(1/2)*arctan((d^2)^(1/2)*x/(-d^2*x^2 +c^2)^(1/2))
Time = 0.09 (sec) , antiderivative size = 99, normalized size of antiderivative = 0.90 \[ \int \frac {(A+B x) (c+d x)^2}{\sqrt {c^2-d^2 x^2}} \, dx=-\frac {6 \, {\left (2 \, B c^{3} + 3 \, A c^{2} d\right )} \arctan \left (-\frac {c - \sqrt {-d^{2} x^{2} + c^{2}}}{d x}\right ) + {\left (2 \, B d^{2} x^{2} + 10 \, B c^{2} + 12 \, A c d + 3 \, {\left (2 \, B c d + A d^{2}\right )} x\right )} \sqrt {-d^{2} x^{2} + c^{2}}}{6 \, d^{2}} \] Input:
integrate((B*x+A)*(d*x+c)^2/(-d^2*x^2+c^2)^(1/2),x, algorithm="fricas")
Output:
-1/6*(6*(2*B*c^3 + 3*A*c^2*d)*arctan(-(c - sqrt(-d^2*x^2 + c^2))/(d*x)) + (2*B*d^2*x^2 + 10*B*c^2 + 12*A*c*d + 3*(2*B*c*d + A*d^2)*x)*sqrt(-d^2*x^2 + c^2))/d^2
Leaf count of result is larger than twice the leaf count of optimal. 202 vs. \(2 (97) = 194\).
Time = 0.59 (sec) , antiderivative size = 202, normalized size of antiderivative = 1.84 \[ \int \frac {(A+B x) (c+d x)^2}{\sqrt {c^2-d^2 x^2}} \, dx=\begin {cases} \sqrt {c^{2} - d^{2} x^{2}} \left (- \frac {B x^{2}}{3} - \frac {x \left (A d^{2} + 2 B c d\right )}{2 d^{2}} - \frac {2 A c d + \frac {5 B c^{2}}{3}}{d^{2}}\right ) + \left (A c^{2} + \frac {c^{2} \left (A d^{2} + 2 B c d\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^{2} x + \frac {B d^{2} x^{4}}{4} + \frac {x^{3} \left (A d^{2} + 2 B c d\right )}{3} + \frac {x^{2} \cdot \left (2 A c d + B c^{2}\right )}{2}}{\sqrt {c^{2}}} & \text {otherwise} \end {cases} \] Input:
integrate((B*x+A)*(d*x+c)**2/(-d**2*x**2+c**2)**(1/2),x)
Output:
Piecewise((sqrt(c**2 - d**2*x**2)*(-B*x**2/3 - x*(A*d**2 + 2*B*c*d)/(2*d** 2) - (2*A*c*d + 5*B*c**2/3)/d**2) + (A*c**2 + c**2*(A*d**2 + 2*B*c*d)/(2*d **2))*Piecewise((log(-2*d**2*x + 2*sqrt(-d**2)*sqrt(c**2 - d**2*x**2))/sqr t(-d**2), Ne(c**2, 0)), (x*log(x)/sqrt(-d**2*x**2), True)), Ne(d**2, 0)), ((A*c**2*x + B*d**2*x**4/4 + x**3*(A*d**2 + 2*B*c*d)/3 + x**2*(2*A*c*d + B *c**2)/2)/sqrt(c**2), True))
Time = 0.11 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.25 \[ \int \frac {(A+B x) (c+d x)^2}{\sqrt {c^2-d^2 x^2}} \, dx=-\frac {1}{3} \, \sqrt {-d^{2} x^{2} + c^{2}} B x^{2} + \frac {A c^{2} \arcsin \left (\frac {d x}{c}\right )}{d} - \frac {5 \, \sqrt {-d^{2} x^{2} + c^{2}} B c^{2}}{3 \, d^{2}} - \frac {2 \, \sqrt {-d^{2} x^{2} + c^{2}} A c}{d} + \frac {{\left (2 \, B c d + A d^{2}\right )} c^{2} \arcsin \left (\frac {d x}{c}\right )}{2 \, d^{3}} - \frac {\sqrt {-d^{2} x^{2} + c^{2}} {\left (2 \, B c d + A d^{2}\right )} x}{2 \, d^{2}} \] Input:
integrate((B*x+A)*(d*x+c)^2/(-d^2*x^2+c^2)^(1/2),x, algorithm="maxima")
Output:
-1/3*sqrt(-d^2*x^2 + c^2)*B*x^2 + A*c^2*arcsin(d*x/c)/d - 5/3*sqrt(-d^2*x^ 2 + c^2)*B*c^2/d^2 - 2*sqrt(-d^2*x^2 + c^2)*A*c/d + 1/2*(2*B*c*d + A*d^2)* c^2*arcsin(d*x/c)/d^3 - 1/2*sqrt(-d^2*x^2 + c^2)*(2*B*c*d + A*d^2)*x/d^2
Time = 0.15 (sec) , antiderivative size = 97, normalized size of antiderivative = 0.88 \[ \int \frac {(A+B x) (c+d x)^2}{\sqrt {c^2-d^2 x^2}} \, dx=\frac {{\left (2 \, B c^{3} + 3 \, A c^{2} d\right )} \arcsin \left (\frac {d x}{c}\right ) \mathrm {sgn}\left (c\right ) \mathrm {sgn}\left (d\right )}{2 \, d {\left | d \right |}} - \frac {1}{6} \, \sqrt {-d^{2} x^{2} + c^{2}} {\left ({\left (2 \, B x + \frac {3 \, {\left (2 \, B c d^{2} + A d^{3}\right )}}{d^{3}}\right )} x + \frac {2 \, {\left (5 \, B c^{2} d + 6 \, A c d^{2}\right )}}{d^{3}}\right )} \] Input:
integrate((B*x+A)*(d*x+c)^2/(-d^2*x^2+c^2)^(1/2),x, algorithm="giac")
Output:
1/2*(2*B*c^3 + 3*A*c^2*d)*arcsin(d*x/c)*sgn(c)*sgn(d)/(d*abs(d)) - 1/6*sqr t(-d^2*x^2 + c^2)*((2*B*x + 3*(2*B*c*d^2 + A*d^3)/d^3)*x + 2*(5*B*c^2*d + 6*A*c*d^2)/d^3)
Timed out. \[ \int \frac {(A+B x) (c+d x)^2}{\sqrt {c^2-d^2 x^2}} \, dx=\int \frac {\left (A+B\,x\right )\,{\left (c+d\,x\right )}^2}{\sqrt {c^2-d^2\,x^2}} \,d x \] Input:
int(((A + B*x)*(c + d*x)^2)/(c^2 - d^2*x^2)^(1/2),x)
Output:
int(((A + B*x)*(c + d*x)^2)/(c^2 - d^2*x^2)^(1/2), x)
Time = 0.21 (sec) , antiderivative size = 144, normalized size of antiderivative = 1.31 \[ \int \frac {(A+B x) (c+d x)^2}{\sqrt {c^2-d^2 x^2}} \, dx=\frac {9 \mathit {asin} \left (\frac {d x}{c}\right ) a \,c^{2} d +6 \mathit {asin} \left (\frac {d x}{c}\right ) b \,c^{3}-12 \sqrt {-d^{2} x^{2}+c^{2}}\, a c d -3 \sqrt {-d^{2} x^{2}+c^{2}}\, a \,d^{2} x -10 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,c^{2}-6 \sqrt {-d^{2} x^{2}+c^{2}}\, b c d x -2 \sqrt {-d^{2} x^{2}+c^{2}}\, b \,d^{2} x^{2}+12 a \,c^{2} d +10 b \,c^{3}}{6 d^{2}} \] Input:
int((B*x+A)*(d*x+c)^2/(-d^2*x^2+c^2)^(1/2),x)
Output:
(9*asin((d*x)/c)*a*c**2*d + 6*asin((d*x)/c)*b*c**3 - 12*sqrt(c**2 - d**2*x **2)*a*c*d - 3*sqrt(c**2 - d**2*x**2)*a*d**2*x - 10*sqrt(c**2 - d**2*x**2) *b*c**2 - 6*sqrt(c**2 - d**2*x**2)*b*c*d*x - 2*sqrt(c**2 - d**2*x**2)*b*d* *2*x**2 + 12*a*c**2*d + 10*b*c**3)/(6*d**2)