Integrand size = 16, antiderivative size = 75 \[ \int (c+d x) (a+b \tanh (e+f x)) \, dx=\frac {a (c+d x)^2}{2 d}-\frac {b (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (1+e^{2 (e+f x)}\right )}{f}+\frac {b d \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{2 f^2} \] Output:
1/2*a*(d*x+c)^2/d-1/2*b*(d*x+c)^2/d+b*(d*x+c)*ln(1+exp(2*f*x+2*e))/f+1/2*b *d*polylog(2,-exp(2*f*x+2*e))/f^2
Time = 0.10 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.96 \[ \int (c+d x) (a+b \tanh (e+f x)) \, dx=\frac {f \left (f x (2 a c+a d x+b d x)+2 b d x \log \left (1+e^{-2 (e+f x)}\right )+2 b c \log (\cosh (e+f x))\right )-b d \operatorname {PolyLog}\left (2,-e^{-2 (e+f x)}\right )}{2 f^2} \] Input:
Integrate[(c + d*x)*(a + b*Tanh[e + f*x]),x]
Output:
(f*(f*x*(2*a*c + a*d*x + b*d*x) + 2*b*d*x*Log[1 + E^(-2*(e + f*x))] + 2*b* c*Log[Cosh[e + f*x]]) - b*d*PolyLog[2, -E^(-2*(e + f*x))])/(2*f^2)
Time = 0.33 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.188, Rules used = {3042, 4205, 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 (c+d x) (a+b \tanh (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x) (a-i b \tan (i e+i f x))dx\) |
\(\Big \downarrow \) 4205 |
\(\displaystyle \int (a (c+d x)+b (c+d x) \tanh (e+f x))dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a (c+d x)^2}{2 d}+\frac {b (c+d x) \log \left (e^{2 (e+f x)}+1\right )}{f}-\frac {b (c+d x)^2}{2 d}+\frac {b d \operatorname {PolyLog}\left (2,-e^{2 (e+f x)}\right )}{2 f^2}\) |
Input:
Int[(c + d*x)*(a + b*Tanh[e + f*x]),x]
Output:
(a*(c + d*x)^2)/(2*d) - (b*(c + d*x)^2)/(2*d) + (b*(c + d*x)*Log[1 + E^(2* (e + f*x))])/f + (b*d*PolyLog[2, -E^(2*(e + f*x))])/(2*f^2)
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Tan[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[m, 0] && IGtQ[n, 0]
Time = 0.46 (sec) , antiderivative size = 129, normalized size of antiderivative = 1.72
method | result | size |
risch | \(\frac {a d \,x^{2}}{2}+a c x -\frac {b d \,x^{2}}{2}+b c x -\frac {2 b c \ln \left ({\mathrm e}^{f x +e}\right )}{f}+\frac {b c \ln \left (1+{\mathrm e}^{2 f x +2 e}\right )}{f}-\frac {2 b d e x}{f}-\frac {b d \,e^{2}}{f^{2}}+\frac {b d \ln \left (1+{\mathrm e}^{2 f x +2 e}\right ) x}{f}+\frac {b d \operatorname {polylog}\left (2, -{\mathrm e}^{2 f x +2 e}\right )}{2 f^{2}}+\frac {2 b d e \ln \left ({\mathrm e}^{f x +e}\right )}{f^{2}}\) | \(129\) |
Input:
int((d*x+c)*(a+b*tanh(f*x+e)),x,method=_RETURNVERBOSE)
Output:
1/2*a*d*x^2+a*c*x-1/2*b*d*x^2+b*c*x-2/f*b*c*ln(exp(f*x+e))+1/f*b*c*ln(1+ex p(2*f*x+2*e))-2/f*b*d*e*x-1/f^2*b*d*e^2+1/f*b*d*ln(1+exp(2*f*x+2*e))*x+1/2 *b*d*polylog(2,-exp(2*f*x+2*e))/f^2+2/f^2*b*d*e*ln(exp(f*x+e))
Result contains complex when optimal does not.
Time = 0.09 (sec) , antiderivative size = 191, normalized size of antiderivative = 2.55 \[ \int (c+d x) (a+b \tanh (e+f x)) \, dx=\frac {{\left (a - b\right )} d f^{2} x^{2} + 2 \, {\left (a - b\right )} c f^{2} x + 2 \, b d {\rm Li}_2\left (i \, \cosh \left (f x + e\right ) + i \, \sinh \left (f x + e\right )\right ) + 2 \, b d {\rm Li}_2\left (-i \, \cosh \left (f x + e\right ) - i \, \sinh \left (f x + e\right )\right ) - 2 \, {\left (b d e - b c f\right )} \log \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right ) + i\right ) - 2 \, {\left (b d e - b c f\right )} \log \left (\cosh \left (f x + e\right ) + \sinh \left (f x + e\right ) - i\right ) + 2 \, {\left (b d f x + b d e\right )} \log \left (i \, \cosh \left (f x + e\right ) + i \, \sinh \left (f x + e\right ) + 1\right ) + 2 \, {\left (b d f x + b d e\right )} \log \left (-i \, \cosh \left (f x + e\right ) - i \, \sinh \left (f x + e\right ) + 1\right )}{2 \, f^{2}} \] Input:
integrate((d*x+c)*(a+b*tanh(f*x+e)),x, algorithm="fricas")
Output:
1/2*((a - b)*d*f^2*x^2 + 2*(a - b)*c*f^2*x + 2*b*d*dilog(I*cosh(f*x + e) + I*sinh(f*x + e)) + 2*b*d*dilog(-I*cosh(f*x + e) - I*sinh(f*x + e)) - 2*(b *d*e - b*c*f)*log(cosh(f*x + e) + sinh(f*x + e) + I) - 2*(b*d*e - b*c*f)*l og(cosh(f*x + e) + sinh(f*x + e) - I) + 2*(b*d*f*x + b*d*e)*log(I*cosh(f*x + e) + I*sinh(f*x + e) + 1) + 2*(b*d*f*x + b*d*e)*log(-I*cosh(f*x + e) - I*sinh(f*x + e) + 1))/f^2
\[ \int (c+d x) (a+b \tanh (e+f x)) \, dx=\int \left (a + b \tanh {\left (e + f x \right )}\right ) \left (c + d x\right )\, dx \] Input:
integrate((d*x+c)*(a+b*tanh(f*x+e)),x)
Output:
Integral((a + b*tanh(e + f*x))*(c + d*x), x)
\[ \int (c+d x) (a+b \tanh (e+f x)) \, dx=\int { {\left (d x + c\right )} {\left (b \tanh \left (f x + e\right ) + a\right )} \,d x } \] Input:
integrate((d*x+c)*(a+b*tanh(f*x+e)),x, algorithm="maxima")
Output:
1/2*a*d*x^2 + 1/2*(x^2 - 4*integrate(x/(e^(2*f*x + 2*e) + 1), x))*b*d + a* c*x + b*c*log(cosh(f*x + e))/f
\[ \int (c+d x) (a+b \tanh (e+f x)) \, dx=\int { {\left (d x + c\right )} {\left (b \tanh \left (f x + e\right ) + a\right )} \,d x } \] Input:
integrate((d*x+c)*(a+b*tanh(f*x+e)),x, algorithm="giac")
Output:
integrate((d*x + c)*(b*tanh(f*x + e) + a), x)
Timed out. \[ \int (c+d x) (a+b \tanh (e+f x)) \, dx=\int \left (a+b\,\mathrm {tanh}\left (e+f\,x\right )\right )\,\left (c+d\,x\right ) \,d x \] Input:
int((a + b*tanh(e + f*x))*(c + d*x),x)
Output:
int((a + b*tanh(e + f*x))*(c + d*x), x)
\[ \int (c+d x) (a+b \tanh (e+f x)) \, dx=\frac {4 e^{2 e} \left (\int \frac {e^{2 f x} x}{e^{2 f x +2 e}+1}d x \right ) b d f +2 \,\mathrm {log}\left (e^{2 f x +2 e}+1\right ) b c +2 a c f x +a d f \,x^{2}-2 b c f x -b d f \,x^{2}}{2 f} \] Input:
int((d*x+c)*(a+b*tanh(f*x+e)),x)
Output:
(4*e**(2*e)*int((e**(2*f*x)*x)/(e**(2*e + 2*f*x) + 1),x)*b*d*f + 2*log(e** (2*e + 2*f*x) + 1)*b*c + 2*a*c*f*x + a*d*f*x**2 - 2*b*c*f*x - b*d*f*x**2)/ (2*f)