Integrand size = 22, antiderivative size = 113 \[ \int \frac {(A+B x) (d+e x)^2}{\left (a+c x^2\right )^2} \, dx=-\frac {(d+e x) (a (B d+A e)-(A c d-a B e) x)}{2 a c \left (a+c x^2\right )}+\frac {\left (A c d^2+2 a B d e+a A e^2\right ) \arctan \left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{2 a^{3/2} c^{3/2}}+\frac {B e^2 \log \left (a+c x^2\right )}{2 c^2} \] Output:
-1/2*(e*x+d)*(a*(A*e+B*d)-(A*c*d-B*a*e)*x)/a/c/(c*x^2+a)+1/2*(A*a*e^2+A*c* d^2+2*B*a*d*e)*arctan(c^(1/2)*x/a^(1/2))/a^(3/2)/c^(3/2)+1/2*B*e^2*ln(c*x^ 2+a)/c^2
Time = 0.10 (sec) , antiderivative size = 119, normalized size of antiderivative = 1.05 \[ \int \frac {(A+B x) (d+e x)^2}{\left (a+c x^2\right )^2} \, dx=\frac {\frac {a^2 B e^2+A c^2 d^2 x-a c (A e (2 d+e x)+B d (d+2 e x))}{a \left (a+c x^2\right )}+\frac {\sqrt {c} \left (A c d^2+2 a B d e+a A e^2\right ) \arctan \left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{a^{3/2}}+B e^2 \log \left (a+c x^2\right )}{2 c^2} \] Input:
Integrate[((A + B*x)*(d + e*x)^2)/(a + c*x^2)^2,x]
Output:
((a^2*B*e^2 + A*c^2*d^2*x - a*c*(A*e*(2*d + e*x) + B*d*(d + 2*e*x)))/(a*(a + c*x^2)) + (Sqrt[c]*(A*c*d^2 + 2*a*B*d*e + a*A*e^2)*ArcTan[(Sqrt[c]*x)/S qrt[a]])/a^(3/2) + B*e^2*Log[a + c*x^2])/(2*c^2)
Time = 0.25 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.04, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.182, Rules used = {684, 452, 218, 240}
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) (d+e x)^2}{\left (a+c x^2\right )^2} \, dx\) |
\(\Big \downarrow \) 684 |
\(\displaystyle \frac {\int \frac {A c d^2+a e (2 B d+A e)+2 a B e^2 x}{c x^2+a}dx}{2 a c}-\frac {(d+e x) (a (A e+B d)-x (A c d-a B e))}{2 a c \left (a+c x^2\right )}\) |
\(\Big \downarrow \) 452 |
\(\displaystyle \frac {\left (a e (A e+2 B d)+A c d^2\right ) \int \frac {1}{c x^2+a}dx+2 a B e^2 \int \frac {x}{c x^2+a}dx}{2 a c}-\frac {(d+e x) (a (A e+B d)-x (A c d-a B e))}{2 a c \left (a+c x^2\right )}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle \frac {2 a B e^2 \int \frac {x}{c x^2+a}dx+\frac {\arctan \left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) \left (a e (A e+2 B d)+A c d^2\right )}{\sqrt {a} \sqrt {c}}}{2 a c}-\frac {(d+e x) (a (A e+B d)-x (A c d-a B e))}{2 a c \left (a+c x^2\right )}\) |
\(\Big \downarrow \) 240 |
\(\displaystyle \frac {\frac {\arctan \left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) \left (a e (A e+2 B d)+A c d^2\right )}{\sqrt {a} \sqrt {c}}+\frac {a B e^2 \log \left (a+c x^2\right )}{c}}{2 a c}-\frac {(d+e x) (a (A e+B d)-x (A c d-a B e))}{2 a c \left (a+c x^2\right )}\) |
Input:
Int[((A + B*x)*(d + e*x)^2)/(a + c*x^2)^2,x]
Output:
-1/2*((d + e*x)*(a*(B*d + A*e) - (A*c*d - a*B*e)*x))/(a*c*(a + c*x^2)) + ( ((A*c*d^2 + a*e*(2*B*d + A*e))*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*Sqrt[ c]) + (a*B*e^2*Log[a + c*x^2])/c)/(2*a*c)
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[(x_)/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[Log[RemoveContent[a + b*x ^2, x]]/(2*b), x] /; FreeQ[{a, b}, x]
Int[((c_) + (d_.)*(x_))/((a_) + (b_.)*(x_)^2), x_Symbol] :> Simp[c Int[1/ (a + b*x^2), x], x] + Simp[d Int[x/(a + b*x^2), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c^2 + a*d^2, 0]
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_) + (c_.)*(x_)^2)^(p _.), x_Symbol] :> Simp[(d + e*x)^(m - 1)*(a + c*x^2)^(p + 1)*((a*(e*f + d*g ) - (c*d*f - a*e*g)*x)/(2*a*c*(p + 1))), x] - Simp[1/(2*a*c*(p + 1)) Int[ (d + e*x)^(m - 2)*(a + c*x^2)^(p + 1)*Simp[a*e*(e*f*(m - 1) + d*g*m) - c*d^ 2*f*(2*p + 3) + e*(a*e*g*m - c*d*f*(m + 2*p + 2))*x, x], x], x] /; FreeQ[{a , c, d, e, f, g}, x] && LtQ[p, -1] && GtQ[m, 1] && (EqQ[d, 0] || (EqQ[m, 2] && EqQ[p, -3] && RationalQ[a, c, d, e, f, g]) || !ILtQ[m + 2*p + 3, 0])
Time = 0.98 (sec) , antiderivative size = 127, normalized size of antiderivative = 1.12
method | result | size |
default | \(\frac {-\frac {\left (A a \,e^{2}-A c \,d^{2}+2 B a d e \right ) x}{2 a c}-\frac {2 A c d e -B a \,e^{2}+B c \,d^{2}}{2 c^{2}}}{c \,x^{2}+a}+\frac {\frac {B a \,e^{2} \ln \left (c \,x^{2}+a \right )}{c}+\frac {\left (A a \,e^{2}+A c \,d^{2}+2 B a d e \right ) \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}}}{2 a c}\) | \(127\) |
risch | \(\frac {-\frac {\left (A a \,e^{2}-A c \,d^{2}+2 B a d e \right ) x}{2 a c}-\frac {2 A c d e -B a \,e^{2}+B c \,d^{2}}{2 c^{2}}}{c \,x^{2}+a}+\frac {\ln \left (A \,a^{2} e^{2}+A \,d^{2} a c +2 B \,a^{2} d e -\sqrt {-a c \left (A a \,e^{2}+A c \,d^{2}+2 B a d e \right )^{2}}\, x \right ) B \,e^{2}}{2 c^{2}}+\frac {\ln \left (A \,a^{2} e^{2}+A \,d^{2} a c +2 B \,a^{2} d e -\sqrt {-a c \left (A a \,e^{2}+A c \,d^{2}+2 B a d e \right )^{2}}\, x \right ) \sqrt {-a c \left (A a \,e^{2}+A c \,d^{2}+2 B a d e \right )^{2}}}{4 a^{2} c^{2}}+\frac {\ln \left (A \,a^{2} e^{2}+A \,d^{2} a c +2 B \,a^{2} d e +\sqrt {-a c \left (A a \,e^{2}+A c \,d^{2}+2 B a d e \right )^{2}}\, x \right ) B \,e^{2}}{2 c^{2}}-\frac {\ln \left (A \,a^{2} e^{2}+A \,d^{2} a c +2 B \,a^{2} d e +\sqrt {-a c \left (A a \,e^{2}+A c \,d^{2}+2 B a d e \right )^{2}}\, x \right ) \sqrt {-a c \left (A a \,e^{2}+A c \,d^{2}+2 B a d e \right )^{2}}}{4 a^{2} c^{2}}\) | \(373\) |
Input:
int((B*x+A)*(e*x+d)^2/(c*x^2+a)^2,x,method=_RETURNVERBOSE)
Output:
(-1/2*(A*a*e^2-A*c*d^2+2*B*a*d*e)/a/c*x-1/2*(2*A*c*d*e-B*a*e^2+B*c*d^2)/c^ 2)/(c*x^2+a)+1/2/a/c*(B*a*e^2/c*ln(c*x^2+a)+(A*a*e^2+A*c*d^2+2*B*a*d*e)/(a *c)^(1/2)*arctan(c*x/(a*c)^(1/2)))
Time = 0.09 (sec) , antiderivative size = 384, normalized size of antiderivative = 3.40 \[ \int \frac {(A+B x) (d+e x)^2}{\left (a+c x^2\right )^2} \, dx=\left [-\frac {2 \, B a^{2} c d^{2} + 4 \, A a^{2} c d e - 2 \, B a^{3} e^{2} + {\left (A a c d^{2} + 2 \, B a^{2} d e + A a^{2} e^{2} + {\left (A c^{2} d^{2} + 2 \, B a c d e + A a c e^{2}\right )} x^{2}\right )} \sqrt {-a c} \log \left (\frac {c x^{2} - 2 \, \sqrt {-a c} x - a}{c x^{2} + a}\right ) - 2 \, {\left (A a c^{2} d^{2} - 2 \, B a^{2} c d e - A a^{2} c e^{2}\right )} x - 2 \, {\left (B a^{2} c e^{2} x^{2} + B a^{3} e^{2}\right )} \log \left (c x^{2} + a\right )}{4 \, {\left (a^{2} c^{3} x^{2} + a^{3} c^{2}\right )}}, -\frac {B a^{2} c d^{2} + 2 \, A a^{2} c d e - B a^{3} e^{2} - {\left (A a c d^{2} + 2 \, B a^{2} d e + A a^{2} e^{2} + {\left (A c^{2} d^{2} + 2 \, B a c d e + A a c e^{2}\right )} x^{2}\right )} \sqrt {a c} \arctan \left (\frac {\sqrt {a c} x}{a}\right ) - {\left (A a c^{2} d^{2} - 2 \, B a^{2} c d e - A a^{2} c e^{2}\right )} x - {\left (B a^{2} c e^{2} x^{2} + B a^{3} e^{2}\right )} \log \left (c x^{2} + a\right )}{2 \, {\left (a^{2} c^{3} x^{2} + a^{3} c^{2}\right )}}\right ] \] Input:
integrate((B*x+A)*(e*x+d)^2/(c*x^2+a)^2,x, algorithm="fricas")
Output:
[-1/4*(2*B*a^2*c*d^2 + 4*A*a^2*c*d*e - 2*B*a^3*e^2 + (A*a*c*d^2 + 2*B*a^2* d*e + A*a^2*e^2 + (A*c^2*d^2 + 2*B*a*c*d*e + A*a*c*e^2)*x^2)*sqrt(-a*c)*lo g((c*x^2 - 2*sqrt(-a*c)*x - a)/(c*x^2 + a)) - 2*(A*a*c^2*d^2 - 2*B*a^2*c*d *e - A*a^2*c*e^2)*x - 2*(B*a^2*c*e^2*x^2 + B*a^3*e^2)*log(c*x^2 + a))/(a^2 *c^3*x^2 + a^3*c^2), -1/2*(B*a^2*c*d^2 + 2*A*a^2*c*d*e - B*a^3*e^2 - (A*a* c*d^2 + 2*B*a^2*d*e + A*a^2*e^2 + (A*c^2*d^2 + 2*B*a*c*d*e + A*a*c*e^2)*x^ 2)*sqrt(a*c)*arctan(sqrt(a*c)*x/a) - (A*a*c^2*d^2 - 2*B*a^2*c*d*e - A*a^2* c*e^2)*x - (B*a^2*c*e^2*x^2 + B*a^3*e^2)*log(c*x^2 + a))/(a^2*c^3*x^2 + a^ 3*c^2)]
Leaf count of result is larger than twice the leaf count of optimal. 382 vs. \(2 (105) = 210\).
Time = 1.37 (sec) , antiderivative size = 382, normalized size of antiderivative = 3.38 \[ \int \frac {(A+B x) (d+e x)^2}{\left (a+c x^2\right )^2} \, dx=\left (\frac {B e^{2}}{2 c^{2}} - \frac {\sqrt {- a^{3} c^{5}} \left (A a e^{2} + A c d^{2} + 2 B a d e\right )}{4 a^{3} c^{4}}\right ) \log {\left (x + \frac {- 2 B a^{2} e^{2} + 4 a^{2} c^{2} \left (\frac {B e^{2}}{2 c^{2}} - \frac {\sqrt {- a^{3} c^{5}} \left (A a e^{2} + A c d^{2} + 2 B a d e\right )}{4 a^{3} c^{4}}\right )}{A a c e^{2} + A c^{2} d^{2} + 2 B a c d e} \right )} + \left (\frac {B e^{2}}{2 c^{2}} + \frac {\sqrt {- a^{3} c^{5}} \left (A a e^{2} + A c d^{2} + 2 B a d e\right )}{4 a^{3} c^{4}}\right ) \log {\left (x + \frac {- 2 B a^{2} e^{2} + 4 a^{2} c^{2} \left (\frac {B e^{2}}{2 c^{2}} + \frac {\sqrt {- a^{3} c^{5}} \left (A a e^{2} + A c d^{2} + 2 B a d e\right )}{4 a^{3} c^{4}}\right )}{A a c e^{2} + A c^{2} d^{2} + 2 B a c d e} \right )} + \frac {- 2 A a c d e + B a^{2} e^{2} - B a c d^{2} + x \left (- A a c e^{2} + A c^{2} d^{2} - 2 B a c d e\right )}{2 a^{2} c^{2} + 2 a c^{3} x^{2}} \] Input:
integrate((B*x+A)*(e*x+d)**2/(c*x**2+a)**2,x)
Output:
(B*e**2/(2*c**2) - sqrt(-a**3*c**5)*(A*a*e**2 + A*c*d**2 + 2*B*a*d*e)/(4*a **3*c**4))*log(x + (-2*B*a**2*e**2 + 4*a**2*c**2*(B*e**2/(2*c**2) - sqrt(- a**3*c**5)*(A*a*e**2 + A*c*d**2 + 2*B*a*d*e)/(4*a**3*c**4)))/(A*a*c*e**2 + A*c**2*d**2 + 2*B*a*c*d*e)) + (B*e**2/(2*c**2) + sqrt(-a**3*c**5)*(A*a*e* *2 + A*c*d**2 + 2*B*a*d*e)/(4*a**3*c**4))*log(x + (-2*B*a**2*e**2 + 4*a**2 *c**2*(B*e**2/(2*c**2) + sqrt(-a**3*c**5)*(A*a*e**2 + A*c*d**2 + 2*B*a*d*e )/(4*a**3*c**4)))/(A*a*c*e**2 + A*c**2*d**2 + 2*B*a*c*d*e)) + (-2*A*a*c*d* e + B*a**2*e**2 - B*a*c*d**2 + x*(-A*a*c*e**2 + A*c**2*d**2 - 2*B*a*c*d*e) )/(2*a**2*c**2 + 2*a*c**3*x**2)
Time = 0.14 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.15 \[ \int \frac {(A+B x) (d+e x)^2}{\left (a+c x^2\right )^2} \, dx=\frac {B e^{2} \log \left (c x^{2} + a\right )}{2 \, c^{2}} - \frac {B a c d^{2} + 2 \, A a c d e - B a^{2} e^{2} - {\left (A c^{2} d^{2} - 2 \, B a c d e - A a c e^{2}\right )} x}{2 \, {\left (a c^{3} x^{2} + a^{2} c^{2}\right )}} + \frac {{\left (A c d^{2} + 2 \, B a d e + A a e^{2}\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{2 \, \sqrt {a c} a c} \] Input:
integrate((B*x+A)*(e*x+d)^2/(c*x^2+a)^2,x, algorithm="maxima")
Output:
1/2*B*e^2*log(c*x^2 + a)/c^2 - 1/2*(B*a*c*d^2 + 2*A*a*c*d*e - B*a^2*e^2 - (A*c^2*d^2 - 2*B*a*c*d*e - A*a*c*e^2)*x)/(a*c^3*x^2 + a^2*c^2) + 1/2*(A*c* d^2 + 2*B*a*d*e + A*a*e^2)*arctan(c*x/sqrt(a*c))/(sqrt(a*c)*a*c)
Time = 0.13 (sec) , antiderivative size = 128, normalized size of antiderivative = 1.13 \[ \int \frac {(A+B x) (d+e x)^2}{\left (a+c x^2\right )^2} \, dx=\frac {B e^{2} \log \left (c x^{2} + a\right )}{2 \, c^{2}} + \frac {{\left (A c d^{2} + 2 \, B a d e + A a e^{2}\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{2 \, \sqrt {a c} a c} + \frac {{\left (A c d^{2} - 2 \, B a d e - A a e^{2}\right )} x - \frac {B a c d^{2} + 2 \, A a c d e - B a^{2} e^{2}}{c}}{2 \, {\left (c x^{2} + a\right )} a c} \] Input:
integrate((B*x+A)*(e*x+d)^2/(c*x^2+a)^2,x, algorithm="giac")
Output:
1/2*B*e^2*log(c*x^2 + a)/c^2 + 1/2*(A*c*d^2 + 2*B*a*d*e + A*a*e^2)*arctan( c*x/sqrt(a*c))/(sqrt(a*c)*a*c) + 1/2*((A*c*d^2 - 2*B*a*d*e - A*a*e^2)*x - (B*a*c*d^2 + 2*A*a*c*d*e - B*a^2*e^2)/c)/((c*x^2 + a)*a*c)
Time = 6.08 (sec) , antiderivative size = 203, normalized size of antiderivative = 1.80 \[ \int \frac {(A+B x) (d+e x)^2}{\left (a+c x^2\right )^2} \, dx=\frac {B\,a\,e^2}{2\,\left (c^3\,x^2+a\,c^2\right )}-\frac {B\,d^2}{2\,\left (c^2\,x^2+a\,c\right )}-\frac {A\,d\,e}{c^2\,x^2+a\,c}+\frac {A\,d^2\,x}{2\,\left (a^2+c\,a\,x^2\right )}-\frac {A\,e^2\,x}{2\,\left (c^2\,x^2+a\,c\right )}+\frac {B\,e^2\,\ln \left (c\,x^2+a\right )}{2\,c^2}+\frac {A\,d^2\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{2\,a^{3/2}\,\sqrt {c}}+\frac {A\,e^2\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{2\,\sqrt {a}\,c^{3/2}}-\frac {B\,d\,e\,x}{c^2\,x^2+a\,c}+\frac {B\,d\,e\,\mathrm {atan}\left (\frac {\sqrt {c}\,x}{\sqrt {a}}\right )}{\sqrt {a}\,c^{3/2}} \] Input:
int(((A + B*x)*(d + e*x)^2)/(a + c*x^2)^2,x)
Output:
(B*a*e^2)/(2*(a*c^2 + c^3*x^2)) - (B*d^2)/(2*(a*c + c^2*x^2)) - (A*d*e)/(a *c + c^2*x^2) + (A*d^2*x)/(2*(a^2 + a*c*x^2)) - (A*e^2*x)/(2*(a*c + c^2*x^ 2)) + (B*e^2*log(a + c*x^2))/(2*c^2) + (A*d^2*atan((c^(1/2)*x)/a^(1/2)))/( 2*a^(3/2)*c^(1/2)) + (A*e^2*atan((c^(1/2)*x)/a^(1/2)))/(2*a^(1/2)*c^(3/2)) - (B*d*e*x)/(a*c + c^2*x^2) + (B*d*e*atan((c^(1/2)*x)/a^(1/2)))/(a^(1/2)* c^(3/2))
Time = 0.23 (sec) , antiderivative size = 255, normalized size of antiderivative = 2.26 \[ \int \frac {(A+B x) (d+e x)^2}{\left (a+c x^2\right )^2} \, dx=\frac {\sqrt {c}\, \sqrt {a}\, \mathit {atan} \left (\frac {c x}{\sqrt {c}\, \sqrt {a}}\right ) a^{2} e^{2}+2 \sqrt {c}\, \sqrt {a}\, \mathit {atan} \left (\frac {c x}{\sqrt {c}\, \sqrt {a}}\right ) a b d e +\sqrt {c}\, \sqrt {a}\, \mathit {atan} \left (\frac {c x}{\sqrt {c}\, \sqrt {a}}\right ) a c \,d^{2}+\sqrt {c}\, \sqrt {a}\, \mathit {atan} \left (\frac {c x}{\sqrt {c}\, \sqrt {a}}\right ) a c \,e^{2} x^{2}+2 \sqrt {c}\, \sqrt {a}\, \mathit {atan} \left (\frac {c x}{\sqrt {c}\, \sqrt {a}}\right ) b c d e \,x^{2}+\sqrt {c}\, \sqrt {a}\, \mathit {atan} \left (\frac {c x}{\sqrt {c}\, \sqrt {a}}\right ) c^{2} d^{2} x^{2}+\mathrm {log}\left (c \,x^{2}+a \right ) a^{2} b \,e^{2}+\mathrm {log}\left (c \,x^{2}+a \right ) a b c \,e^{2} x^{2}-a^{2} c \,e^{2} x -2 a b c d e x -a b c \,e^{2} x^{2}+a \,c^{2} d^{2} x +2 a \,c^{2} d e \,x^{2}+b \,c^{2} d^{2} x^{2}}{2 a \,c^{2} \left (c \,x^{2}+a \right )} \] Input:
int((B*x+A)*(e*x+d)^2/(c*x^2+a)^2,x)
Output:
(sqrt(c)*sqrt(a)*atan((c*x)/(sqrt(c)*sqrt(a)))*a**2*e**2 + 2*sqrt(c)*sqrt( a)*atan((c*x)/(sqrt(c)*sqrt(a)))*a*b*d*e + sqrt(c)*sqrt(a)*atan((c*x)/(sqr t(c)*sqrt(a)))*a*c*d**2 + sqrt(c)*sqrt(a)*atan((c*x)/(sqrt(c)*sqrt(a)))*a* c*e**2*x**2 + 2*sqrt(c)*sqrt(a)*atan((c*x)/(sqrt(c)*sqrt(a)))*b*c*d*e*x**2 + sqrt(c)*sqrt(a)*atan((c*x)/(sqrt(c)*sqrt(a)))*c**2*d**2*x**2 + log(a + c*x**2)*a**2*b*e**2 + log(a + c*x**2)*a*b*c*e**2*x**2 - a**2*c*e**2*x - 2* a*b*c*d*e*x - a*b*c*e**2*x**2 + a*c**2*d**2*x + 2*a*c**2*d*e*x**2 + b*c**2 *d**2*x**2)/(2*a*c**2*(a + c*x**2))