Integrand size = 20, antiderivative size = 224 \[ \int (c+d x)^3 (a+a \sin (e+f x))^2 \, dx=-\frac {3 a^2 d (c+d x)^2}{8 f^2}+\frac {3 a^2 (c+d x)^4}{8 d}+\frac {12 a^2 d^2 (c+d x) \cos (e+f x)}{f^3}-\frac {2 a^2 (c+d x)^3 \cos (e+f x)}{f}-\frac {12 a^2 d^3 \sin (e+f x)}{f^4}+\frac {6 a^2 d (c+d x)^2 \sin (e+f x)}{f^2}+\frac {3 a^2 d^2 (c+d x) \cos (e+f x) \sin (e+f x)}{4 f^3}-\frac {a^2 (c+d x)^3 \cos (e+f x) \sin (e+f x)}{2 f}-\frac {3 a^2 d^3 \sin ^2(e+f x)}{8 f^4}+\frac {3 a^2 d (c+d x)^2 \sin ^2(e+f x)}{4 f^2} \] Output:
-3/8*a^2*d*(d*x+c)^2/f^2+3/8*a^2*(d*x+c)^4/d+12*a^2*d^2*(d*x+c)*cos(f*x+e) /f^3-2*a^2*(d*x+c)^3*cos(f*x+e)/f-12*a^2*d^3*sin(f*x+e)/f^4+6*a^2*d*(d*x+c )^2*sin(f*x+e)/f^2+3/4*a^2*d^2*(d*x+c)*cos(f*x+e)*sin(f*x+e)/f^3-1/2*a^2*( d*x+c)^3*cos(f*x+e)*sin(f*x+e)/f-3/8*a^2*d^3*sin(f*x+e)^2/f^4+3/4*a^2*d*(d *x+c)^2*sin(f*x+e)^2/f^2
Time = 1.39 (sec) , antiderivative size = 216, normalized size of antiderivative = 0.96 \[ \int (c+d x)^3 (a+a \sin (e+f x))^2 \, dx=\frac {a^2 \left (6 f^4 x \left (4 c^3+6 c^2 d x+4 c d^2 x^2+d^3 x^3\right )-32 f (c+d x) \left (c^2 f^2+2 c d f^2 x+d^2 \left (-6+f^2 x^2\right )\right ) \cos (e+f x)-3 d \left (2 c^2 f^2+4 c d f^2 x+d^2 \left (-1+2 f^2 x^2\right )\right ) \cos (2 (e+f x))+96 d \left (c^2 f^2+2 c d f^2 x+d^2 \left (-2+f^2 x^2\right )\right ) \sin (e+f x)-2 f (c+d x) \left (2 c^2 f^2+4 c d f^2 x+d^2 \left (-3+2 f^2 x^2\right )\right ) \sin (2 (e+f x))\right )}{16 f^4} \] Input:
Integrate[(c + d*x)^3*(a + a*Sin[e + f*x])^2,x]
Output:
(a^2*(6*f^4*x*(4*c^3 + 6*c^2*d*x + 4*c*d^2*x^2 + d^3*x^3) - 32*f*(c + d*x) *(c^2*f^2 + 2*c*d*f^2*x + d^2*(-6 + f^2*x^2))*Cos[e + f*x] - 3*d*(2*c^2*f^ 2 + 4*c*d*f^2*x + d^2*(-1 + 2*f^2*x^2))*Cos[2*(e + f*x)] + 96*d*(c^2*f^2 + 2*c*d*f^2*x + d^2*(-2 + f^2*x^2))*Sin[e + f*x] - 2*f*(c + d*x)*(2*c^2*f^2 + 4*c*d*f^2*x + d^2*(-3 + 2*f^2*x^2))*Sin[2*(e + f*x)]))/(16*f^4)
Time = 0.53 (sec) , antiderivative size = 224, 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.150, Rules used = {3042, 3798, 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)^3 (a \sin (e+f x)+a)^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (c+d x)^3 (a \sin (e+f x)+a)^2dx\) |
\(\Big \downarrow \) 3798 |
\(\displaystyle \int \left (a^2 (c+d x)^3 \sin ^2(e+f x)+2 a^2 (c+d x)^3 \sin (e+f x)+a^2 (c+d x)^3\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {12 a^2 d^2 (c+d x) \cos (e+f x)}{f^3}+\frac {3 a^2 d^2 (c+d x) \sin (e+f x) \cos (e+f x)}{4 f^3}+\frac {3 a^2 d (c+d x)^2 \sin ^2(e+f x)}{4 f^2}+\frac {6 a^2 d (c+d x)^2 \sin (e+f x)}{f^2}-\frac {2 a^2 (c+d x)^3 \cos (e+f x)}{f}-\frac {a^2 (c+d x)^3 \sin (e+f x) \cos (e+f x)}{2 f}-\frac {3 a^2 d (c+d x)^2}{8 f^2}+\frac {3 a^2 (c+d x)^4}{8 d}-\frac {3 a^2 d^3 \sin ^2(e+f x)}{8 f^4}-\frac {12 a^2 d^3 \sin (e+f x)}{f^4}\) |
Input:
Int[(c + d*x)^3*(a + a*Sin[e + f*x])^2,x]
Output:
(-3*a^2*d*(c + d*x)^2)/(8*f^2) + (3*a^2*(c + d*x)^4)/(8*d) + (12*a^2*d^2*( c + d*x)*Cos[e + f*x])/f^3 - (2*a^2*(c + d*x)^3*Cos[e + f*x])/f - (12*a^2* d^3*Sin[e + f*x])/f^4 + (6*a^2*d*(c + d*x)^2*Sin[e + f*x])/f^2 + (3*a^2*d^ 2*(c + d*x)*Cos[e + f*x]*Sin[e + f*x])/(4*f^3) - (a^2*(c + d*x)^3*Cos[e + f*x]*Sin[e + f*x])/(2*f) - (3*a^2*d^3*Sin[e + f*x]^2)/(8*f^4) + (3*a^2*d*( c + d*x)^2*Sin[e + f*x]^2)/(4*f^2)
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] || IGtQ[ m, 0] || NeQ[a^2 - b^2, 0])
Time = 2.30 (sec) , antiderivative size = 195, normalized size of antiderivative = 0.87
method | result | size |
parallelrisch | \(-\frac {a^{2} \left (\left (\left (d x +c \right )^{2} f^{2}-\frac {3 d^{2}}{2}\right ) f \left (d x +c \right ) \sin \left (2 f x +2 e \right )+\frac {3 d \left (\left (d x +c \right )^{2} f^{2}-\frac {d^{2}}{2}\right ) \cos \left (2 f x +2 e \right )}{2}+8 \left (\left (d x +c \right )^{2} f^{2}-6 d^{2}\right ) f \left (d x +c \right ) \cos \left (f x +e \right )-24 \left (\left (d x +c \right )^{2} f^{2}-2 d^{2}\right ) d \sin \left (f x +e \right )+\left (-6 x^{3} c \,d^{2}-9 x^{2} c^{2} d -\frac {3}{2} d^{3} x^{4}-6 c^{3} x \right ) f^{4}+8 c^{3} f^{3}-\frac {3 c^{2} d \,f^{2}}{2}-48 c \,d^{2} f +\frac {3 d^{3}}{4}\right )}{4 f^{4}}\) | \(195\) |
risch | \(\frac {3 d^{3} a^{2} x^{4}}{8}+\frac {3 a^{2} c \,d^{2} x^{3}}{2}+\frac {9 a^{2} d \,c^{2} x^{2}}{4}+\frac {3 a^{2} c^{3} x}{2}+\frac {3 a^{2} c^{4}}{8 d}-\frac {2 a^{2} \left (d^{3} f^{2} x^{3}+3 c \,d^{2} f^{2} x^{2}+3 c^{2} d \,f^{2} x +c^{3} f^{2}-6 d^{3} x -6 c \,d^{2}\right ) \cos \left (f x +e \right )}{f^{3}}+\frac {6 a^{2} d \left (d^{2} x^{2} f^{2}+2 c d \,f^{2} x +c^{2} f^{2}-2 d^{2}\right ) \sin \left (f x +e \right )}{f^{4}}-\frac {3 a^{2} d \left (2 d^{2} x^{2} f^{2}+4 c d \,f^{2} x +2 c^{2} f^{2}-d^{2}\right ) \cos \left (2 f x +2 e \right )}{16 f^{4}}-\frac {a^{2} \left (2 d^{3} f^{2} x^{3}+6 c \,d^{2} f^{2} x^{2}+6 c^{2} d \,f^{2} x +2 c^{3} f^{2}-3 d^{3} x -3 c \,d^{2}\right ) \sin \left (2 f x +2 e \right )}{8 f^{3}}\) | \(291\) |
norman | \(\frac {\frac {d^{3} a^{2} x^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{f}-\frac {4 a^{2} c^{3} f^{2}-24 a^{2} c \,d^{2}}{f^{3}}+\frac {3 d^{3} a^{2} x^{4}}{8}-\frac {\left (8 a^{2} c^{3} f^{3}-6 a^{2} c^{2} d \,f^{2}-48 a^{2} c \,d^{2} f +3 d^{3} a^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 f^{4}}-\frac {a^{2} \left (2 c^{3} f^{3}-24 c^{2} d \,f^{2}-3 c \,d^{2} f +48 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 f^{4}}+\frac {3 a^{2} \left (2 c^{3} f^{3}-8 c^{2} d \,f^{2}-c \,d^{2} f +16 d^{3}\right ) x}{4 f^{3}}+\frac {a^{2} \left (2 c^{3} f^{3}+24 c^{2} d \,f^{2}-3 c \,d^{2} f -48 d^{3}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 f^{4}}+\frac {3 d^{3} a^{2} x^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{4}+\frac {3 d^{3} a^{2} x^{4} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{8}+3 a^{2} c \,d^{2} x^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\frac {3 a^{2} d \left (6 c^{2} f^{2}-16 d f c -d^{2}\right ) x^{2}}{8 f^{2}}+\frac {a^{2} d^{2} \left (3 c f -4 d \right ) x^{3}}{2 f}+\frac {3 a^{2} \left (2 c^{3} f^{3}+8 c^{2} d \,f^{2}-c \,d^{2} f -16 d^{3}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{4 f^{3}}-\frac {d^{3} a^{2} x^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}+\frac {3 a^{2} c \left (2 c^{2} f^{2}+3 d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{2 f^{2}}+\frac {9 a^{2} d \left (2 c^{2} f^{2}+d^{2}\right ) x^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{4 f^{2}}-\frac {3 a^{2} d \left (2 c^{2} f^{2}-16 d f c -d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2 f^{3}}+\frac {3 a^{2} d \left (2 c^{2} f^{2}+16 d f c -d^{2}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{2 f^{3}}+\frac {3 a^{2} d \left (6 c^{2} f^{2}+16 d f c -d^{2}\right ) x^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{8 f^{2}}-\frac {3 a^{2} d^{2} \left (c f -4 d \right ) x^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f^{2}}+\frac {3 a^{2} d^{2} \left (c f +4 d \right ) x^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{f^{2}}+\frac {a^{2} d^{2} \left (3 c f +4 d \right ) x^{3} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{2 f}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{2}}\) | \(750\) |
parts | \(\text {Expression too large to display}\) | \(917\) |
derivativedivides | \(\text {Expression too large to display}\) | \(1135\) |
default | \(\text {Expression too large to display}\) | \(1135\) |
orering | \(\text {Expression too large to display}\) | \(1317\) |
Input:
int((d*x+c)^3*(a+a*sin(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
-1/4*a^2*(((d*x+c)^2*f^2-3/2*d^2)*f*(d*x+c)*sin(2*f*x+2*e)+3/2*d*((d*x+c)^ 2*f^2-1/2*d^2)*cos(2*f*x+2*e)+8*((d*x+c)^2*f^2-6*d^2)*f*(d*x+c)*cos(f*x+e) -24*((d*x+c)^2*f^2-2*d^2)*d*sin(f*x+e)+(-6*x^3*c*d^2-9*x^2*c^2*d-3/2*d^3*x ^4-6*c^3*x)*f^4+8*c^3*f^3-3/2*c^2*d*f^2-48*c*d^2*f+3/4*d^3)/f^4
Time = 0.09 (sec) , antiderivative size = 368, normalized size of antiderivative = 1.64 \[ \int (c+d x)^3 (a+a \sin (e+f x))^2 \, dx=\frac {3 \, a^{2} d^{3} f^{4} x^{4} + 12 \, a^{2} c d^{2} f^{4} x^{3} + 3 \, {\left (6 \, a^{2} c^{2} d f^{4} + a^{2} d^{3} f^{2}\right )} x^{2} - 3 \, {\left (2 \, a^{2} d^{3} f^{2} x^{2} + 4 \, a^{2} c d^{2} f^{2} x + 2 \, a^{2} c^{2} d f^{2} - a^{2} d^{3}\right )} \cos \left (f x + e\right )^{2} + 6 \, {\left (2 \, a^{2} c^{3} f^{4} + a^{2} c d^{2} f^{2}\right )} x - 16 \, {\left (a^{2} d^{3} f^{3} x^{3} + 3 \, a^{2} c d^{2} f^{3} x^{2} + a^{2} c^{3} f^{3} - 6 \, a^{2} c d^{2} f + 3 \, {\left (a^{2} c^{2} d f^{3} - 2 \, a^{2} d^{3} f\right )} x\right )} \cos \left (f x + e\right ) + 2 \, {\left (24 \, a^{2} d^{3} f^{2} x^{2} + 48 \, a^{2} c d^{2} f^{2} x + 24 \, a^{2} c^{2} d f^{2} - 48 \, a^{2} d^{3} - {\left (2 \, a^{2} d^{3} f^{3} x^{3} + 6 \, a^{2} c d^{2} f^{3} x^{2} + 2 \, a^{2} c^{3} f^{3} - 3 \, a^{2} c d^{2} f + 3 \, {\left (2 \, a^{2} c^{2} d f^{3} - a^{2} d^{3} f\right )} x\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{8 \, f^{4}} \] Input:
integrate((d*x+c)^3*(a+a*sin(f*x+e))^2,x, algorithm="fricas")
Output:
1/8*(3*a^2*d^3*f^4*x^4 + 12*a^2*c*d^2*f^4*x^3 + 3*(6*a^2*c^2*d*f^4 + a^2*d ^3*f^2)*x^2 - 3*(2*a^2*d^3*f^2*x^2 + 4*a^2*c*d^2*f^2*x + 2*a^2*c^2*d*f^2 - a^2*d^3)*cos(f*x + e)^2 + 6*(2*a^2*c^3*f^4 + a^2*c*d^2*f^2)*x - 16*(a^2*d ^3*f^3*x^3 + 3*a^2*c*d^2*f^3*x^2 + a^2*c^3*f^3 - 6*a^2*c*d^2*f + 3*(a^2*c^ 2*d*f^3 - 2*a^2*d^3*f)*x)*cos(f*x + e) + 2*(24*a^2*d^3*f^2*x^2 + 48*a^2*c* d^2*f^2*x + 24*a^2*c^2*d*f^2 - 48*a^2*d^3 - (2*a^2*d^3*f^3*x^3 + 6*a^2*c*d ^2*f^3*x^2 + 2*a^2*c^3*f^3 - 3*a^2*c*d^2*f + 3*(2*a^2*c^2*d*f^3 - a^2*d^3* f)*x)*cos(f*x + e))*sin(f*x + e))/f^4
Leaf count of result is larger than twice the leaf count of optimal. 779 vs. \(2 (228) = 456\).
Time = 0.42 (sec) , antiderivative size = 779, normalized size of antiderivative = 3.48 \[ \int (c+d x)^3 (a+a \sin (e+f x))^2 \, dx =\text {Too large to display} \] Input:
integrate((d*x+c)**3*(a+a*sin(f*x+e))**2,x)
Output:
Piecewise((a**2*c**3*x*sin(e + f*x)**2/2 + a**2*c**3*x*cos(e + f*x)**2/2 + a**2*c**3*x - a**2*c**3*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*a**2*c**3*cos (e + f*x)/f + 3*a**2*c**2*d*x**2*sin(e + f*x)**2/4 + 3*a**2*c**2*d*x**2*co s(e + f*x)**2/4 + 3*a**2*c**2*d*x**2/2 - 3*a**2*c**2*d*x*sin(e + f*x)*cos( e + f*x)/(2*f) - 6*a**2*c**2*d*x*cos(e + f*x)/f + 3*a**2*c**2*d*sin(e + f* x)**2/(4*f**2) + 6*a**2*c**2*d*sin(e + f*x)/f**2 + a**2*c*d**2*x**3*sin(e + f*x)**2/2 + a**2*c*d**2*x**3*cos(e + f*x)**2/2 + a**2*c*d**2*x**3 - 3*a* *2*c*d**2*x**2*sin(e + f*x)*cos(e + f*x)/(2*f) - 6*a**2*c*d**2*x**2*cos(e + f*x)/f + 3*a**2*c*d**2*x*sin(e + f*x)**2/(4*f**2) + 12*a**2*c*d**2*x*sin (e + f*x)/f**2 - 3*a**2*c*d**2*x*cos(e + f*x)**2/(4*f**2) + 3*a**2*c*d**2* sin(e + f*x)*cos(e + f*x)/(4*f**3) + 12*a**2*c*d**2*cos(e + f*x)/f**3 + a* *2*d**3*x**4*sin(e + f*x)**2/8 + a**2*d**3*x**4*cos(e + f*x)**2/8 + a**2*d **3*x**4/4 - a**2*d**3*x**3*sin(e + f*x)*cos(e + f*x)/(2*f) - 2*a**2*d**3* x**3*cos(e + f*x)/f + 3*a**2*d**3*x**2*sin(e + f*x)**2/(8*f**2) + 6*a**2*d **3*x**2*sin(e + f*x)/f**2 - 3*a**2*d**3*x**2*cos(e + f*x)**2/(8*f**2) + 3 *a**2*d**3*x*sin(e + f*x)*cos(e + f*x)/(4*f**3) + 12*a**2*d**3*x*cos(e + f *x)/f**3 - 3*a**2*d**3*sin(e + f*x)**2/(8*f**4) - 12*a**2*d**3*sin(e + f*x )/f**4, Ne(f, 0)), ((a*sin(e) + a)**2*(c**3*x + 3*c**2*d*x**2/2 + c*d**2*x **3 + d**3*x**4/4), True))
Leaf count of result is larger than twice the leaf count of optimal. 969 vs. \(2 (212) = 424\).
Time = 0.08 (sec) , antiderivative size = 969, normalized size of antiderivative = 4.33 \[ \int (c+d x)^3 (a+a \sin (e+f x))^2 \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)^3*(a+a*sin(f*x+e))^2,x, algorithm="maxima")
Output:
1/16*(4*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c^3 + 16*(f*x + e)*a^2*c^3 + 4*(f*x + e)^4*a^2*d^3/f^3 - 16*(f*x + e)^3*a^2*d^3*e/f^3 + 24*(f*x + e)^2* a^2*d^3*e^2/f^3 - 4*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*d^3*e^3/f^3 - 16* (f*x + e)*a^2*d^3*e^3/f^3 + 16*(f*x + e)^3*a^2*c*d^2/f^2 - 48*(f*x + e)^2* a^2*c*d^2*e/f^2 + 12*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c*d^2*e^2/f^2 + 48*(f*x + e)*a^2*c*d^2*e^2/f^2 + 24*(f*x + e)^2*a^2*c^2*d/f - 12*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*c^2*d*e/f - 48*(f*x + e)*a^2*c^2*d*e/f - 32*a^ 2*c^3*cos(f*x + e) + 32*a^2*d^3*e^3*cos(f*x + e)/f^3 - 96*a^2*c*d^2*e^2*co s(f*x + e)/f^2 + 96*a^2*c^2*d*e*cos(f*x + e)/f + 6*(2*(f*x + e)^2 - 2*(f*x + e)*sin(2*f*x + 2*e) - cos(2*f*x + 2*e))*a^2*d^3*e^2/f^3 - 96*((f*x + e) *cos(f*x + e) - sin(f*x + e))*a^2*d^3*e^2/f^3 - 12*(2*(f*x + e)^2 - 2*(f*x + e)*sin(2*f*x + 2*e) - cos(2*f*x + 2*e))*a^2*c*d^2*e/f^2 + 192*((f*x + e )*cos(f*x + e) - sin(f*x + e))*a^2*c*d^2*e/f^2 + 6*(2*(f*x + e)^2 - 2*(f*x + e)*sin(2*f*x + 2*e) - cos(2*f*x + 2*e))*a^2*c^2*d/f - 96*((f*x + e)*cos (f*x + e) - sin(f*x + e))*a^2*c^2*d/f - 2*(4*(f*x + e)^3 - 6*(f*x + e)*cos (2*f*x + 2*e) - 3*(2*(f*x + e)^2 - 1)*sin(2*f*x + 2*e))*a^2*d^3*e/f^3 + 96 *(((f*x + e)^2 - 2)*cos(f*x + e) - 2*(f*x + e)*sin(f*x + e))*a^2*d^3*e/f^3 + 2*(4*(f*x + e)^3 - 6*(f*x + e)*cos(2*f*x + 2*e) - 3*(2*(f*x + e)^2 - 1) *sin(2*f*x + 2*e))*a^2*c*d^2/f^2 - 96*(((f*x + e)^2 - 2)*cos(f*x + e) - 2* (f*x + e)*sin(f*x + e))*a^2*c*d^2/f^2 + (2*(f*x + e)^4 - 3*(2*(f*x + e)...
Time = 0.32 (sec) , antiderivative size = 335, normalized size of antiderivative = 1.50 \[ \int (c+d x)^3 (a+a \sin (e+f x))^2 \, dx=\frac {3}{8} \, a^{2} d^{3} x^{4} + \frac {3}{2} \, a^{2} c d^{2} x^{3} + \frac {9}{4} \, a^{2} c^{2} d x^{2} + \frac {3}{2} \, a^{2} c^{3} x - \frac {3 \, {\left (2 \, a^{2} d^{3} f^{2} x^{2} + 4 \, a^{2} c d^{2} f^{2} x + 2 \, a^{2} c^{2} d f^{2} - a^{2} d^{3}\right )} \cos \left (2 \, f x + 2 \, e\right )}{16 \, f^{4}} - \frac {2 \, {\left (a^{2} d^{3} f^{3} x^{3} + 3 \, a^{2} c d^{2} f^{3} x^{2} + 3 \, a^{2} c^{2} d f^{3} x + a^{2} c^{3} f^{3} - 6 \, a^{2} d^{3} f x - 6 \, a^{2} c d^{2} f\right )} \cos \left (f x + e\right )}{f^{4}} - \frac {{\left (2 \, a^{2} d^{3} f^{3} x^{3} + 6 \, a^{2} c d^{2} f^{3} x^{2} + 6 \, a^{2} c^{2} d f^{3} x + 2 \, a^{2} c^{3} f^{3} - 3 \, a^{2} d^{3} f x - 3 \, a^{2} c d^{2} f\right )} \sin \left (2 \, f x + 2 \, e\right )}{8 \, f^{4}} + \frac {6 \, {\left (a^{2} d^{3} f^{2} x^{2} + 2 \, a^{2} c d^{2} f^{2} x + a^{2} c^{2} d f^{2} - 2 \, a^{2} d^{3}\right )} \sin \left (f x + e\right )}{f^{4}} \] Input:
integrate((d*x+c)^3*(a+a*sin(f*x+e))^2,x, algorithm="giac")
Output:
3/8*a^2*d^3*x^4 + 3/2*a^2*c*d^2*x^3 + 9/4*a^2*c^2*d*x^2 + 3/2*a^2*c^3*x - 3/16*(2*a^2*d^3*f^2*x^2 + 4*a^2*c*d^2*f^2*x + 2*a^2*c^2*d*f^2 - a^2*d^3)*c os(2*f*x + 2*e)/f^4 - 2*(a^2*d^3*f^3*x^3 + 3*a^2*c*d^2*f^3*x^2 + 3*a^2*c^2 *d*f^3*x + a^2*c^3*f^3 - 6*a^2*d^3*f*x - 6*a^2*c*d^2*f)*cos(f*x + e)/f^4 - 1/8*(2*a^2*d^3*f^3*x^3 + 6*a^2*c*d^2*f^3*x^2 + 6*a^2*c^2*d*f^3*x + 2*a^2* c^3*f^3 - 3*a^2*d^3*f*x - 3*a^2*c*d^2*f)*sin(2*f*x + 2*e)/f^4 + 6*(a^2*d^3 *f^2*x^2 + 2*a^2*c*d^2*f^2*x + a^2*c^2*d*f^2 - 2*a^2*d^3)*sin(f*x + e)/f^4
Time = 36.62 (sec) , antiderivative size = 452, normalized size of antiderivative = 2.02 \[ \int (c+d x)^3 (a+a \sin (e+f x))^2 \, dx=-\frac {96\,a^2\,d^3\,\sin \left (e+f\,x\right )-\frac {3\,a^2\,d^3\,\cos \left (2\,e+2\,f\,x\right )}{2}+16\,a^2\,c^3\,f^3\,\cos \left (e+f\,x\right )-12\,a^2\,c^3\,f^4\,x+2\,a^2\,c^3\,f^3\,\sin \left (2\,e+2\,f\,x\right )-3\,a^2\,d^3\,f^4\,x^4-96\,a^2\,c\,d^2\,f\,\cos \left (e+f\,x\right )-96\,a^2\,d^3\,f\,x\,\cos \left (e+f\,x\right )+3\,a^2\,d^3\,f^2\,x^2\,\cos \left (2\,e+2\,f\,x\right )+2\,a^2\,d^3\,f^3\,x^3\,\sin \left (2\,e+2\,f\,x\right )-3\,a^2\,c\,d^2\,f\,\sin \left (2\,e+2\,f\,x\right )-48\,a^2\,c^2\,d\,f^2\,\sin \left (e+f\,x\right )-3\,a^2\,d^3\,f\,x\,\sin \left (2\,e+2\,f\,x\right )+3\,a^2\,c^2\,d\,f^2\,\cos \left (2\,e+2\,f\,x\right )-18\,a^2\,c^2\,d\,f^4\,x^2-12\,a^2\,c\,d^2\,f^4\,x^3+16\,a^2\,d^3\,f^3\,x^3\,\cos \left (e+f\,x\right )-48\,a^2\,d^3\,f^2\,x^2\,\sin \left (e+f\,x\right )+6\,a^2\,c\,d^2\,f^2\,x\,\cos \left (2\,e+2\,f\,x\right )+48\,a^2\,c\,d^2\,f^3\,x^2\,\cos \left (e+f\,x\right )+6\,a^2\,c^2\,d\,f^3\,x\,\sin \left (2\,e+2\,f\,x\right )+6\,a^2\,c\,d^2\,f^3\,x^2\,\sin \left (2\,e+2\,f\,x\right )+48\,a^2\,c^2\,d\,f^3\,x\,\cos \left (e+f\,x\right )-96\,a^2\,c\,d^2\,f^2\,x\,\sin \left (e+f\,x\right )}{8\,f^4} \] Input:
int((a + a*sin(e + f*x))^2*(c + d*x)^3,x)
Output:
-(96*a^2*d^3*sin(e + f*x) - (3*a^2*d^3*cos(2*e + 2*f*x))/2 + 16*a^2*c^3*f^ 3*cos(e + f*x) - 12*a^2*c^3*f^4*x + 2*a^2*c^3*f^3*sin(2*e + 2*f*x) - 3*a^2 *d^3*f^4*x^4 - 96*a^2*c*d^2*f*cos(e + f*x) - 96*a^2*d^3*f*x*cos(e + f*x) + 3*a^2*d^3*f^2*x^2*cos(2*e + 2*f*x) + 2*a^2*d^3*f^3*x^3*sin(2*e + 2*f*x) - 3*a^2*c*d^2*f*sin(2*e + 2*f*x) - 48*a^2*c^2*d*f^2*sin(e + f*x) - 3*a^2*d^ 3*f*x*sin(2*e + 2*f*x) + 3*a^2*c^2*d*f^2*cos(2*e + 2*f*x) - 18*a^2*c^2*d*f ^4*x^2 - 12*a^2*c*d^2*f^4*x^3 + 16*a^2*d^3*f^3*x^3*cos(e + f*x) - 48*a^2*d ^3*f^2*x^2*sin(e + f*x) + 6*a^2*c*d^2*f^2*x*cos(2*e + 2*f*x) + 48*a^2*c*d^ 2*f^3*x^2*cos(e + f*x) + 6*a^2*c^2*d*f^3*x*sin(2*e + 2*f*x) + 6*a^2*c*d^2* f^3*x^2*sin(2*e + 2*f*x) + 48*a^2*c^2*d*f^3*x*cos(e + f*x) - 96*a^2*c*d^2* f^2*x*sin(e + f*x))/(8*f^4)
Time = 0.21 (sec) , antiderivative size = 432, normalized size of antiderivative = 1.93 \[ \int (c+d x)^3 (a+a \sin (e+f x))^2 \, dx=\frac {a^{2} \left (-12 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c^{2} d \,f^{3} x -12 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c \,d^{2} f^{3} x^{2}-4 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c^{3} f^{3}+6 \sin \left (f x +e \right )^{2} c^{2} d \,f^{2}+6 \sin \left (f x +e \right )^{2} d^{3} f^{2} x^{2}-6 c \,d^{2} f^{2} x +12 c^{3} f^{4} x -12 c^{2} d \,f^{2}-3 d^{3} f^{2} x^{2}+6 d^{3}+3 d^{3} f^{4} x^{4}+96 \cos \left (f x +e \right ) c \,d^{2} f -16 \cos \left (f x +e \right ) d^{3} f^{3} x^{3}+96 \cos \left (f x +e \right ) d^{3} f x +48 \sin \left (f x +e \right ) c^{2} d \,f^{2}+48 \sin \left (f x +e \right ) d^{3} f^{2} x^{2}+18 c^{2} d \,f^{4} x^{2}+12 c \,d^{2} f^{4} x^{3}-48 \cos \left (f x +e \right ) c^{2} d \,f^{3} x -48 \cos \left (f x +e \right ) c \,d^{2} f^{3} x^{2}+96 \sin \left (f x +e \right ) c \,d^{2} f^{2} x -3 \sin \left (f x +e \right )^{2} d^{3}+6 \cos \left (f x +e \right ) \sin \left (f x +e \right ) c \,d^{2} f -4 \cos \left (f x +e \right ) \sin \left (f x +e \right ) d^{3} f^{3} x^{3}+6 \cos \left (f x +e \right ) \sin \left (f x +e \right ) d^{3} f x +12 \sin \left (f x +e \right )^{2} c \,d^{2} f^{2} x -96 \sin \left (f x +e \right ) d^{3}-16 \cos \left (f x +e \right ) c^{3} f^{3}\right )}{8 f^{4}} \] Input:
int((d*x+c)^3*(a+a*sin(f*x+e))^2,x)
Output:
(a**2*( - 4*cos(e + f*x)*sin(e + f*x)*c**3*f**3 - 12*cos(e + f*x)*sin(e + f*x)*c**2*d*f**3*x - 12*cos(e + f*x)*sin(e + f*x)*c*d**2*f**3*x**2 + 6*cos (e + f*x)*sin(e + f*x)*c*d**2*f - 4*cos(e + f*x)*sin(e + f*x)*d**3*f**3*x* *3 + 6*cos(e + f*x)*sin(e + f*x)*d**3*f*x - 16*cos(e + f*x)*c**3*f**3 - 48 *cos(e + f*x)*c**2*d*f**3*x - 48*cos(e + f*x)*c*d**2*f**3*x**2 + 96*cos(e + f*x)*c*d**2*f - 16*cos(e + f*x)*d**3*f**3*x**3 + 96*cos(e + f*x)*d**3*f* x + 6*sin(e + f*x)**2*c**2*d*f**2 + 12*sin(e + f*x)**2*c*d**2*f**2*x + 6*s in(e + f*x)**2*d**3*f**2*x**2 - 3*sin(e + f*x)**2*d**3 + 48*sin(e + f*x)*c **2*d*f**2 + 96*sin(e + f*x)*c*d**2*f**2*x + 48*sin(e + f*x)*d**3*f**2*x** 2 - 96*sin(e + f*x)*d**3 + 12*c**3*f**4*x + 18*c**2*d*f**4*x**2 - 12*c**2* d*f**2 + 12*c*d**2*f**4*x**3 - 6*c*d**2*f**2*x + 3*d**3*f**4*x**4 - 3*d**3 *f**2*x**2 + 6*d**3))/(8*f**4)