Integrand size = 26, antiderivative size = 249 \[ \int \frac {(e+f x)^2 \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {i (e+f x)^2}{a d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{a d}+\frac {(e+f x)^2 \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right )}{a d}-\frac {4 f (e+f x) \log \left (1-i e^{i (c+d x)}\right )}{a d^2}+\frac {2 i f (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{a d^2}+\frac {4 i f^2 \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{a d^3}-\frac {2 i f (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{a d^2}-\frac {2 f^2 \operatorname {PolyLog}\left (3,-e^{i (c+d x)}\right )}{a d^3}+\frac {2 f^2 \operatorname {PolyLog}\left (3,e^{i (c+d x)}\right )}{a d^3} \] Output:
I*(f*x+e)^2/a/d-2*(f*x+e)^2*arctanh(exp(I*(d*x+c)))/a/d+(f*x+e)^2*cot(1/2* c+1/4*Pi+1/2*d*x)/a/d-4*f*(f*x+e)*ln(1-I*exp(I*(d*x+c)))/a/d^2+2*I*f*(f*x+ e)*polylog(2,-exp(I*(d*x+c)))/a/d^2+4*I*f^2*polylog(2,I*exp(I*(d*x+c)))/a/ d^3-2*I*f*(f*x+e)*polylog(2,exp(I*(d*x+c)))/a/d^2-2*f^2*polylog(3,-exp(I*( d*x+c)))/a/d^3+2*f^2*polylog(3,exp(I*(d*x+c)))/a/d^3
Time = 3.89 (sec) , antiderivative size = 330, normalized size of antiderivative = 1.33 \[ \int \frac {(e+f x)^2 \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {(e+f x)^2 \log \left (1-e^{i (c+d x)}\right )-(e+f x)^2 \log \left (1+e^{i (c+d x)}\right )+\frac {2 i f \left (d (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )+i f \operatorname {PolyLog}\left (3,-e^{i (c+d x)}\right )\right )}{d^2}+\frac {2 f \left (-i d (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )+f \operatorname {PolyLog}\left (3,e^{i (c+d x)}\right )\right )}{d^2}+\frac {4 f (\cos (c)+i \sin (c)) \left (\frac {(e+f x)^2 (\cos (c)-i \sin (c))}{2 f}-\frac {(e+f x) \log (1+i \cos (c+d x)+\sin (c+d x)) (1+i \cos (c)+\sin (c))}{d}+\frac {f \operatorname {PolyLog}(2,-i \cos (c+d x)-\sin (c+d x)) (\cos (c)-i (1+\sin (c)))}{d^2}\right )}{\cos (c)+i (1+\sin (c))}-\frac {2 (e+f x)^2 \sin \left (\frac {d x}{2}\right )}{\left (\cos \left (\frac {c}{2}\right )+\sin \left (\frac {c}{2}\right )\right ) \left (\cos \left (\frac {1}{2} (c+d x)\right )+\sin \left (\frac {1}{2} (c+d x)\right )\right )}}{a d} \] Input:
Integrate[((e + f*x)^2*Csc[c + d*x])/(a + a*Sin[c + d*x]),x]
Output:
((e + f*x)^2*Log[1 - E^(I*(c + d*x))] - (e + f*x)^2*Log[1 + E^(I*(c + d*x) )] + ((2*I)*f*(d*(e + f*x)*PolyLog[2, -E^(I*(c + d*x))] + I*f*PolyLog[3, - E^(I*(c + d*x))]))/d^2 + (2*f*((-I)*d*(e + f*x)*PolyLog[2, E^(I*(c + d*x)) ] + f*PolyLog[3, E^(I*(c + d*x))]))/d^2 + (4*f*(Cos[c] + I*Sin[c])*(((e + f*x)^2*(Cos[c] - I*Sin[c]))/(2*f) - ((e + f*x)*Log[1 + I*Cos[c + d*x] + Si n[c + d*x]]*(1 + I*Cos[c] + Sin[c]))/d + (f*PolyLog[2, (-I)*Cos[c + d*x] - Sin[c + d*x]]*(Cos[c] - I*(1 + Sin[c])))/d^2))/(Cos[c] + I*(1 + Sin[c])) - (2*(e + f*x)^2*Sin[(d*x)/2])/((Cos[c/2] + Sin[c/2])*(Cos[(c + d*x)/2] + Sin[(c + d*x)/2])))/(a*d)
Time = 1.47 (sec) , antiderivative size = 265, normalized size of antiderivative = 1.06, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.577, Rules used = {5046, 3042, 3799, 3042, 4671, 3011, 2720, 4672, 3042, 25, 4202, 2620, 2715, 2838, 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 \frac {(e+f x)^2 \csc (c+d x)}{a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 5046 |
\(\displaystyle \frac {\int (e+f x)^2 \csc (c+d x)dx}{a}-\int \frac {(e+f x)^2}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (e+f x)^2 \csc (c+d x)dx}{a}-\int \frac {(e+f x)^2}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3799 |
\(\displaystyle \frac {\int (e+f x)^2 \csc (c+d x)dx}{a}-\frac {\int (e+f x)^2 \csc ^2\left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )dx}{2 a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (e+f x)^2 \csc (c+d x)dx}{a}-\frac {\int (e+f x)^2 \csc \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}\) |
\(\Big \downarrow \) 4671 |
\(\displaystyle -\frac {\int (e+f x)^2 \csc \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}+\frac {-\frac {2 f \int (e+f x) \log \left (1-e^{i (c+d x)}\right )dx}{d}+\frac {2 f \int (e+f x) \log \left (1+e^{i (c+d x)}\right )dx}{d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}}{a}\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle -\frac {\int (e+f x)^2 \csc \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}+\frac {\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d}-\frac {i f \int \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )dx}{d}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d}-\frac {i f \int \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )dx}{d}\right )}{d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}}{a}\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle -\frac {\int (e+f x)^2 \csc \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}+\frac {\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}}{a}\) |
\(\Big \downarrow \) 4672 |
\(\displaystyle -\frac {\frac {4 f \int (e+f x) \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )dx}{d}-\frac {2 (e+f x)^2 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}}{2 a}+\frac {\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}}{a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\frac {4 f \int -\left ((e+f x) \tan \left (\frac {c}{2}+\frac {d x}{2}+\frac {3 \pi }{4}\right )\right )dx}{d}-\frac {2 (e+f x)^2 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}}{2 a}+\frac {\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}}{a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {-\frac {4 f \int (e+f x) \tan \left (\frac {1}{4} (2 c+3 \pi )+\frac {d x}{2}\right )dx}{d}-\frac {2 (e+f x)^2 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}}{2 a}+\frac {\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}}{a}\) |
\(\Big \downarrow \) 4202 |
\(\displaystyle \frac {\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}}{a}-\frac {-\frac {2 (e+f x)^2 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}-\frac {4 f \left (\frac {i (e+f x)^2}{2 f}-2 i \int \frac {e^{\frac {1}{2} i (2 c+2 d x+3 \pi )} (e+f x)}{1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}}dx\right )}{d}}{2 a}\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle \frac {\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}}{a}-\frac {-\frac {2 (e+f x)^2 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}-\frac {4 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (\frac {i f \int \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )dx}{d}-\frac {i (e+f x) \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}\right )\right )}{d}}{2 a}\) |
\(\Big \downarrow \) 2715 |
\(\displaystyle \frac {\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}}{a}-\frac {-\frac {2 (e+f x)^2 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}-\frac {4 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (\frac {f \int e^{-\frac {1}{2} i (2 c+2 d x+3 \pi )} \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )de^{\frac {1}{2} i (2 c+2 d x+3 \pi )}}{d^2}-\frac {i (e+f x) \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}\right )\right )}{d}}{2 a}\) |
\(\Big \downarrow \) 2838 |
\(\displaystyle \frac {\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d}-\frac {f \int e^{-i (c+d x)} \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )de^{i (c+d x)}}{d^2}\right )}{d}-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}}{a}-\frac {-\frac {2 (e+f x)^2 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}-\frac {4 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (-\frac {f \operatorname {PolyLog}\left (2,-e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d^2}-\frac {i (e+f x) \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}\right )\right )}{d}}{2 a}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {-\frac {2 (e+f x)^2 \text {arctanh}\left (e^{i (c+d x)}\right )}{d}+\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{i (c+d x)}\right )}{d}-\frac {f \operatorname {PolyLog}\left (3,-e^{i (c+d x)}\right )}{d^2}\right )}{d}-\frac {2 f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,e^{i (c+d x)}\right )}{d}-\frac {f \operatorname {PolyLog}\left (3,e^{i (c+d x)}\right )}{d^2}\right )}{d}}{a}-\frac {-\frac {2 (e+f x)^2 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}-\frac {4 f \left (\frac {i (e+f x)^2}{2 f}-2 i \left (-\frac {f \operatorname {PolyLog}\left (2,-e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d^2}-\frac {i (e+f x) \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}\right )\right )}{d}}{2 a}\) |
Input:
Int[((e + f*x)^2*Csc[c + d*x])/(a + a*Sin[c + d*x]),x]
Output:
-1/2*((-2*(e + f*x)^2*Cot[c/2 + Pi/4 + (d*x)/2])/d - (4*f*(((I/2)*(e + f*x )^2)/f - (2*I)*(((-I)*(e + f*x)*Log[1 + E^((I/2)*(2*c + 3*Pi + 2*d*x))])/d - (f*PolyLog[2, -E^((I/2)*(2*c + 3*Pi + 2*d*x))])/d^2)))/d)/a + ((-2*(e + f*x)^2*ArcTanh[E^(I*(c + d*x))])/d + (2*f*((I*(e + f*x)*PolyLog[2, -E^(I* (c + d*x))])/d - (f*PolyLog[3, -E^(I*(c + d*x))])/d^2))/d - (2*f*((I*(e + f*x)*PolyLog[2, E^(I*(c + d*x))])/d - (f*PolyLog[3, E^(I*(c + d*x))])/d^2) )/d)/a
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/ ((a_) + (b_.)*((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)), x_Symbol] :> Simp [((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x] - Si mp[d*(m/(b*f*g*n*Log[F])) Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x )))^n/a)], x], x] /; FreeQ[{F, a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Simp[1/(d*e*n*Log[F]) Subst[Int[Log[a + b*x]/x, x], x, (F^(e*(c + d*x) ))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
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[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2 , (-c)*e*x^n]/n, x] /; FreeQ[{c, d, e, n}, x] && EqQ[c*d, 1]
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_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Simp[(2*a)^n Int[(c + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^ 2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])
Int[((c_.) + (d_.)*(x_))^(m_.)*tan[(e_.) + (f_.)*(x_)], x_Symbol] :> Simp[I *((c + d*x)^(m + 1)/(d*(m + 1))), x] - Simp[2*I Int[(c + d*x)^m*(E^(2*I*( e + f*x))/(1 + E^(2*I*(e + f*x)))), x], x] /; FreeQ[{c, d, e, f}, x] && IGt Q[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[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp [(-(c + d*x)^m)*(Cot[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1) *Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Int[(Csc[(c_.) + (d_.)*(x_)]^(n_.)*((e_.) + (f_.)*(x_))^(m_.))/((a_) + (b_. )*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[1/a Int[(e + f*x)^m*Csc[c + d*x]^n, x], x] - Simp[b/a Int[(e + f*x)^m*(Csc[c + d*x]^(n - 1)/(a + b*S in[c + d*x])), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IGtQ[m, 0] && IGtQ [n, 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. 642 vs. \(2 (223 ) = 446\).
Time = 1.31 (sec) , antiderivative size = 643, normalized size of antiderivative = 2.58
method | result | size |
risch | \(-\frac {f^{2} \ln \left (1-{\mathrm e}^{i \left (d x +c \right )}\right ) c^{2}}{d^{3} a}-\frac {f^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) x^{2}}{d a}+\frac {f^{2} \ln \left (1-{\mathrm e}^{i \left (d x +c \right )}\right ) x^{2}}{d a}+\frac {c^{2} f^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d^{3} a}+\frac {2 i f^{2} c^{2}}{d^{3} a}-\frac {4 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) e f}{d^{2} a}+\frac {4 c \,f^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d^{3} a}+\frac {2 x^{2} f^{2}+4 e f x +2 e^{2}}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}+\frac {2 i f^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (d x +c \right )}\right ) x}{d^{2} a}+\frac {2 e f \ln \left (1-{\mathrm e}^{i \left (d x +c \right )}\right ) x}{d a}-\frac {2 e f \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right ) x}{d a}+\frac {2 e f \ln \left (1-{\mathrm e}^{i \left (d x +c \right )}\right ) c}{d^{2} a}-\frac {2 c e f \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d^{2} a}+\frac {2 i e f \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (d x +c \right )}\right )}{d^{2} a}-\frac {2 i e f \operatorname {polylog}\left (2, {\mathrm e}^{i \left (d x +c \right )}\right )}{d^{2} a}-\frac {2 i f^{2} \operatorname {polylog}\left (2, {\mathrm e}^{i \left (d x +c \right )}\right ) x}{d^{2} a}+\frac {4 i f^{2} c x}{a \,d^{2}}+\frac {2 i f^{2} x^{2}}{d a}+\frac {4 i f^{2} \operatorname {polylog}\left (2, i {\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}-\frac {4 f^{2} \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) c}{a \,d^{3}}-\frac {4 f^{2} c \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}+\frac {4 f e \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{2}}-\frac {4 f^{2} \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) x}{a \,d^{2}}+\frac {e^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}-1\right )}{d a}-\frac {e^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+1\right )}{d a}-\frac {2 f^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}+\frac {2 f^{2} \operatorname {polylog}\left (3, {\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}\) | \(643\) |
Input:
int((f*x+e)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
2*(f^2*x^2+2*e*f*x+e^2)/d/a/(exp(I*(d*x+c))+I)+1/d/a*e^2*ln(exp(I*(d*x+c)) -1)-1/d/a*e^2*ln(exp(I*(d*x+c))+1)+4*I*f^2*polylog(2,I*exp(I*(d*x+c)))/a/d ^3-4/a/d^3*f^2*ln(1-I*exp(I*(d*x+c)))*c-4/a/d^3*f^2*c*ln(exp(I*(d*x+c)))+4 /a/d^2*f*e*ln(exp(I*(d*x+c)))-4/a/d^2*f^2*ln(1-I*exp(I*(d*x+c)))*x+2/d/a*e *f*ln(1-exp(I*(d*x+c)))*x-2/d/a*e*f*ln(exp(I*(d*x+c))+1)*x+2/d^2/a*e*f*ln( 1-exp(I*(d*x+c)))*c-2/d^2/a*c*e*f*ln(exp(I*(d*x+c))-1)+4*I/d^2/a*f^2*c*x+2 *I/d^2/a*e*f*polylog(2,-exp(I*(d*x+c)))-2*I/d^2/a*e*f*polylog(2,exp(I*(d*x +c)))-2*I/d^2/a*f^2*polylog(2,exp(I*(d*x+c)))*x+2*I/d^2/a*f^2*polylog(2,-e xp(I*(d*x+c)))*x-2*f^2*polylog(3,-exp(I*(d*x+c)))/a/d^3+2*f^2*polylog(3,ex p(I*(d*x+c)))/a/d^3-1/d^3/a*f^2*ln(1-exp(I*(d*x+c)))*c^2-1/d/a*f^2*ln(exp( I*(d*x+c))+1)*x^2+1/d/a*f^2*ln(1-exp(I*(d*x+c)))*x^2+1/d^3/a*c^2*f^2*ln(ex p(I*(d*x+c))-1)+2*I/d^3/a*f^2*c^2+2*I/d/a*f^2*x^2-4/d^2/a*ln(exp(I*(d*x+c) )+I)*e*f+4/d^3/a*c*f^2*ln(exp(I*(d*x+c))+I)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1642 vs. \(2 (214) = 428\).
Time = 0.15 (sec) , antiderivative size = 1642, normalized size of antiderivative = 6.59 \[ \int \frac {(e+f x)^2 \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\text {Too large to display} \] Input:
integrate((f*x+e)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="fricas")
Output:
1/2*(2*d^2*f^2*x^2 + 4*d^2*e*f*x + 2*d^2*e^2 + 2*(d^2*f^2*x^2 + 2*d^2*e*f* x + d^2*e^2)*cos(d*x + c) - 2*(I*d*f^2*x + I*d*e*f + (I*d*f^2*x + I*d*e*f) *cos(d*x + c) + (I*d*f^2*x + I*d*e*f)*sin(d*x + c))*dilog(cos(d*x + c) + I *sin(d*x + c)) - 2*(-I*d*f^2*x - I*d*e*f + (-I*d*f^2*x - I*d*e*f)*cos(d*x + c) + (-I*d*f^2*x - I*d*e*f)*sin(d*x + c))*dilog(cos(d*x + c) - I*sin(d*x + c)) - 4*(-I*f^2*cos(d*x + c) - I*f^2*sin(d*x + c) - I*f^2)*dilog(I*cos( d*x + c) - sin(d*x + c)) - 4*(I*f^2*cos(d*x + c) + I*f^2*sin(d*x + c) + I* f^2)*dilog(-I*cos(d*x + c) - sin(d*x + c)) - 2*(I*d*f^2*x + I*d*e*f + (I*d *f^2*x + I*d*e*f)*cos(d*x + c) + (I*d*f^2*x + I*d*e*f)*sin(d*x + c))*dilog (-cos(d*x + c) + I*sin(d*x + c)) - 2*(-I*d*f^2*x - I*d*e*f + (-I*d*f^2*x - I*d*e*f)*cos(d*x + c) + (-I*d*f^2*x - I*d*e*f)*sin(d*x + c))*dilog(-cos(d *x + c) - I*sin(d*x + c)) - (d^2*f^2*x^2 + 2*d^2*e*f*x + d^2*e^2 + (d^2*f^ 2*x^2 + 2*d^2*e*f*x + d^2*e^2)*cos(d*x + c) + (d^2*f^2*x^2 + 2*d^2*e*f*x + d^2*e^2)*sin(d*x + c))*log(cos(d*x + c) + I*sin(d*x + c) + 1) - 4*(d*e*f - c*f^2 + (d*e*f - c*f^2)*cos(d*x + c) + (d*e*f - c*f^2)*sin(d*x + c))*log (cos(d*x + c) + I*sin(d*x + c) + I) - (d^2*f^2*x^2 + 2*d^2*e*f*x + d^2*e^2 + (d^2*f^2*x^2 + 2*d^2*e*f*x + d^2*e^2)*cos(d*x + c) + (d^2*f^2*x^2 + 2*d ^2*e*f*x + d^2*e^2)*sin(d*x + c))*log(cos(d*x + c) - I*sin(d*x + c) + 1) - 4*(d*f^2*x + c*f^2 + (d*f^2*x + c*f^2)*cos(d*x + c) + (d*f^2*x + c*f^2)*s in(d*x + c))*log(I*cos(d*x + c) + sin(d*x + c) + 1) - 4*(d*f^2*x + c*f^...
\[ \int \frac {(e+f x)^2 \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {e^{2} \csc {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {f^{2} x^{2} \csc {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {2 e f x \csc {\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \] Input:
integrate((f*x+e)**2*csc(d*x+c)/(a+a*sin(d*x+c)),x)
Output:
(Integral(e**2*csc(c + d*x)/(sin(c + d*x) + 1), x) + Integral(f**2*x**2*cs c(c + d*x)/(sin(c + d*x) + 1), x) + Integral(2*e*f*x*csc(c + d*x)/(sin(c + d*x) + 1), x))/a
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1418 vs. \(2 (214) = 428\).
Time = 0.21 (sec) , antiderivative size = 1418, normalized size of antiderivative = 5.69 \[ \int \frac {(e+f x)^2 \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\text {Too large to display} \] Input:
integrate((f*x+e)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="maxima")
Output:
-(2*c*e*f*(2/(a*d + a*d*sin(d*x + c)/(cos(d*x + c) + 1)) + log(sin(d*x + c )/(cos(d*x + c) + 1))/(a*d)) - e^2*(log(sin(d*x + c)/(cos(d*x + c) + 1))/a + 2/(a + a*sin(d*x + c)/(cos(d*x + c) + 1))) + (4*I*c^2*f^2 - 8*(-I*d*e*f + I*c*f^2 - (d*e*f - c*f^2)*cos(d*x + c) + (-I*d*e*f + I*c*f^2)*sin(d*x + c))*arctan2(sin(d*x + c) + 1, cos(d*x + c)) - 8*((d*x + c)*f^2*cos(d*x + c) + I*(d*x + c)*f^2*sin(d*x + c) + I*(d*x + c)*f^2)*arctan2(cos(d*x + c), sin(d*x + c) + 1) - 2*(-I*(d*x + c)^2*f^2 - I*c^2*f^2 + 2*(-I*d*e*f + I*c *f^2)*(d*x + c) - ((d*x + c)^2*f^2 + c^2*f^2 + 2*(d*e*f - c*f^2)*(d*x + c) )*cos(d*x + c) + (-I*(d*x + c)^2*f^2 - I*c^2*f^2 + 2*(-I*d*e*f + I*c*f^2)* (d*x + c))*sin(d*x + c))*arctan2(sin(d*x + c), cos(d*x + c) + 1) - 2*(c^2* f^2*cos(d*x + c) + I*c^2*f^2*sin(d*x + c) + I*c^2*f^2)*arctan2(sin(d*x + c ), cos(d*x + c) - 1) - 2*(-I*(d*x + c)^2*f^2 + 2*(-I*d*e*f + I*c*f^2)*(d*x + c) - ((d*x + c)^2*f^2 + 2*(d*e*f - c*f^2)*(d*x + c))*cos(d*x + c) + (-I *(d*x + c)^2*f^2 + 2*(-I*d*e*f + I*c*f^2)*(d*x + c))*sin(d*x + c))*arctan2 (sin(d*x + c), -cos(d*x + c) + 1) - 4*((d*x + c)^2*f^2 + 2*(d*e*f - c*f^2) *(d*x + c))*cos(d*x + c) - 8*(f^2*cos(d*x + c) + I*f^2*sin(d*x + c) + I*f^ 2)*dilog(I*e^(I*d*x + I*c)) - 4*(I*d*e*f + I*(d*x + c)*f^2 - I*c*f^2 + (d* e*f + (d*x + c)*f^2 - c*f^2)*cos(d*x + c) + (I*d*e*f + I*(d*x + c)*f^2 - I *c*f^2)*sin(d*x + c))*dilog(-e^(I*d*x + I*c)) - 4*(-I*d*e*f - I*(d*x + c)* f^2 + I*c*f^2 - (d*e*f + (d*x + c)*f^2 - c*f^2)*cos(d*x + c) + (-I*d*e*...
Timed out. \[ \int \frac {(e+f x)^2 \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\text {Timed out} \] Input:
integrate((f*x+e)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x, algorithm="giac")
Output:
Timed out
Timed out. \[ \int \frac {(e+f x)^2 \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\text {Hanged} \] Input:
int((e + f*x)^2/(sin(c + d*x)*(a + a*sin(c + d*x))),x)
Output:
\text{Hanged}
\[ \int \frac {(e+f x)^2 \csc (c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\left (\int \frac {\csc \left (d x +c \right ) x^{2}}{\sin \left (d x +c \right )+1}d x \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) d \,f^{2}+\left (\int \frac {\csc \left (d x +c \right ) x^{2}}{\sin \left (d x +c \right )+1}d x \right ) d \,f^{2}+2 \left (\int \frac {\csc \left (d x +c \right ) x}{\sin \left (d x +c \right )+1}d x \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) d e f +2 \left (\int \frac {\csc \left (d x +c \right ) x}{\sin \left (d x +c \right )+1}d x \right ) d e f +\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) e^{2}+\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right ) e^{2}-2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) e^{2}}{a d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \] Input:
int((f*x+e)^2*csc(d*x+c)/(a+a*sin(d*x+c)),x)
Output:
(int((csc(c + d*x)*x**2)/(sin(c + d*x) + 1),x)*tan((c + d*x)/2)*d*f**2 + i nt((csc(c + d*x)*x**2)/(sin(c + d*x) + 1),x)*d*f**2 + 2*int((csc(c + d*x)* x)/(sin(c + d*x) + 1),x)*tan((c + d*x)/2)*d*e*f + 2*int((csc(c + d*x)*x)/( sin(c + d*x) + 1),x)*d*e*f + log(tan((c + d*x)/2))*tan((c + d*x)/2)*e**2 + log(tan((c + d*x)/2))*e**2 - 2*tan((c + d*x)/2)*e**2)/(a*d*(tan((c + d*x) /2) + 1))