Integrand size = 20, antiderivative size = 171 \[ \int (c+d x)^2 \cos (a+b x) \cot (a+b x) \, dx=-\frac {2 (c+d x)^2 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {2 d^2 \cos (a+b x)}{b^3}+\frac {(c+d x)^2 \cos (a+b x)}{b}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b^2}-\frac {2 d^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^3}+\frac {2 d^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^3}-\frac {2 d (c+d x) \sin (a+b x)}{b^2} \] Output:
-2*(d*x+c)^2*arctanh(exp(I*(b*x+a)))/b-2*d^2*cos(b*x+a)/b^3+(d*x+c)^2*cos( b*x+a)/b+2*I*d*(d*x+c)*polylog(2,-exp(I*(b*x+a)))/b^2-2*I*d*(d*x+c)*polylo g(2,exp(I*(b*x+a)))/b^2-2*d^2*polylog(3,-exp(I*(b*x+a)))/b^3+2*d^2*polylog (3,exp(I*(b*x+a)))/b^3-2*d*(d*x+c)*sin(b*x+a)/b^2
Time = 0.53 (sec) , antiderivative size = 221, normalized size of antiderivative = 1.29 \[ \int (c+d x)^2 \cos (a+b x) \cot (a+b x) \, dx=\frac {b^2 (c+d x)^2 \log \left (1-e^{i (a+b x)}\right )-b^2 (c+d x)^2 \log \left (1+e^{i (a+b x)}\right )+2 i b d (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )-2 i b d (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )-2 d^2 \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )+2 d^2 \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )+\cos (b x) \left (\left (-2 d^2+b^2 (c+d x)^2\right ) \cos (a)-2 b d (c+d x) \sin (a)\right )-\left (2 b d (c+d x) \cos (a)+\left (-2 d^2+b^2 (c+d x)^2\right ) \sin (a)\right ) \sin (b x)}{b^3} \] Input:
Integrate[(c + d*x)^2*Cos[a + b*x]*Cot[a + b*x],x]
Output:
(b^2*(c + d*x)^2*Log[1 - E^(I*(a + b*x))] - b^2*(c + d*x)^2*Log[1 + E^(I*( a + b*x))] + (2*I)*b*d*(c + d*x)*PolyLog[2, -E^(I*(a + b*x))] - (2*I)*b*d* (c + d*x)*PolyLog[2, E^(I*(a + b*x))] - 2*d^2*PolyLog[3, -E^(I*(a + b*x))] + 2*d^2*PolyLog[3, E^(I*(a + b*x))] + Cos[b*x]*((-2*d^2 + b^2*(c + d*x)^2 )*Cos[a] - 2*b*d*(c + d*x)*Sin[a]) - (2*b*d*(c + d*x)*Cos[a] + (-2*d^2 + b ^2*(c + d*x)^2)*Sin[a])*Sin[b*x])/b^3
Time = 0.83 (sec) , antiderivative size = 181, normalized size of antiderivative = 1.06, number of steps used = 13, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.600, Rules used = {4908, 3042, 3777, 3042, 3777, 25, 3042, 3118, 4671, 3011, 2720, 7143}
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)^2 \cos (a+b x) \cot (a+b x) \, dx\) |
\(\Big \downarrow \) 4908 |
\(\displaystyle \int (c+d x)^2 \csc (a+b x)dx-\int (c+d x)^2 \sin (a+b x)dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^2 \csc (a+b x)dx-\int (c+d x)^2 \sin (a+b x)dx\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle -\frac {2 d \int (c+d x) \cos (a+b x)dx}{b}+\int (c+d x)^2 \csc (a+b x)dx+\frac {(c+d x)^2 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {2 d \int (c+d x) \sin \left (a+b x+\frac {\pi }{2}\right )dx}{b}+\int (c+d x)^2 \csc (a+b x)dx+\frac {(c+d x)^2 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle -\frac {2 d \left (\frac {d \int -\sin (a+b x)dx}{b}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}+\int (c+d x)^2 \csc (a+b x)dx+\frac {(c+d x)^2 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {2 d \left (\frac {(c+d x) \sin (a+b x)}{b}-\frac {d \int \sin (a+b x)dx}{b}\right )}{b}+\int (c+d x)^2 \csc (a+b x)dx+\frac {(c+d x)^2 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {2 d \left (\frac {(c+d x) \sin (a+b x)}{b}-\frac {d \int \sin (a+b x)dx}{b}\right )}{b}+\int (c+d x)^2 \csc (a+b x)dx+\frac {(c+d x)^2 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3118 |
\(\displaystyle \int (c+d x)^2 \csc (a+b x)dx-\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}+\frac {(c+d x)^2 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 4671 |
\(\displaystyle -\frac {2 d \int (c+d x) \log \left (1-e^{i (a+b x)}\right )dx}{b}+\frac {2 d \int (c+d x) \log \left (1+e^{i (a+b x)}\right )dx}{b}-\frac {2 (c+d x)^2 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}+\frac {(c+d x)^2 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle \frac {2 d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {i d \int \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )dx}{b}\right )}{b}-\frac {2 d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {i d \int \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )dx}{b}\right )}{b}-\frac {2 (c+d x)^2 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}+\frac {(c+d x)^2 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \frac {2 d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {d \int e^{-i (a+b x)} \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )de^{i (a+b x)}}{b^2}\right )}{b}-\frac {2 d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {d \int e^{-i (a+b x)} \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )de^{i (a+b x)}}{b^2}\right )}{b}-\frac {2 (c+d x)^2 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}-\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}+\frac {(c+d x)^2 \cos (a+b x)}{b}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle -\frac {2 (c+d x)^2 \text {arctanh}\left (e^{i (a+b x)}\right )}{b}+\frac {2 d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,-e^{i (a+b x)}\right )}{b}-\frac {d \operatorname {PolyLog}\left (3,-e^{i (a+b x)}\right )}{b^2}\right )}{b}-\frac {2 d \left (\frac {i (c+d x) \operatorname {PolyLog}\left (2,e^{i (a+b x)}\right )}{b}-\frac {d \operatorname {PolyLog}\left (3,e^{i (a+b x)}\right )}{b^2}\right )}{b}-\frac {2 d \left (\frac {d \cos (a+b x)}{b^2}+\frac {(c+d x) \sin (a+b x)}{b}\right )}{b}+\frac {(c+d x)^2 \cos (a+b x)}{b}\) |
Input:
Int[(c + d*x)^2*Cos[a + b*x]*Cot[a + b*x],x]
Output:
(-2*(c + d*x)^2*ArcTanh[E^(I*(a + b*x))])/b + ((c + d*x)^2*Cos[a + b*x])/b + (2*d*((I*(c + d*x)*PolyLog[2, -E^(I*(a + b*x))])/b - (d*PolyLog[3, -E^( I*(a + b*x))])/b^2))/b - (2*d*((I*(c + d*x)*PolyLog[2, E^(I*(a + b*x))])/b - (d*PolyLog[3, E^(I*(a + b*x))])/b^2))/b - (2*d*((d*Cos[a + b*x])/b^2 + ((c + d*x)*Sin[a + b*x])/b))/b
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Simp[v/D[v, x] Subst[Int[FunctionOfExponentialFunction[u, x]/x, x], x, v], x]] /; Funct ionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; FreeQ [{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x)) *(F_)[v_] /; FreeQ[{a, b, c}, x] && InverseFunctionQ[F[x]]]
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.) *(x_))^(m_.), x_Symbol] :> Simp[(-(f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Simp[g*(m/(b*c*n*Log[F])) Int[(f + g*x)^( m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e , f, g, n}, x] && GtQ[m, 0]
Int[((c_.) + (d_.)*(x_))^(m_.)*sin[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[( -(c + d*x)^m)*(Cos[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1)*C os[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[- 2*(c + d*x)^m*(ArcTanh[E^(I*(e + f*x))]/f), x] + (-Simp[d*(m/f) Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Simp[d*(m/f) Int[(c + d*x )^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IG tQ[m, 0]
Int[Cos[(a_.) + (b_.)*(x_)]^(n_.)*Cot[(a_.) + (b_.)*(x_)]^(p_.)*((c_.) + (d _.)*(x_))^(m_.), x_Symbol] :> -Int[(c + d*x)^m*Cos[a + b*x]^n*Cot[a + b*x]^ (p - 2), x] + Int[(c + d*x)^m*Cos[a + b*x]^(n - 2)*Cot[a + b*x]^p, x] /; Fr eeQ[{a, b, c, d, m}, x] && IGtQ[n, 0] && IGtQ[p, 0]
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_S ymbol] :> Simp[PolyLog[n + 1, c*(a + b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d , e, n, p}, x] && EqQ[b*d, a*e]
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 478 vs. \(2 (159 ) = 318\).
Time = 0.52 (sec) , antiderivative size = 479, normalized size of antiderivative = 2.80
method | result | size |
risch | \(\frac {\left (x^{2} d^{2} b^{2}+2 b^{2} c d x +2 i b \,d^{2} x +b^{2} c^{2}+2 i b c d -2 d^{2}\right ) {\mathrm e}^{i \left (b x +a \right )}}{2 b^{3}}+\frac {\left (x^{2} d^{2} b^{2}+2 b^{2} c d x -2 i b \,d^{2} x +b^{2} c^{2}-2 i b c d -2 d^{2}\right ) {\mathrm e}^{-i \left (b x +a \right )}}{2 b^{3}}-\frac {2 i d c \operatorname {polylog}\left (2, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {4 c d a \,\operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {2 d^{2} \operatorname {polylog}\left (3, {\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {2 i d^{2} \operatorname {polylog}\left (2, {\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}-\frac {2 d c \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x}{b}+\frac {2 d c \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b}+\frac {2 i c d \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{2}}+\frac {2 d c \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a}{b^{2}}+\frac {2 i d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (b x +a \right )}\right ) x}{b^{2}}+\frac {d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a^{2}}{b^{3}}-\frac {d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) a^{2}}{b^{3}}-\frac {2 d^{2} a^{2} \operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}-\frac {2 c d \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) a}{b^{2}}-\frac {2 c^{2} \operatorname {arctanh}\left ({\mathrm e}^{i \left (b x +a \right )}\right )}{b}-\frac {d^{2} \ln \left ({\mathrm e}^{i \left (b x +a \right )}+1\right ) x^{2}}{b}-\frac {2 d^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{i \left (b x +a \right )}\right )}{b^{3}}+\frac {d^{2} \ln \left (1-{\mathrm e}^{i \left (b x +a \right )}\right ) x^{2}}{b}\) | \(479\) |
Input:
int((d*x+c)^2*cos(b*x+a)*cot(b*x+a),x,method=_RETURNVERBOSE)
Output:
1/2*(x^2*d^2*b^2+2*b^2*c*d*x+b^2*c^2+2*I*b*d^2*x-2*d^2+2*I*b*c*d)/b^3*exp( I*(b*x+a))+1/2*(x^2*d^2*b^2+2*b^2*c*d*x+b^2*c^2-2*I*b*d^2*x-2*d^2-2*I*b*c* d)/b^3*exp(-I*(b*x+a))-2*I/b^2*d*c*polylog(2,exp(I*(b*x+a)))+4/b^2*c*d*a*a rctanh(exp(I*(b*x+a)))+2*d^2*polylog(3,exp(I*(b*x+a)))/b^3-2*I/b^2*d^2*pol ylog(2,exp(I*(b*x+a)))*x-2/b*d*c*ln(exp(I*(b*x+a))+1)*x+2/b*d*c*ln(1-exp(I *(b*x+a)))*x+2*I/b^2*c*d*polylog(2,-exp(I*(b*x+a)))+2/b^2*d*c*ln(1-exp(I*( b*x+a)))*a+2*I/b^2*d^2*polylog(2,-exp(I*(b*x+a)))*x+1/b^3*d^2*ln(exp(I*(b* x+a))+1)*a^2-1/b^3*d^2*ln(1-exp(I*(b*x+a)))*a^2-2/b^3*d^2*a^2*arctanh(exp( I*(b*x+a)))-2/b^2*c*d*ln(exp(I*(b*x+a))+1)*a-2/b*c^2*arctanh(exp(I*(b*x+a) ))-1/b*d^2*ln(exp(I*(b*x+a))+1)*x^2-2*d^2*polylog(3,-exp(I*(b*x+a)))/b^3+1 /b*d^2*ln(1-exp(I*(b*x+a)))*x^2
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 562 vs. \(2 (155) = 310\).
Time = 0.11 (sec) , antiderivative size = 562, normalized size of antiderivative = 3.29 \[ \int (c+d x)^2 \cos (a+b x) \cot (a+b x) \, dx =\text {Too large to display} \] Input:
integrate((d*x+c)^2*cos(b*x+a)*cot(b*x+a),x, algorithm="fricas")
Output:
1/2*(2*d^2*polylog(3, cos(b*x + a) + I*sin(b*x + a)) + 2*d^2*polylog(3, co s(b*x + a) - I*sin(b*x + a)) - 2*d^2*polylog(3, -cos(b*x + a) + I*sin(b*x + a)) - 2*d^2*polylog(3, -cos(b*x + a) - I*sin(b*x + a)) + 2*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 - 2*d^2)*cos(b*x + a) - 2*(I*b*d^2*x + I*b*c*d)*di log(cos(b*x + a) + I*sin(b*x + a)) - 2*(-I*b*d^2*x - I*b*c*d)*dilog(cos(b* x + a) - I*sin(b*x + a)) - 2*(I*b*d^2*x + I*b*c*d)*dilog(-cos(b*x + a) + I *sin(b*x + a)) - 2*(-I*b*d^2*x - I*b*c*d)*dilog(-cos(b*x + a) - I*sin(b*x + a)) - (b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2)*log(cos(b*x + a) + I*sin(b*x + a) + 1) - (b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2)*log(cos(b*x + a) - I*si n(b*x + a) + 1) + (b^2*c^2 - 2*a*b*c*d + a^2*d^2)*log(-1/2*cos(b*x + a) + 1/2*I*sin(b*x + a) + 1/2) + (b^2*c^2 - 2*a*b*c*d + a^2*d^2)*log(-1/2*cos(b *x + a) - 1/2*I*sin(b*x + a) + 1/2) + (b^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c *d - a^2*d^2)*log(-cos(b*x + a) + I*sin(b*x + a) + 1) + (b^2*d^2*x^2 + 2*b ^2*c*d*x + 2*a*b*c*d - a^2*d^2)*log(-cos(b*x + a) - I*sin(b*x + a) + 1) - 4*(b*d^2*x + b*c*d)*sin(b*x + a))/b^3
\[ \int (c+d x)^2 \cos (a+b x) \cot (a+b x) \, dx=\int \left (c + d x\right )^{2} \cos {\left (a + b x \right )} \cot {\left (a + b x \right )}\, dx \] Input:
integrate((d*x+c)**2*cos(b*x+a)*cot(b*x+a),x)
Output:
Integral((c + d*x)**2*cos(a + b*x)*cot(a + b*x), x)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 513 vs. \(2 (155) = 310\).
Time = 0.12 (sec) , antiderivative size = 513, normalized size of antiderivative = 3.00 \[ \int (c+d x)^2 \cos (a+b x) \cot (a+b x) \, dx =\text {Too large to display} \] Input:
integrate((d*x+c)^2*cos(b*x+a)*cot(b*x+a),x, algorithm="maxima")
Output:
1/2*(c^2*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1)) - 2*a*c*d*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1)) /b + a^2*d^2*(2*cos(b*x + a) - log(cos(b*x + a) + 1) + log(cos(b*x + a) - 1))/b^2 - (4*d^2*polylog(3, -e^(I*b*x + I*a)) - 4*d^2*polylog(3, e^(I*b*x + I*a)) - 2*(-I*(b*x + a)^2*d^2 + 2*(-I*b*c*d + I*a*d^2)*(b*x + a))*arctan 2(sin(b*x + a), cos(b*x + a) + 1) - 2*(-I*(b*x + a)^2*d^2 + 2*(-I*b*c*d + I*a*d^2)*(b*x + a))*arctan2(sin(b*x + a), -cos(b*x + a) + 1) - 2*((b*x + a )^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a) - 2*d^2)*cos(b*x + a) - 4*(I*b*c*d + I*(b*x + a)*d^2 - I*a*d^2)*dilog(-e^(I*b*x + I*a)) - 4*(-I*b*c*d - I*(b*x + a)*d^2 + I*a*d^2)*dilog(e^(I*b*x + I*a)) + ((b*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a))*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1) - ((b*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a))*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*cos(b*x + a) + 1) + 4*(b*c*d + (b*x + a)*d^2 - a*d^2)* sin(b*x + a))/b^2)/b
\[ \int (c+d x)^2 \cos (a+b x) \cot (a+b x) \, dx=\int { {\left (d x + c\right )}^{2} \cos \left (b x + a\right ) \cot \left (b x + a\right ) \,d x } \] Input:
integrate((d*x+c)^2*cos(b*x+a)*cot(b*x+a),x, algorithm="giac")
Output:
integrate((d*x + c)^2*cos(b*x + a)*cot(b*x + a), x)
Timed out. \[ \int (c+d x)^2 \cos (a+b x) \cot (a+b x) \, dx=\int \cos \left (a+b\,x\right )\,\mathrm {cot}\left (a+b\,x\right )\,{\left (c+d\,x\right )}^2 \,d x \] Input:
int(cos(a + b*x)*cot(a + b*x)*(c + d*x)^2,x)
Output:
int(cos(a + b*x)*cot(a + b*x)*(c + d*x)^2, x)
\[ \int (c+d x)^2 \cos (a+b x) \cot (a+b x) \, dx=\frac {\cos \left (b x +a \right ) c^{2}+\left (\int \cos \left (b x +a \right ) \cot \left (b x +a \right ) x^{2}d x \right ) b \,d^{2}+2 \left (\int \cos \left (b x +a \right ) \cot \left (b x +a \right ) x d x \right ) b c d +\mathrm {log}\left (\tan \left (\frac {b x}{2}+\frac {a}{2}\right )\right ) c^{2}-c^{2}}{b} \] Input:
int((d*x+c)^2*cos(b*x+a)*cot(b*x+a),x)
Output:
(cos(a + b*x)*c**2 + int(cos(a + b*x)*cot(a + b*x)*x**2,x)*b*d**2 + 2*int( cos(a + b*x)*cot(a + b*x)*x,x)*b*c*d + log(tan((a + b*x)/2))*c**2 - c**2)/ b