Integrand size = 42, antiderivative size = 120 \[ \int (d+e x)^m (f+g x) \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=\frac {(c d f-a e g) (d+e x)^{-1+m} \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{1-m}}{c^2 d^2 (1-m)}+\frac {g (d+e x)^{-2+m} \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{2-m}}{c^2 d^2 (2-m)} \] Output:
(-a*e*g+c*d*f)*(e*x+d)^(-1+m)*(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(1-m)/c^2/ d^2/(1-m)+g*(e*x+d)^(-2+m)*(a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^(2-m)/c^2/d^2 /(2-m)
Time = 0.18 (sec) , antiderivative size = 67, normalized size of antiderivative = 0.56 \[ \int (d+e x)^m (f+g x) \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=-\frac {(d+e x)^{-1+m} ((a e+c d x) (d+e x))^{1-m} (a e g+c d (f (-2+m)+g (-1+m) x))}{c^2 d^2 (-2+m) (-1+m)} \] Input:
Integrate[((d + e*x)^m*(f + g*x))/(a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2)^ m,x]
Output:
-(((d + e*x)^(-1 + m)*((a*e + c*d*x)*(d + e*x))^(1 - m)*(a*e*g + c*d*(f*(- 2 + m) + g*(-1 + m)*x)))/(c^2*d^2*(-2 + m)*(-1 + m)))
Time = 0.48 (sec) , antiderivative size = 150, normalized size of antiderivative = 1.25, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.048, Rules used = {1221, 1122}
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 (f+g x) (d+e x)^m \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{-m} \, dx\) |
\(\Big \downarrow \) 1221 |
\(\displaystyle \frac {g (d+e x)^m \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d e (2-m)}-\frac {\left (a e^2 g+c d (d g (1-m)-e f (2-m))\right ) \int (d+e x)^m \left (c d e x^2+\left (c d^2+a e^2\right ) x+a d e\right )^{-m}dx}{c d e (2-m)}\) |
\(\Big \downarrow \) 1122 |
\(\displaystyle \frac {g (d+e x)^m \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m}}{c d e (2-m)}-\frac {(d+e x)^{m-1} \left (x \left (a e^2+c d^2\right )+a d e+c d e x^2\right )^{1-m} \left (a e^2 g+c d (d g (1-m)-e f (2-m))\right )}{c^2 d^2 e (1-m) (2-m)}\) |
Input:
Int[((d + e*x)^m*(f + g*x))/(a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2)^m,x]
Output:
-(((a*e^2*g + c*d*(d*g*(1 - m) - e*f*(2 - m)))*(d + e*x)^(-1 + m)*(a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2)^(1 - m))/(c^2*d^2*e*(1 - m)*(2 - m))) + (g *(d + e*x)^m*(a*d*e + (c*d^2 + a*e^2)*x + c*d*e*x^2)^(1 - m))/(c*d*e*(2 - m))
Int[((d_.) + (e_.)*(x_))^(m_)*((a_.) + (b_.)*(x_) + (c_.)*(x_)^2)^(p_), x_S ymbol] :> Simp[e*(d + e*x)^(m - 1)*((a + b*x + c*x^2)^(p + 1)/(c*(p + 1))), x] /; FreeQ[{a, b, c, d, e, m, p}, x] && EqQ[c*d^2 - b*d*e + a*e^2, 0] && EqQ[m + p, 0]
Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))*((a_.) + (b_.)*(x_) + (c _.)*(x_)^2)^(p_), x_Symbol] :> Simp[g*(d + e*x)^m*((a + b*x + c*x^2)^(p + 1 )/(c*(m + 2*p + 2))), x] + Simp[(m*(g*(c*d - b*e) + c*e*f) + e*(p + 1)*(2*c *f - b*g))/(c*e*(m + 2*p + 2)) Int[(d + e*x)^m*(a + b*x + c*x^2)^p, x], x ] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[c*d^2 - b*d*e + a*e^2, 0] && NeQ[m + 2*p + 2, 0]
Time = 3.75 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.74
method | result | size |
gosper | \(-\frac {\left (e x +d \right )^{m} \left (c d g m x +c f m d -c d g x +a e g -2 d f c \right ) \left (c d x +a e \right ) \left (c d \,x^{2} e +a \,e^{2} x +c \,d^{2} x +a d e \right )^{-m}}{c^{2} d^{2} \left (m^{2}-3 m +2\right )}\) | \(89\) |
orering | \(-\frac {\left (c d g m x +c f m d -c d g x +a e g -2 d f c \right ) \left (c d x +a e \right ) \left (e x +d \right )^{m} {\left (a d e +\left (a \,e^{2}+c \,d^{2}\right ) x +c d \,x^{2} e \right )}^{-m}}{c^{2} d^{2} \left (m^{2}-3 m +2\right )}\) | \(90\) |
risch | \(-\frac {\left (g \,x^{2} c^{2} d^{2} m +a c d e g m x +c^{2} d^{2} f m x -g \,x^{2} c^{2} d^{2}+a c d e f m -2 c^{2} d^{2} f x +a^{2} e^{2} g -2 a c d e f \right ) \left (c d x +a e \right )^{-m} {\mathrm e}^{\frac {i \pi \,\operatorname {csgn}\left (i \left (e x +d \right ) \left (c d x +a e \right )\right ) m \left (-\operatorname {csgn}\left (i \left (e x +d \right ) \left (c d x +a e \right )\right )+\operatorname {csgn}\left (i \left (c d x +a e \right )\right )\right ) \left (-\operatorname {csgn}\left (i \left (e x +d \right ) \left (c d x +a e \right )\right )+\operatorname {csgn}\left (i \left (e x +d \right )\right )\right )}{2}}}{c^{2} d^{2} \left (-2+m \right ) \left (m -1\right )}\) | \(190\) |
parallelrisch | \(-\frac {\left (x^{2} \left (e x +d \right )^{m} c^{2} d^{2} e g \,m^{2}-x^{2} \left (e x +d \right )^{m} c^{2} d^{2} e g m +x \left (e x +d \right )^{m} a c d \,e^{2} g \,m^{2}+x \left (e x +d \right )^{m} c^{2} d^{2} e f \,m^{2}-2 x \left (e x +d \right )^{m} c^{2} d^{2} e f m +\left (e x +d \right )^{m} a c d \,e^{2} f \,m^{2}+\left (e x +d \right )^{m} a^{2} g m \,e^{3}-2 \left (e x +d \right )^{m} a c d \,e^{2} f m \right ) \left (c d \,x^{2} e +a \,e^{2} x +c \,d^{2} x +a d e \right )^{-m}}{m e \,c^{2} d^{2} \left (-2+m \right ) \left (m -1\right )}\) | \(206\) |
Input:
int((e*x+d)^m*(g*x+f)/((a*d*e+(a*e^2+c*d^2)*x+c*d*x^2*e)^m),x,method=_RETU RNVERBOSE)
Output:
-(e*x+d)^m*(c*d*g*m*x+c*d*f*m-c*d*g*x+a*e*g-2*c*d*f)*(c*d*x+a*e)/((c*d*e*x ^2+a*e^2*x+c*d^2*x+a*d*e)^m)/c^2/d^2/(m^2-3*m+2)
Time = 0.11 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.21 \[ \int (d+e x)^m (f+g x) \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=-\frac {{\left (a c d e f m - 2 \, a c d e f + a^{2} e^{2} g + {\left (c^{2} d^{2} g m - c^{2} d^{2} g\right )} x^{2} - {\left (2 \, c^{2} d^{2} f - {\left (c^{2} d^{2} f + a c d e g\right )} m\right )} x\right )} {\left (e x + d\right )}^{m}}{{\left (c^{2} d^{2} m^{2} - 3 \, c^{2} d^{2} m + 2 \, c^{2} d^{2}\right )} {\left (c d e x^{2} + a d e + {\left (c d^{2} + a e^{2}\right )} x\right )}^{m}} \] Input:
integrate((e*x+d)^m*(g*x+f)/((a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^m),x, algor ithm="fricas")
Output:
-(a*c*d*e*f*m - 2*a*c*d*e*f + a^2*e^2*g + (c^2*d^2*g*m - c^2*d^2*g)*x^2 - (2*c^2*d^2*f - (c^2*d^2*f + a*c*d*e*g)*m)*x)*(e*x + d)^m/((c^2*d^2*m^2 - 3 *c^2*d^2*m + 2*c^2*d^2)*(c*d*e*x^2 + a*d*e + (c*d^2 + a*e^2)*x)^m)
Exception generated. \[ \int (d+e x)^m (f+g x) \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=\text {Exception raised: TypeError} \] Input:
integrate((e*x+d)**m*(g*x+f)/((a*d*e+(a*e**2+c*d**2)*x+c*d*e*x**2)**m),x)
Output:
Exception raised: TypeError >> Invalid NaN comparison
Time = 0.05 (sec) , antiderivative size = 94, normalized size of antiderivative = 0.78 \[ \int (d+e x)^m (f+g x) \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=-\frac {{\left (c d x + a e\right )} f}{{\left (c d x + a e\right )}^{m} c d {\left (m - 1\right )}} - \frac {{\left (c^{2} d^{2} {\left (m - 1\right )} x^{2} + a c d e m x + a^{2} e^{2}\right )} g}{{\left (m^{2} - 3 \, m + 2\right )} {\left (c d x + a e\right )}^{m} c^{2} d^{2}} \] Input:
integrate((e*x+d)^m*(g*x+f)/((a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^m),x, algor ithm="maxima")
Output:
-(c*d*x + a*e)*f/((c*d*x + a*e)^m*c*d*(m - 1)) - (c^2*d^2*(m - 1)*x^2 + a* c*d*e*m*x + a^2*e^2)*g/((m^2 - 3*m + 2)*(c*d*x + a*e)^m*c^2*d^2)
Leaf count of result is larger than twice the leaf count of optimal. 347 vs. \(2 (118) = 236\).
Time = 0.22 (sec) , antiderivative size = 347, normalized size of antiderivative = 2.89 \[ \int (d+e x)^m (f+g x) \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=-\frac {{\left (e x + d\right )}^{m} c^{2} d^{2} g m x^{2} e^{\left (-m \log \left (c d x + a e\right ) - m \log \left (e x + d\right )\right )} + {\left (e x + d\right )}^{m} c^{2} d^{2} f m x e^{\left (-m \log \left (c d x + a e\right ) - m \log \left (e x + d\right )\right )} + {\left (e x + d\right )}^{m} a c d e g m x e^{\left (-m \log \left (c d x + a e\right ) - m \log \left (e x + d\right )\right )} - {\left (e x + d\right )}^{m} c^{2} d^{2} g x^{2} e^{\left (-m \log \left (c d x + a e\right ) - m \log \left (e x + d\right )\right )} + {\left (e x + d\right )}^{m} a c d e f m e^{\left (-m \log \left (c d x + a e\right ) - m \log \left (e x + d\right )\right )} - 2 \, {\left (e x + d\right )}^{m} c^{2} d^{2} f x e^{\left (-m \log \left (c d x + a e\right ) - m \log \left (e x + d\right )\right )} - 2 \, {\left (e x + d\right )}^{m} a c d e f e^{\left (-m \log \left (c d x + a e\right ) - m \log \left (e x + d\right )\right )} + {\left (e x + d\right )}^{m} a^{2} e^{2} g e^{\left (-m \log \left (c d x + a e\right ) - m \log \left (e x + d\right )\right )}}{c^{2} d^{2} m^{2} - 3 \, c^{2} d^{2} m + 2 \, c^{2} d^{2}} \] Input:
integrate((e*x+d)^m*(g*x+f)/((a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^m),x, algor ithm="giac")
Output:
-((e*x + d)^m*c^2*d^2*g*m*x^2*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) + ( e*x + d)^m*c^2*d^2*f*m*x*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) + (e*x + d)^m*a*c*d*e*g*m*x*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) - (e*x + d)^m *c^2*d^2*g*x^2*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) + (e*x + d)^m*a*c* d*e*f*m*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) - 2*(e*x + d)^m*c^2*d^2*f *x*e^(-m*log(c*d*x + a*e) - m*log(e*x + d)) - 2*(e*x + d)^m*a*c*d*e*f*e^(- m*log(c*d*x + a*e) - m*log(e*x + d)) + (e*x + d)^m*a^2*e^2*g*e^(-m*log(c*d *x + a*e) - m*log(e*x + d)))/(c^2*d^2*m^2 - 3*c^2*d^2*m + 2*c^2*d^2)
Time = 6.11 (sec) , antiderivative size = 139, normalized size of antiderivative = 1.16 \[ \int (d+e x)^m (f+g x) \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=-\frac {\frac {g\,x^2\,\left (m-1\right )\,{\left (d+e\,x\right )}^m}{m^2-3\,m+2}+\frac {x\,{\left (d+e\,x\right )}^m\,\left (a\,e\,g\,m-2\,c\,d\,f+c\,d\,f\,m\right )}{c\,d\,\left (m^2-3\,m+2\right )}+\frac {a\,e\,{\left (d+e\,x\right )}^m\,\left (a\,e\,g-2\,c\,d\,f+c\,d\,f\,m\right )}{c^2\,d^2\,\left (m^2-3\,m+2\right )}}{{\left (c\,d\,e\,x^2+\left (c\,d^2+a\,e^2\right )\,x+a\,d\,e\right )}^m} \] Input:
int(((f + g*x)*(d + e*x)^m)/(x*(a*e^2 + c*d^2) + a*d*e + c*d*e*x^2)^m,x)
Output:
-((g*x^2*(m - 1)*(d + e*x)^m)/(m^2 - 3*m + 2) + (x*(d + e*x)^m*(a*e*g*m - 2*c*d*f + c*d*f*m))/(c*d*(m^2 - 3*m + 2)) + (a*e*(d + e*x)^m*(a*e*g - 2*c* d*f + c*d*f*m))/(c^2*d^2*(m^2 - 3*m + 2)))/(x*(a*e^2 + c*d^2) + a*d*e + c* d*e*x^2)^m
\[ \int (d+e x)^m (f+g x) \left (a d e+\left (c d^2+a e^2\right ) x+c d e x^2\right )^{-m} \, dx=\left (\int \frac {\left (e x +d \right )^{m}}{\left (c d e \,x^{2}+a \,e^{2} x +c \,d^{2} x +a d e \right )^{m}}d x \right ) f +\left (\int \frac {\left (e x +d \right )^{m} x}{\left (c d e \,x^{2}+a \,e^{2} x +c \,d^{2} x +a d e \right )^{m}}d x \right ) g \] Input:
int((e*x+d)^m*(g*x+f)/((a*d*e+(a*e^2+c*d^2)*x+c*d*e*x^2)^m),x)
Output:
int((d + e*x)**m/(a*d*e + a*e**2*x + c*d**2*x + c*d*e*x**2)**m,x)*f + int( ((d + e*x)**m*x)/(a*d*e + a*e**2*x + c*d**2*x + c*d*e*x**2)**m,x)*g