Integrand size = 28, antiderivative size = 247 \[ \int \frac {(e+f x)^3 \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=-\frac {i (e+f x)^3}{a d}-\frac {(e+f x)^4}{4 a f}+\frac {6 f^2 (e+f x) \cos (c+d x)}{a d^3}-\frac {(e+f x)^3 \cos (c+d x)}{a d}-\frac {(e+f x)^3 \cot \left (\frac {c}{2}+\frac {\pi }{4}+\frac {d x}{2}\right )}{a d}+\frac {6 f (e+f x)^2 \log \left (1-i e^{i (c+d x)}\right )}{a d^2}-\frac {12 i f^2 (e+f x) \operatorname {PolyLog}\left (2,i e^{i (c+d x)}\right )}{a d^3}+\frac {12 f^3 \operatorname {PolyLog}\left (3,i e^{i (c+d x)}\right )}{a d^4}-\frac {6 f^3 \sin (c+d x)}{a d^4}+\frac {3 f (e+f x)^2 \sin (c+d x)}{a d^2} \] Output:
-I*(f*x+e)^3/a/d-1/4*(f*x+e)^4/a/f+6*f^2*(f*x+e)*cos(d*x+c)/a/d^3-(f*x+e)^ 3*cos(d*x+c)/a/d-(f*x+e)^3*cot(1/2*c+1/4*Pi+1/2*d*x)/a/d+6*f*(f*x+e)^2*ln( 1-I*exp(I*(d*x+c)))/a/d^2-12*I*f^2*(f*x+e)*polylog(2,I*exp(I*(d*x+c)))/a/d ^3+12*f^3*polylog(3,I*exp(I*(d*x+c)))/a/d^4-6*f^3*sin(d*x+c)/a/d^4+3*f*(f* x+e)^2*sin(d*x+c)/a/d^2
Both result and optimal contain complex but leaf count is larger than twice the leaf count of optimal. \(1314\) vs. \(2(247)=494\).
Time = 4.64 (sec) , antiderivative size = 1314, normalized size of antiderivative = 5.32 \[ \int \frac {(e+f x)^3 \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx =\text {Too large to display} \] Input:
Integrate[((e + f*x)^3*Sin[c + d*x]^2)/(a + a*Sin[c + d*x]),x]
Output:
((-6 + 4*I)*d^3*e^3*Cos[(c + d*x)/2] + 6*d^2*e^2*f*Cos[(c + d*x)/2] + 12*d *e*f^2*Cos[(c + d*x)/2] - 12*f^3*Cos[(c + d*x)/2] - 4*d^4*e^3*x*Cos[(c + d *x)/2] - (18 - 12*I)*d^3*e^2*f*x*Cos[(c + d*x)/2] + 12*d^2*e*f^2*x*Cos[(c + d*x)/2] + 12*d*f^3*x*Cos[(c + d*x)/2] - 6*d^4*e^2*f*x^2*Cos[(c + d*x)/2] - (18 - 12*I)*d^3*e*f^2*x^2*Cos[(c + d*x)/2] + 6*d^2*f^3*x^2*Cos[(c + d*x )/2] - 4*d^4*e*f^2*x^3*Cos[(c + d*x)/2] - (6 - 4*I)*d^3*f^3*x^3*Cos[(c + d *x)/2] - d^4*f^3*x^4*Cos[(c + d*x)/2] - 2*d^3*e^3*Cos[(3*(c + d*x))/2] - 6 *d^2*e^2*f*Cos[(3*(c + d*x))/2] + 12*d*e*f^2*Cos[(3*(c + d*x))/2] + 12*f^3 *Cos[(3*(c + d*x))/2] - 6*d^3*e^2*f*x*Cos[(3*(c + d*x))/2] - 12*d^2*e*f^2* x*Cos[(3*(c + d*x))/2] + 12*d*f^3*x*Cos[(3*(c + d*x))/2] - 6*d^3*e*f^2*x^2 *Cos[(3*(c + d*x))/2] - 6*d^2*f^3*x^2*Cos[(3*(c + d*x))/2] - 2*d^3*f^3*x^3 *Cos[(3*(c + d*x))/2] + 24*d^2*e^2*f*Cos[(c + d*x)/2]*Log[1 + I*Cos[c + d* x] + Sin[c + d*x]] + 48*d^2*e*f^2*x*Cos[(c + d*x)/2]*Log[1 + I*Cos[c + d*x ] + Sin[c + d*x]] + 24*d^2*f^3*x^2*Cos[(c + d*x)/2]*Log[1 + I*Cos[c + d*x] + Sin[c + d*x]] + (6 + 4*I)*d^3*e^3*Sin[(c + d*x)/2] + 6*d^2*e^2*f*Sin[(c + d*x)/2] - 12*d*e*f^2*Sin[(c + d*x)/2] - 12*f^3*Sin[(c + d*x)/2] - 4*d^4 *e^3*x*Sin[(c + d*x)/2] + (18 + 12*I)*d^3*e^2*f*x*Sin[(c + d*x)/2] + 12*d^ 2*e*f^2*x*Sin[(c + d*x)/2] - 12*d*f^3*x*Sin[(c + d*x)/2] - 6*d^4*e^2*f*x^2 *Sin[(c + d*x)/2] + (18 + 12*I)*d^3*e*f^2*x^2*Sin[(c + d*x)/2] + 6*d^2*f^3 *x^2*Sin[(c + d*x)/2] - 4*d^4*e*f^2*x^3*Sin[(c + d*x)/2] + (6 + 4*I)*d^...
Time = 2.02 (sec) , antiderivative size = 274, normalized size of antiderivative = 1.11, number of steps used = 24, number of rules used = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.821, Rules used = {5026, 3042, 3777, 3042, 3777, 25, 3042, 3777, 3042, 3117, 5026, 17, 3042, 3799, 3042, 4672, 3042, 25, 4202, 2620, 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 \frac {(e+f x)^3 \sin ^2(c+d x)}{a \sin (c+d x)+a} \, dx\) |
\(\Big \downarrow \) 5026 |
\(\displaystyle \frac {\int (e+f x)^3 \sin (c+d x)dx}{a}-\int \frac {(e+f x)^3 \sin (c+d x)}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (e+f x)^3 \sin (c+d x)dx}{a}-\int \frac {(e+f x)^3 \sin (c+d x)}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \frac {\frac {3 f \int (e+f x)^2 \cos (c+d x)dx}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\int \frac {(e+f x)^3 \sin (c+d x)}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3 f \int (e+f x)^2 \sin \left (c+d x+\frac {\pi }{2}\right )dx}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\int \frac {(e+f x)^3 \sin (c+d x)}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \frac {\frac {3 f \left (\frac {2 f \int -((e+f x) \sin (c+d x))dx}{d}+\frac {(e+f x)^2 \sin (c+d x)}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\int \frac {(e+f x)^3 \sin (c+d x)}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \int (e+f x) \sin (c+d x)dx}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\int \frac {(e+f x)^3 \sin (c+d x)}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \int (e+f x) \sin (c+d x)dx}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\int \frac {(e+f x)^3 \sin (c+d x)}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3777 |
\(\displaystyle \frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \int \cos (c+d x)dx}{d}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\int \frac {(e+f x)^3 \sin (c+d x)}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \int \sin \left (c+d x+\frac {\pi }{2}\right )dx}{d}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\int \frac {(e+f x)^3 \sin (c+d x)}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 3117 |
\(\displaystyle \frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\int \frac {(e+f x)^3 \sin (c+d x)}{\sin (c+d x) a+a}dx\) |
\(\Big \downarrow \) 5026 |
\(\displaystyle \int \frac {(e+f x)^3}{\sin (c+d x) a+a}dx-\frac {\int (e+f x)^3dx}{a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}\) |
\(\Big \downarrow \) 17 |
\(\displaystyle \int \frac {(e+f x)^3}{\sin (c+d x) a+a}dx+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(e+f x)^3}{\sin (c+d x) a+a}dx+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 3799 |
\(\displaystyle \frac {\int (e+f x)^3 \csc ^2\left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )dx}{2 a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (e+f x)^3 \csc \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 4672 |
\(\displaystyle \frac {\frac {6 f \int (e+f x)^2 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )dx}{d}-\frac {2 (e+f x)^3 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}}{2 a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {6 f \int -(e+f x)^2 \tan \left (\frac {c}{2}+\frac {d x}{2}+\frac {3 \pi }{4}\right )dx}{d}-\frac {2 (e+f x)^3 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}}{2 a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {-\frac {6 f \int (e+f x)^2 \tan \left (\frac {1}{4} (2 c+3 \pi )+\frac {d x}{2}\right )dx}{d}-\frac {2 (e+f x)^3 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}}{2 a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 4202 |
\(\displaystyle \frac {-\frac {2 (e+f x)^3 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}-\frac {6 f \left (\frac {i (e+f x)^3}{3 f}-2 i \int \frac {e^{\frac {1}{2} i (2 c+2 d x+3 \pi )} (e+f x)^2}{1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}}dx\right )}{d}}{2 a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 2620 |
\(\displaystyle \frac {-\frac {2 (e+f x)^3 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}-\frac {6 f \left (\frac {i (e+f x)^3}{3 f}-2 i \left (\frac {2 i f \int (e+f x) \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )dx}{d}-\frac {i (e+f x)^2 \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}\right )\right )}{d}}{2 a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 3011 |
\(\displaystyle \frac {-\frac {2 (e+f x)^3 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}-\frac {6 f \left (\frac {i (e+f x)^3}{3 f}-2 i \left (\frac {2 i f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}-\frac {i f \int \operatorname {PolyLog}\left (2,-e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )dx}{d}\right )}{d}-\frac {i (e+f x)^2 \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}\right )\right )}{d}}{2 a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 2720 |
\(\displaystyle \frac {-\frac {2 (e+f x)^3 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}-\frac {6 f \left (\frac {i (e+f x)^3}{3 f}-2 i \left (\frac {2 i f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}-\frac {f \int e^{-\frac {1}{2} i (2 c+2 d x+3 \pi )} \operatorname {PolyLog}\left (2,-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}\right )}{d}-\frac {i (e+f x)^2 \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}\right )\right )}{d}}{2 a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
\(\Big \downarrow \) 7143 |
\(\displaystyle \frac {-\frac {2 (e+f x)^3 \cot \left (\frac {c}{2}+\frac {d x}{2}+\frac {\pi }{4}\right )}{d}-\frac {6 f \left (\frac {i (e+f x)^3}{3 f}-2 i \left (\frac {2 i f \left (\frac {i (e+f x) \operatorname {PolyLog}\left (2,-e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}-\frac {f \operatorname {PolyLog}\left (3,-e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d^2}\right )}{d}-\frac {i (e+f x)^2 \log \left (1+e^{\frac {1}{2} i (2 c+2 d x+3 \pi )}\right )}{d}\right )\right )}{d}}{2 a}+\frac {\frac {3 f \left (\frac {(e+f x)^2 \sin (c+d x)}{d}-\frac {2 f \left (\frac {f \sin (c+d x)}{d^2}-\frac {(e+f x) \cos (c+d x)}{d}\right )}{d}\right )}{d}-\frac {(e+f x)^3 \cos (c+d x)}{d}}{a}-\frac {(e+f x)^4}{4 a f}\) |
Input:
Int[((e + f*x)^3*Sin[c + d*x]^2)/(a + a*Sin[c + d*x]),x]
Output:
-1/4*(e + f*x)^4/(a*f) + ((-2*(e + f*x)^3*Cot[c/2 + Pi/4 + (d*x)/2])/d - ( 6*f*(((I/3)*(e + f*x)^3)/f - (2*I)*(((-I)*(e + f*x)^2*Log[1 + E^((I/2)*(2* c + 3*Pi + 2*d*x))])/d + ((2*I)*f*((I*(e + f*x)*PolyLog[2, -E^((I/2)*(2*c + 3*Pi + 2*d*x))])/d - (f*PolyLog[3, -E^((I/2)*(2*c + 3*Pi + 2*d*x))])/d^2 ))/d)))/d)/(2*a) + (-(((e + f*x)^3*Cos[c + d*x])/d) + (3*f*(((e + f*x)^2*S in[c + d*x])/d - (2*f*(-(((e + f*x)*Cos[c + d*x])/d) + (f*Sin[c + d*x])/d^ 2))/d))/d)/a
Int[(c_.)*((a_.) + (b_.)*(x_))^(m_.), x_Symbol] :> Simp[c*((a + b*x)^(m + 1 )/(b*(m + 1))), x] /; FreeQ[{a, b, c, m}, x] && NeQ[m, -1]
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[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[sin[Pi/2 + (c_.) + (d_.)*(x_)], x_Symbol] :> Simp[Sin[c + d*x]/d, x] /; FreeQ[{c, d}, x]
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[((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_)]^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[(((e_.) + (f_.)*(x_))^(m_.)*Sin[(c_.) + (d_.)*(x_)]^(n_.))/((a_) + (b_. )*Sin[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[1/b Int[(e + f*x)^m*Sin[c + d*x]^(n - 1), x], x] - Simp[a/b Int[(e + f*x)^m*(Sin[c + d*x]^(n - 1)/(a + b*Sin[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. 758 vs. \(2 (228 ) = 456\).
Time = 1.75 (sec) , antiderivative size = 759, normalized size of antiderivative = 3.07
method | result | size |
risch | \(-\frac {2 \left (f^{3} x^{3}+3 e \,f^{2} x^{2}+3 e^{2} f x +e^{3}\right )}{d a \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}+\frac {12 f^{3} \operatorname {polylog}\left (3, i {\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{4}}-\frac {f^{2} e \,x^{3}}{a}-\frac {6 f \,e^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{2}}-\frac {6 f^{3} c^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{4}}-\frac {6 f^{3} c^{2} \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{4}}+\frac {6 f^{3} \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) x^{2}}{a \,d^{2}}-\frac {2 i f^{3} x^{3}}{a d}+\frac {4 i f^{3} c^{3}}{a \,d^{4}}-\frac {12 i f^{2} e c x}{a \,d^{2}}-\frac {12 i f^{3} \operatorname {polylog}\left (2, i {\mathrm e}^{i \left (d x +c \right )}\right ) x}{a \,d^{3}}-\frac {6 i f^{2} e \,x^{2}}{a d}-\frac {6 i f^{2} e \,c^{2}}{a \,d^{3}}-\frac {12 i f^{2} e \operatorname {polylog}\left (2, i {\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}+\frac {12 f^{2} e \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) x}{a \,d^{2}}+\frac {12 f^{2} c e \ln \left ({\mathrm e}^{i \left (d x +c \right )}\right )}{a \,d^{3}}+\frac {12 f^{2} e \ln \left (1-i {\mathrm e}^{i \left (d x +c \right )}\right ) c}{a \,d^{3}}-\frac {e^{4}}{4 a f}+\frac {6 \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right ) e^{2} f}{d^{2} a}+\frac {6 c^{2} f^{3} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d^{4} a}-\frac {\left (d^{3} x^{3} f^{3}+3 e \,f^{2} x^{2} d^{3}+3 i d^{2} f^{3} x^{2}+3 e^{2} f x \,d^{3}+6 i d^{2} e \,f^{2} x +d^{3} e^{3}+3 i d^{2} e^{2} f -6 d \,f^{3} x -6 d e \,f^{2}-6 i f^{3}\right ) {\mathrm e}^{i \left (d x +c \right )}}{2 a \,d^{4}}-\frac {\left (d^{3} x^{3} f^{3}+3 e \,f^{2} x^{2} d^{3}-3 i d^{2} f^{3} x^{2}+3 e^{2} f x \,d^{3}-6 i d^{2} e \,f^{2} x +d^{3} e^{3}-3 i d^{2} e^{2} f -6 d \,f^{3} x -6 d e \,f^{2}+6 i f^{3}\right ) {\mathrm e}^{-i \left (d x +c \right )}}{2 a \,d^{4}}-\frac {12 c e \,f^{2} \ln \left ({\mathrm e}^{i \left (d x +c \right )}+i\right )}{d^{3} a}+\frac {6 i f^{3} c^{2} x}{d^{3} a}-\frac {f^{3} x^{4}}{4 a}-\frac {3 f \,e^{2} x^{2}}{2 a}-\frac {e^{3} x}{a}\) | \(759\) |
Input:
int((f*x+e)^3*sin(d*x+c)^2/(a+a*sin(d*x+c)),x,method=_RETURNVERBOSE)
Output:
-1/2*(d^3*x^3*f^3+3*I*d^2*f^3*x^2+3*e*f^2*x^2*d^3+6*I*d^2*e*f^2*x+3*e^2*f* x*d^3+3*I*d^2*e^2*f+d^3*e^3-6*d*f^3*x-6*I*f^3-6*d*e*f^2)/a/d^4*exp(I*(d*x+ c))-2*(f^3*x^3+3*e*f^2*x^2+3*e^2*f*x+e^3)/d/a/(exp(I*(d*x+c))+I)-1/a*f^2*e *x^3-1/2*(d^3*x^3*f^3-3*I*d^2*f^3*x^2+3*e*f^2*x^2*d^3-6*I*d^2*e*f^2*x+3*e^ 2*f*x*d^3-3*I*d^2*e^2*f+d^3*e^3-6*d*f^3*x+6*I*f^3-6*d*e*f^2)/a/d^4*exp(-I* (d*x+c))-12/d^3/a*c*e*f^2*ln(exp(I*(d*x+c))+I)-1/4/a/f*e^4-12*I/d^3/a*e*f^ 2*polylog(2,I*exp(I*(d*x+c)))+12*f^3*polylog(3,I*exp(I*(d*x+c)))/a/d^4+12/ d^2/a*e*f^2*ln(1-I*exp(I*(d*x+c)))*x+12/d^3/a*e*f^2*ln(1-I*exp(I*(d*x+c))) *c+6/d^2/a*f^3*ln(1-I*exp(I*(d*x+c)))*x^2-6/d^2/a*ln(exp(I*(d*x+c)))*e^2*f +6/d^2/a*ln(exp(I*(d*x+c))+I)*e^2*f+6/d^4/a*c^2*f^3*ln(exp(I*(d*x+c))+I)-6 /d^4/a*c^2*f^3*ln(1-I*exp(I*(d*x+c)))-6/d^4/a*c^2*f^3*ln(exp(I*(d*x+c)))+4 *I/d^4/a*f^3*c^3-2*I/d/a*f^3*x^3-6*I/d/a*e*f^2*x^2+6*I/d^3/a*f^3*c^2*x-12* I/d^3/a*f^3*polylog(2,I*exp(I*(d*x+c)))*x-1/4/a*f^3*x^4-12*I/d^2/a*e*f^2*c *x-3/2/a*f*e^2*x^2-1/a*e^3*x+12/d^3/a*c*e*f^2*ln(exp(I*(d*x+c)))-6*I/d^3/a *e*f^2*c^2
Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 1313 vs. \(2 (222) = 444\).
Time = 0.12 (sec) , antiderivative size = 1313, normalized size of antiderivative = 5.32 \[ \int \frac {(e+f x)^3 \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\text {Too large to display} \] Input:
integrate((f*x+e)^3*sin(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="fricas")
Output:
-1/4*(d^4*f^3*x^4 + 4*d^3*e^3 - 12*d^2*e^2*f + 4*(d^4*e*f^2 + d^3*f^3)*x^3 + 24*f^3 + 6*(d^4*e^2*f + 2*d^3*e*f^2 - 2*d^2*f^3)*x^2 + 4*(d^3*f^3*x^3 + d^3*e^3 + 3*d^2*e^2*f - 6*d*e*f^2 - 6*f^3 + 3*(d^3*e*f^2 + d^2*f^3)*x^2 + 3*(d^3*e^2*f + 2*d^2*e*f^2 - 2*d*f^3)*x)*cos(d*x + c)^2 + 4*(d^4*e^3 + 3* d^3*e^2*f - 6*d^2*e*f^2)*x + (d^4*f^3*x^4 + 8*d^3*e^3 - 24*d*e*f^2 + 4*(d^ 4*e*f^2 + 2*d^3*f^3)*x^3 + 6*(d^4*e^2*f + 4*d^3*e*f^2)*x^2 + 4*(d^4*e^3 + 6*d^3*e^2*f - 6*d*f^3)*x)*cos(d*x + c) + 24*(I*d*f^3*x + I*d*e*f^2 + (I*d* f^3*x + I*d*e*f^2)*cos(d*x + c) + (I*d*f^3*x + I*d*e*f^2)*sin(d*x + c))*di log(I*cos(d*x + c) - sin(d*x + c)) + 24*(-I*d*f^3*x - I*d*e*f^2 + (-I*d*f^ 3*x - I*d*e*f^2)*cos(d*x + c) + (-I*d*f^3*x - I*d*e*f^2)*sin(d*x + c))*dil og(-I*cos(d*x + c) - sin(d*x + c)) - 12*(d^2*e^2*f - 2*c*d*e*f^2 + c^2*f^3 + (d^2*e^2*f - 2*c*d*e*f^2 + c^2*f^3)*cos(d*x + c) + (d^2*e^2*f - 2*c*d*e *f^2 + c^2*f^3)*sin(d*x + c))*log(cos(d*x + c) + I*sin(d*x + c) + I) - 12* (d^2*f^3*x^2 + 2*d^2*e*f^2*x + 2*c*d*e*f^2 - c^2*f^3 + (d^2*f^3*x^2 + 2*d^ 2*e*f^2*x + 2*c*d*e*f^2 - c^2*f^3)*cos(d*x + c) + (d^2*f^3*x^2 + 2*d^2*e*f ^2*x + 2*c*d*e*f^2 - c^2*f^3)*sin(d*x + c))*log(I*cos(d*x + c) + sin(d*x + c) + 1) - 12*(d^2*f^3*x^2 + 2*d^2*e*f^2*x + 2*c*d*e*f^2 - c^2*f^3 + (d^2* f^3*x^2 + 2*d^2*e*f^2*x + 2*c*d*e*f^2 - c^2*f^3)*cos(d*x + c) + (d^2*f^3*x ^2 + 2*d^2*e*f^2*x + 2*c*d*e*f^2 - c^2*f^3)*sin(d*x + c))*log(-I*cos(d*x + c) + sin(d*x + c) + 1) - 12*(d^2*e^2*f - 2*c*d*e*f^2 + c^2*f^3 + (d^2*...
\[ \int \frac {(e+f x)^3 \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\frac {\int \frac {e^{3} \sin ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {f^{3} x^{3} \sin ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {3 e f^{2} x^{2} \sin ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx + \int \frac {3 e^{2} f x \sin ^{2}{\left (c + d x \right )}}{\sin {\left (c + d x \right )} + 1}\, dx}{a} \] Input:
integrate((f*x+e)**3*sin(d*x+c)**2/(a+a*sin(d*x+c)),x)
Output:
(Integral(e**3*sin(c + d*x)**2/(sin(c + d*x) + 1), x) + Integral(f**3*x**3 *sin(c + d*x)**2/(sin(c + d*x) + 1), x) + Integral(3*e*f**2*x**2*sin(c + d *x)**2/(sin(c + d*x) + 1), x) + Integral(3*e**2*f*x*sin(c + d*x)**2/(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. 4592 vs. \(2 (222) = 444\).
Time = 0.43 (sec) , antiderivative size = 4592, normalized size of antiderivative = 18.59 \[ \int \frac {(e+f x)^3 \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\text {Too large to display} \] Input:
integrate((f*x+e)^3*sin(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="maxima")
Output:
-1/2*(12*c^2*e*f^2*((sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^2/(cos (d*x + c) + 1)^2 + 2)/(a*d^2 + a*d^2*sin(d*x + c)/(cos(d*x + c) + 1) + a*d ^2*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + a*d^2*sin(d*x + c)^3/(cos(d*x + c ) + 1)^3) + arctan(sin(d*x + c)/(cos(d*x + c) + 1))/(a*d^2)) - 12*c*e^2*f* ((sin(d*x + c)/(cos(d*x + c) + 1) + sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 2)/(a*d + a*d*sin(d*x + c)/(cos(d*x + c) + 1) + a*d*sin(d*x + c)^2/(cos(d* x + c) + 1)^2 + a*d*sin(d*x + c)^3/(cos(d*x + c) + 1)^3) + arctan(sin(d*x + c)/(cos(d*x + c) + 1))/(a*d)) - 6*(((d*x + c)^2 - 1)*cos(d*x + c)^4 + (( d*x + c)^2 - 1)*sin(d*x + c)^4 + ((d*x + c)*cos(d*x + c) + sin(d*x + c) + 1)*cos(2*d*x + 2*c)^3 + 7*(d*x + c)*cos(d*x + c)^3 + (d*x + (d*x + c)*sin( d*x + c) + c - cos(d*x + c))*sin(2*d*x + 2*c)^3 + (2*(d*x + c)^2 - 3)*sin( d*x + c)^3 + (((d*x + c)^2 - 1)*cos(d*x + c)^2 + ((d*x + c)^2 - 3)*sin(d*x + c)^2 + (d*x + c)^2 + 6*(d*x + c)*cos(d*x + c) + 2*((d*x + c)^2 - (d*x + c)*cos(d*x + c) - 2)*sin(d*x + c) - 1)*cos(2*d*x + 2*c)^2 + ((d*x + c)^2 - 1)*cos(d*x + c)^2 + (((d*x + c)^2 - 3)*cos(d*x + c)^2 + ((d*x + c)^2 - 1 )*sin(d*x + c)^2 + (d*x + c)^2 + ((d*x + c)*cos(d*x + c) + sin(d*x + c) + 1)*cos(2*d*x + 2*c) + 8*(d*x + c)*cos(d*x + c) + 2*((d*x + c)^2 + (d*x + c )*cos(d*x + c) - 1)*sin(d*x + c) - 1)*sin(2*d*x + 2*c)^2 + (2*((d*x + c)^2 - 1)*cos(d*x + c)^2 + (d*x + c)^2 + 7*(d*x + c)*cos(d*x + c) - 3)*sin(d*x + c)^2 + ((d*x + c)*cos(d*x + c)^3 - (2*(d*x + c)^2 - 3)*sin(d*x + c)^...
\[ \int \frac {(e+f x)^3 \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\int { \frac {{\left (f x + e\right )}^{3} \sin \left (d x + c\right )^{2}}{a \sin \left (d x + c\right ) + a} \,d x } \] Input:
integrate((f*x+e)^3*sin(d*x+c)^2/(a+a*sin(d*x+c)),x, algorithm="giac")
Output:
integrate((f*x + e)^3*sin(d*x + c)^2/(a*sin(d*x + c) + a), x)
Timed out. \[ \int \frac {(e+f x)^3 \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx=\int \frac {{\sin \left (c+d\,x\right )}^2\,{\left (e+f\,x\right )}^3}{a+a\,\sin \left (c+d\,x\right )} \,d x \] Input:
int((sin(c + d*x)^2*(e + f*x)^3)/(a + a*sin(c + d*x)),x)
Output:
int((sin(c + d*x)^2*(e + f*x)^3)/(a + a*sin(c + d*x)), x)
\[ \int \frac {(e+f x)^3 \sin ^2(c+d x)}{a+a \sin (c+d x)} \, dx =\text {Too large to display} \] Input:
int((f*x+e)^3*sin(d*x+c)^2/(a+a*sin(d*x+c)),x)
Output:
( - 4*cos(c + d*x)*tan((c + d*x)/2)*d**3*e**3 - 12*cos(c + d*x)*tan((c + d *x)/2)*d**3*e**2*f*x - 12*cos(c + d*x)*tan((c + d*x)/2)*d**3*e*f**2*x**2 - 4*cos(c + d*x)*tan((c + d*x)/2)*d**3*f**3*x**3 + 24*cos(c + d*x)*tan((c + d*x)/2)*d*e*f**2 + 24*cos(c + d*x)*tan((c + d*x)/2)*d*f**3*x - 4*cos(c + d*x)*d**3*e**3 - 12*cos(c + d*x)*d**3*e**2*f*x - 12*cos(c + d*x)*d**3*e*f* *2*x**2 - 4*cos(c + d*x)*d**3*f**3*x**3 + 24*cos(c + d*x)*d*e*f**2 + 24*co s(c + d*x)*d*f**3*x + 24*int(x**2/(tan((c + d*x)/2)**2 + 2*tan((c + d*x)/2 ) + 1),x)*tan((c + d*x)/2)*d**3*f**3 + 24*int(x**2/(tan((c + d*x)/2)**2 + 2*tan((c + d*x)/2) + 1),x)*d**3*f**3 + 48*int(x/(tan((c + d*x)/2)**2 + 2*t an((c + d*x)/2) + 1),x)*tan((c + d*x)/2)*d**3*e*f**2 - 48*int(x/(tan((c + d*x)/2)**2 + 2*tan((c + d*x)/2) + 1),x)*tan((c + d*x)/2)*d**2*f**3 + 48*in t(x/(tan((c + d*x)/2)**2 + 2*tan((c + d*x)/2) + 1),x)*d**3*e*f**2 - 48*int (x/(tan((c + d*x)/2)**2 + 2*tan((c + d*x)/2) + 1),x)*d**2*f**3 - 12*log(ta n((c + d*x)/2)**2 + 1)*tan((c + d*x)/2)*d**2*e**2*f + 24*log(tan((c + d*x) /2)**2 + 1)*tan((c + d*x)/2)*d*e*f**2 - 24*log(tan((c + d*x)/2)**2 + 1)*ta n((c + d*x)/2)*f**3 - 12*log(tan((c + d*x)/2)**2 + 1)*d**2*e**2*f + 24*log (tan((c + d*x)/2)**2 + 1)*d*e*f**2 - 24*log(tan((c + d*x)/2)**2 + 1)*f**3 + 24*log(tan((c + d*x)/2) + 1)*tan((c + d*x)/2)*d**2*e**2*f - 48*log(tan(( c + d*x)/2) + 1)*tan((c + d*x)/2)*d*e*f**2 + 48*log(tan((c + d*x)/2) + 1)* tan((c + d*x)/2)*f**3 + 24*log(tan((c + d*x)/2) + 1)*d**2*e**2*f - 48*l...