Integrand size = 24, antiderivative size = 98 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=-\frac {b (f g-e h) p q x}{2 f}-\frac {b p q (g+h x)^2}{4 h}-\frac {b (f g-e h)^2 p q \log (e+f x)}{2 f^2 h}+\frac {(g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 h} \] Output:
-1/2*b*(-e*h+f*g)*p*q*x/f-1/4*b*p*q*(h*x+g)^2/h-1/2*b*(-e*h+f*g)^2*p*q*ln( f*x+e)/f^2/h+1/2*(h*x+g)^2*(a+b*ln(c*(d*(f*x+e)^p)^q))/h
Time = 0.06 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.15 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=a g x-b g p q x+\frac {b e h p q x}{2 f}+\frac {1}{2} a h x^2-\frac {1}{4} b h p q x^2-\frac {b e^2 h p q \log (e+f x)}{2 f^2}+\frac {1}{2} b h x^2 \log \left (c \left (d (e+f x)^p\right )^q\right )+\frac {b g (e+f x) \log \left (c \left (d (e+f x)^p\right )^q\right )}{f} \] Input:
Integrate[(g + h*x)*(a + b*Log[c*(d*(e + f*x)^p)^q]),x]
Output:
a*g*x - b*g*p*q*x + (b*e*h*p*q*x)/(2*f) + (a*h*x^2)/2 - (b*h*p*q*x^2)/4 - (b*e^2*h*p*q*Log[e + f*x])/(2*f^2) + (b*h*x^2*Log[c*(d*(e + f*x)^p)^q])/2 + (b*g*(e + f*x)*Log[c*(d*(e + f*x)^p)^q])/f
Time = 0.57 (sec) , antiderivative size = 93, normalized size of antiderivative = 0.95, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {2895, 2842, 49, 2009}
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 (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx\) |
\(\Big \downarrow \) 2895 |
\(\displaystyle \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )dx\) |
\(\Big \downarrow \) 2842 |
\(\displaystyle \frac {(g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 h}-\frac {b f p q \int \frac {(g+h x)^2}{e+f x}dx}{2 h}\) |
\(\Big \downarrow \) 49 |
\(\displaystyle \frac {(g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 h}-\frac {b f p q \int \left (\frac {(f g-e h)^2}{f^2 (e+f x)}+\frac {h (f g-e h)}{f^2}+\frac {h (g+h x)}{f}\right )dx}{2 h}\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {(g+h x)^2 \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right )}{2 h}-\frac {b f p q \left (\frac {(f g-e h)^2 \log (e+f x)}{f^3}+\frac {h x (f g-e h)}{f^2}+\frac {(g+h x)^2}{2 f}\right )}{2 h}\) |
Input:
Int[(g + h*x)*(a + b*Log[c*(d*(e + f*x)^p)^q]),x]
Output:
-1/2*(b*f*p*q*((h*(f*g - e*h)*x)/f^2 + (g + h*x)^2/(2*f) + ((f*g - e*h)^2* Log[e + f*x])/f^3))/h + ((g + h*x)^2*(a + b*Log[c*(d*(e + f*x)^p)^q]))/(2* h)
Int[((a_.) + (b_.)*(x_))^(m_.)*((c_.) + (d_.)*(x_))^(n_.), x_Symbol] :> Int [ExpandIntegrand[(a + b*x)^m*(c + d*x)^n, x], x] /; FreeQ[{a, b, c, d}, x] && IGtQ[m, 0] && IGtQ[m + n + 2, 0]
Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))*((f_.) + (g_.)*(x_ ))^(q_.), x_Symbol] :> Simp[(f + g*x)^(q + 1)*((a + b*Log[c*(d + e*x)^n])/( g*(q + 1))), x] - Simp[b*e*(n/(g*(q + 1))) Int[(f + g*x)^(q + 1)/(d + e*x ), x], x] /; FreeQ[{a, b, c, d, e, f, g, n, q}, x] && NeQ[e*f - d*g, 0] && NeQ[q, -1]
Int[((a_.) + Log[(c_.)*((d_.)*((e_.) + (f_.)*(x_))^(m_.))^(n_)]*(b_.))^(p_. )*(u_.), x_Symbol] :> Subst[Int[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x], c*d^n*(e + f*x)^(m*n), c*(d*(e + f*x)^m)^n] /; FreeQ[{a, b, c, d, e, f, m, n, p}, x] && !IntegerQ[n] && !(EqQ[d, 1] && EqQ[m, 1]) && IntegralFreeQ[ IntHide[u*(a + b*Log[c*d^n*(e + f*x)^(m*n)])^p, x]]
Time = 0.65 (sec) , antiderivative size = 173, normalized size of antiderivative = 1.77
method | result | size |
parallelrisch | \(-\frac {x^{2} b \,f^{2} h p q +2 \ln \left (f x +e \right ) b \,e^{2} h p q -8 \ln \left (f x +e \right ) b e f g p q -2 x^{2} \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b \,f^{2} h -2 x b e f h p q +4 x b \,f^{2} g p q -2 x^{2} a \,f^{2} h -4 x \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b \,f^{2} g +2 b \,e^{2} h p q -4 b e f g p q -4 x a \,f^{2} g +4 \ln \left (c \left (d \left (f x +e \right )^{p}\right )^{q}\right ) b e f g +4 a e f g}{4 f^{2}}\) | \(173\) |
Input:
int((h*x+g)*(a+b*ln(c*(d*(f*x+e)^p)^q)),x,method=_RETURNVERBOSE)
Output:
-1/4*(x^2*b*f^2*h*p*q+2*ln(f*x+e)*b*e^2*h*p*q-8*ln(f*x+e)*b*e*f*g*p*q-2*x^ 2*ln(c*(d*(f*x+e)^p)^q)*b*f^2*h-2*x*b*e*f*h*p*q+4*x*b*f^2*g*p*q-2*x^2*a*f^ 2*h-4*x*ln(c*(d*(f*x+e)^p)^q)*b*f^2*g+2*b*e^2*h*p*q-4*b*e*f*g*p*q-4*x*a*f^ 2*g+4*ln(c*(d*(f*x+e)^p)^q)*b*e*f*g+4*a*e*f*g)/f^2
Time = 0.08 (sec) , antiderivative size = 148, normalized size of antiderivative = 1.51 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=-\frac {{\left (b f^{2} h p q - 2 \, a f^{2} h\right )} x^{2} - 2 \, {\left (2 \, a f^{2} g - {\left (2 \, b f^{2} g - b e f h\right )} p q\right )} x - 2 \, {\left (b f^{2} h p q x^{2} + 2 \, b f^{2} g p q x + {\left (2 \, b e f g - b e^{2} h\right )} p q\right )} \log \left (f x + e\right ) - 2 \, {\left (b f^{2} h x^{2} + 2 \, b f^{2} g x\right )} \log \left (c\right ) - 2 \, {\left (b f^{2} h q x^{2} + 2 \, b f^{2} g q x\right )} \log \left (d\right )}{4 \, f^{2}} \] Input:
integrate((h*x+g)*(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="fricas")
Output:
-1/4*((b*f^2*h*p*q - 2*a*f^2*h)*x^2 - 2*(2*a*f^2*g - (2*b*f^2*g - b*e*f*h) *p*q)*x - 2*(b*f^2*h*p*q*x^2 + 2*b*f^2*g*p*q*x + (2*b*e*f*g - b*e^2*h)*p*q )*log(f*x + e) - 2*(b*f^2*h*x^2 + 2*b*f^2*g*x)*log(c) - 2*(b*f^2*h*q*x^2 + 2*b*f^2*g*q*x)*log(d))/f^2
Time = 0.66 (sec) , antiderivative size = 156, normalized size of antiderivative = 1.59 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=\begin {cases} a g x + \frac {a h x^{2}}{2} - \frac {b e^{2} h \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{2 f^{2}} + \frac {b e g \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{f} + \frac {b e h p q x}{2 f} - b g p q x + b g x \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )} - \frac {b h p q x^{2}}{4} + \frac {b h x^{2} \log {\left (c \left (d \left (e + f x\right )^{p}\right )^{q} \right )}}{2} & \text {for}\: f \neq 0 \\\left (a + b \log {\left (c \left (d e^{p}\right )^{q} \right )}\right ) \left (g x + \frac {h x^{2}}{2}\right ) & \text {otherwise} \end {cases} \] Input:
integrate((h*x+g)*(a+b*ln(c*(d*(f*x+e)**p)**q)),x)
Output:
Piecewise((a*g*x + a*h*x**2/2 - b*e**2*h*log(c*(d*(e + f*x)**p)**q)/(2*f** 2) + b*e*g*log(c*(d*(e + f*x)**p)**q)/f + b*e*h*p*q*x/(2*f) - b*g*p*q*x + b*g*x*log(c*(d*(e + f*x)**p)**q) - b*h*p*q*x**2/4 + b*h*x**2*log(c*(d*(e + f*x)**p)**q)/2, Ne(f, 0)), ((a + b*log(c*(d*e**p)**q))*(g*x + h*x**2/2), True))
Time = 0.04 (sec) , antiderivative size = 112, normalized size of antiderivative = 1.14 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=-b f g p q {\left (\frac {x}{f} - \frac {e \log \left (f x + e\right )}{f^{2}}\right )} - \frac {1}{4} \, b f h p q {\left (\frac {2 \, e^{2} \log \left (f x + e\right )}{f^{3}} + \frac {f x^{2} - 2 \, e x}{f^{2}}\right )} + \frac {1}{2} \, b h x^{2} \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + \frac {1}{2} \, a h x^{2} + b g x \log \left (\left ({\left (f x + e\right )}^{p} d\right )^{q} c\right ) + a g x \] Input:
integrate((h*x+g)*(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="maxima")
Output:
-b*f*g*p*q*(x/f - e*log(f*x + e)/f^2) - 1/4*b*f*h*p*q*(2*e^2*log(f*x + e)/ f^3 + (f*x^2 - 2*e*x)/f^2) + 1/2*b*h*x^2*log(((f*x + e)^p*d)^q*c) + 1/2*a* h*x^2 + b*g*x*log(((f*x + e)^p*d)^q*c) + a*g*x
Leaf count of result is larger than twice the leaf count of optimal. 236 vs. \(2 (90) = 180\).
Time = 0.13 (sec) , antiderivative size = 236, normalized size of antiderivative = 2.41 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=\frac {{\left (f x + e\right )} b g p q \log \left (f x + e\right )}{f} + \frac {{\left (f x + e\right )}^{2} b h p q \log \left (f x + e\right )}{2 \, f^{2}} - \frac {{\left (f x + e\right )} b e h p q \log \left (f x + e\right )}{f^{2}} - \frac {{\left (f x + e\right )} b g p q}{f} - \frac {{\left (f x + e\right )}^{2} b h p q}{4 \, f^{2}} + \frac {{\left (f x + e\right )} b e h p q}{f^{2}} + \frac {{\left (f x + e\right )} b g q \log \left (d\right )}{f} + \frac {{\left (f x + e\right )}^{2} b h q \log \left (d\right )}{2 \, f^{2}} - \frac {{\left (f x + e\right )} b e h q \log \left (d\right )}{f^{2}} + \frac {{\left (f x + e\right )} b g \log \left (c\right )}{f} + \frac {{\left (f x + e\right )}^{2} b h \log \left (c\right )}{2 \, f^{2}} - \frac {{\left (f x + e\right )} b e h \log \left (c\right )}{f^{2}} + \frac {{\left (f x + e\right )} a g}{f} + \frac {{\left (f x + e\right )}^{2} a h}{2 \, f^{2}} - \frac {{\left (f x + e\right )} a e h}{f^{2}} \] Input:
integrate((h*x+g)*(a+b*log(c*(d*(f*x+e)^p)^q)),x, algorithm="giac")
Output:
(f*x + e)*b*g*p*q*log(f*x + e)/f + 1/2*(f*x + e)^2*b*h*p*q*log(f*x + e)/f^ 2 - (f*x + e)*b*e*h*p*q*log(f*x + e)/f^2 - (f*x + e)*b*g*p*q/f - 1/4*(f*x + e)^2*b*h*p*q/f^2 + (f*x + e)*b*e*h*p*q/f^2 + (f*x + e)*b*g*q*log(d)/f + 1/2*(f*x + e)^2*b*h*q*log(d)/f^2 - (f*x + e)*b*e*h*q*log(d)/f^2 + (f*x + e )*b*g*log(c)/f + 1/2*(f*x + e)^2*b*h*log(c)/f^2 - (f*x + e)*b*e*h*log(c)/f ^2 + (f*x + e)*a*g/f + 1/2*(f*x + e)^2*a*h/f^2 - (f*x + e)*a*e*h/f^2
Time = 26.09 (sec) , antiderivative size = 113, normalized size of antiderivative = 1.15 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=\ln \left (c\,{\left (d\,{\left (e+f\,x\right )}^p\right )}^q\right )\,\left (\frac {b\,h\,x^2}{2}+b\,g\,x\right )+x\,\left (\frac {2\,a\,e\,h+2\,a\,f\,g-2\,b\,f\,g\,p\,q}{2\,f}-\frac {e\,h\,\left (2\,a-b\,p\,q\right )}{2\,f}\right )+\frac {h\,x^2\,\left (2\,a-b\,p\,q\right )}{4}-\frac {\ln \left (e+f\,x\right )\,\left (b\,e^2\,h\,p\,q-2\,b\,e\,f\,g\,p\,q\right )}{2\,f^2} \] Input:
int((g + h*x)*(a + b*log(c*(d*(e + f*x)^p)^q)),x)
Output:
log(c*(d*(e + f*x)^p)^q)*((b*h*x^2)/2 + b*g*x) + x*((2*a*e*h + 2*a*f*g - 2 *b*f*g*p*q)/(2*f) - (e*h*(2*a - b*p*q))/(2*f)) + (h*x^2*(2*a - b*p*q))/4 - (log(e + f*x)*(b*e^2*h*p*q - 2*b*e*f*g*p*q))/(2*f^2)
Time = 0.18 (sec) , antiderivative size = 146, normalized size of antiderivative = 1.49 \[ \int (g+h x) \left (a+b \log \left (c \left (d (e+f x)^p\right )^q\right )\right ) \, dx=\frac {-2 \,\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b \,e^{2} h +4 \,\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b e f g +4 \,\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b \,f^{2} g x +2 \,\mathrm {log}\left (d^{q} \left (f x +e \right )^{p q} c \right ) b \,f^{2} h \,x^{2}+4 a \,f^{2} g x +2 a \,f^{2} h \,x^{2}+2 b e f h p q x -4 b \,f^{2} g p q x -b \,f^{2} h p q \,x^{2}}{4 f^{2}} \] Input:
int((h*x+g)*(a+b*log(c*(d*(f*x+e)^p)^q)),x)
Output:
( - 2*log(d**q*(e + f*x)**(p*q)*c)*b*e**2*h + 4*log(d**q*(e + f*x)**(p*q)* c)*b*e*f*g + 4*log(d**q*(e + f*x)**(p*q)*c)*b*f**2*g*x + 2*log(d**q*(e + f *x)**(p*q)*c)*b*f**2*h*x**2 + 4*a*f**2*g*x + 2*a*f**2*h*x**2 + 2*b*e*f*h*p *q*x - 4*b*f**2*g*p*q*x - b*f**2*h*p*q*x**2)/(4*f**2)