Integrand size = 39, antiderivative size = 195 \[ \int (a+b \sin (d+e x)) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^2 \, dx=\frac {3}{8} a \left (a^4+12 a^2 b^2+8 b^4\right ) x-\frac {b \left (32 a^4+69 a^2 b^2+4 b^4\right ) \cos (d+e x)}{10 e}-\frac {a \left (15 a^4+82 a^2 b^2+8 b^4\right ) \cos (d+e x) \sin (d+e x)}{40 e}-\frac {b \left (17 a^2+4 b^2\right ) \cos (d+e x) (b+a \sin (d+e x))^2}{20 e}-\frac {\left (5 a^2+4 b^2\right ) \cos (d+e x) (b+a \sin (d+e x))^3}{20 e}-\frac {b \cos (d+e x) (b+a \sin (d+e x))^4}{5 e} \] Output:
3/8*a*(a^4+12*a^2*b^2+8*b^4)*x-1/10*b*(32*a^4+69*a^2*b^2+4*b^4)*cos(e*x+d) /e-1/40*a*(15*a^4+82*a^2*b^2+8*b^4)*cos(e*x+d)*sin(e*x+d)/e-1/20*b*(17*a^2 +4*b^2)*cos(e*x+d)*(b+a*sin(e*x+d))^2/e-1/20*(5*a^2+4*b^2)*cos(e*x+d)*(b+a *sin(e*x+d))^3/e-1/5*b*cos(e*x+d)*(b+a*sin(e*x+d))^4/e
Time = 1.95 (sec) , antiderivative size = 149, normalized size of antiderivative = 0.76 \[ \int (a+b \sin (d+e x)) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^2 \, dx=\frac {-20 b \left (29 a^4+68 a^2 b^2+8 b^4\right ) \cos (d+e x)+a \left (60 \left (a^4+12 a^2 b^2+8 b^4\right ) (d+e x)+10 \left (7 a^3 b+8 a b^3\right ) \cos (3 (d+e x))-2 a^3 b \cos (5 (d+e x))-40 \left (a^4+10 a^2 b^2+4 b^4\right ) \sin (2 (d+e x))+5 \left (a^4+4 a^2 b^2\right ) \sin (4 (d+e x))\right )}{160 e} \] Input:
Integrate[(a + b*Sin[d + e*x])*(b^2 + 2*a*b*Sin[d + e*x] + a^2*Sin[d + e*x ]^2)^2,x]
Output:
(-20*b*(29*a^4 + 68*a^2*b^2 + 8*b^4)*Cos[d + e*x] + a*(60*(a^4 + 12*a^2*b^ 2 + 8*b^4)*(d + e*x) + 10*(7*a^3*b + 8*a*b^3)*Cos[3*(d + e*x)] - 2*a^3*b*C os[5*(d + e*x)] - 40*(a^4 + 10*a^2*b^2 + 4*b^4)*Sin[2*(d + e*x)] + 5*(a^4 + 4*a^2*b^2)*Sin[4*(d + e*x)]))/(160*e)
Time = 0.95 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.20, number of steps used = 12, number of rules used = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.308, Rules used = {3042, 3769, 27, 3042, 3232, 3042, 3232, 27, 3042, 3232, 3042, 3213}
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 (a+b \sin (d+e x)) \left (a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2\right )^2 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \sin (d+e x)) \left (a^2 \sin (d+e x)^2+2 a b \sin (d+e x)+b^2\right )^2dx\) |
\(\Big \downarrow \) 3769 |
\(\displaystyle \frac {\int 16 \left (\sin (d+e x) a^2+b a\right )^4 (a+b \sin (d+e x))dx}{16 a^4}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\int \left (\sin (d+e x) a^2+b a\right )^4 (a+b \sin (d+e x))dx}{a^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \left (\sin (d+e x) a^2+b a\right )^4 (a+b \sin (d+e x))dx}{a^4}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{5} \int \left (\sin (d+e x) a^2+b a\right )^3 \left (9 b a^2+\left (5 a^2+4 b^2\right ) \sin (d+e x) a\right )dx-\frac {b \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^4}{5 e}}{a^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{5} \int \left (\sin (d+e x) a^2+b a\right )^3 \left (9 b a^2+\left (5 a^2+4 b^2\right ) \sin (d+e x) a\right )dx-\frac {b \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^4}{5 e}}{a^4}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {1}{4} \int 3 \left (\sin (d+e x) a^2+b a\right )^2 \left (\left (5 a^2+16 b^2\right ) a^3+b \left (17 a^2+4 b^2\right ) \sin (d+e x) a^2\right )dx-\frac {a \left (5 a^2+4 b^2\right ) \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^3}{4 e}\right )-\frac {b \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^4}{5 e}}{a^4}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \int \left (\sin (d+e x) a^2+b a\right )^2 \left (\left (5 a^2+16 b^2\right ) a^3+b \left (17 a^2+4 b^2\right ) \sin (d+e x) a^2\right )dx-\frac {a \left (5 a^2+4 b^2\right ) \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^3}{4 e}\right )-\frac {b \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^4}{5 e}}{a^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \int \left (\sin (d+e x) a^2+b a\right )^2 \left (\left (5 a^2+16 b^2\right ) a^3+b \left (17 a^2+4 b^2\right ) \sin (d+e x) a^2\right )dx-\frac {a \left (5 a^2+4 b^2\right ) \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^3}{4 e}\right )-\frac {b \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^4}{5 e}}{a^4}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \left (\frac {1}{3} \int \left (\sin (d+e x) a^2+b a\right ) \left (7 b \left (7 a^2+8 b^2\right ) a^4+\left (15 a^4+82 b^2 a^2+8 b^4\right ) \sin (d+e x) a^3\right )dx-\frac {b \left (17 a^2+4 b^2\right ) \cos (d+e x) \left (a^3 \sin (d+e x)+a^2 b\right )^2}{3 e}\right )-\frac {a \left (5 a^2+4 b^2\right ) \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^3}{4 e}\right )-\frac {b \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^4}{5 e}}{a^4}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \left (\frac {1}{3} \int \left (\sin (d+e x) a^2+b a\right ) \left (7 b \left (7 a^2+8 b^2\right ) a^4+\left (15 a^4+82 b^2 a^2+8 b^4\right ) \sin (d+e x) a^3\right )dx-\frac {b \left (17 a^2+4 b^2\right ) \cos (d+e x) \left (a^3 \sin (d+e x)+a^2 b\right )^2}{3 e}\right )-\frac {a \left (5 a^2+4 b^2\right ) \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^3}{4 e}\right )-\frac {b \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^4}{5 e}}{a^4}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {\frac {1}{5} \left (\frac {3}{4} \left (\frac {1}{3} \left (-\frac {2 a^4 b \left (32 a^4+69 a^2 b^2+4 b^4\right ) \cos (d+e x)}{e}-\frac {a^5 \left (15 a^4+82 a^2 b^2+8 b^4\right ) \sin (d+e x) \cos (d+e x)}{2 e}+\frac {15}{2} a^5 x \left (a^4+12 a^2 b^2+8 b^4\right )\right )-\frac {b \left (17 a^2+4 b^2\right ) \cos (d+e x) \left (a^3 \sin (d+e x)+a^2 b\right )^2}{3 e}\right )-\frac {a \left (5 a^2+4 b^2\right ) \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^3}{4 e}\right )-\frac {b \cos (d+e x) \left (a^2 \sin (d+e x)+a b\right )^4}{5 e}}{a^4}\) |
Input:
Int[(a + b*Sin[d + e*x])*(b^2 + 2*a*b*Sin[d + e*x] + a^2*Sin[d + e*x]^2)^2 ,x]
Output:
(-1/5*(b*Cos[d + e*x]*(a*b + a^2*Sin[d + e*x])^4)/e + (-1/4*(a*(5*a^2 + 4* b^2)*Cos[d + e*x]*(a*b + a^2*Sin[d + e*x])^3)/e + (3*(-1/3*(b*(17*a^2 + 4* b^2)*Cos[d + e*x]*(a^2*b + a^3*Sin[d + e*x])^2)/e + ((15*a^5*(a^4 + 12*a^2 *b^2 + 8*b^4)*x)/2 - (2*a^4*b*(32*a^4 + 69*a^2*b^2 + 4*b^4)*Cos[d + e*x])/ e - (a^5*(15*a^4 + 82*a^2*b^2 + 8*b^4)*Cos[d + e*x]*Sin[d + e*x])/(2*e))/3 ))/4)/5)/a^4
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, x]]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.) *(x_)]), x_Symbol] :> Simp[(2*a*c + b*d)*(x/2), x] + (-Simp[(b*c + a*d)*(Co s[e + f*x]/f), x] - Simp[b*d*Cos[e + f*x]*(Sin[e + f*x]/(2*f)), x]) /; Free Q[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-d)*Cos[e + f*x]*((a + b*Sin[e + f*x])^m/( f*(m + 1))), x] + Simp[1/(m + 1) Int[(a + b*Sin[e + f*x])^(m - 1)*Simp[b* d*m + a*c*(m + 1) + (a*d*m + b*c*(m + 1))*Sin[e + f*x], x], x], x] /; FreeQ [{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && GtQ[m, 0] && IntegerQ[2*m]
Int[((A_) + (B_.)*sin[(d_.) + (e_.)*(x_)])*((a_) + (b_.)*sin[(d_.) + (e_.)* (x_)] + (c_.)*sin[(d_.) + (e_.)*(x_)]^2)^(n_), x_Symbol] :> Simp[1/(4^n*c^n ) Int[(A + B*Sin[d + e*x])*(b + 2*c*Sin[d + e*x])^(2*n), x], x] /; FreeQ[ {a, b, c, d, e, A, B}, x] && EqQ[b^2 - 4*a*c, 0] && IntegerQ[n]
Time = 31.36 (sec) , antiderivative size = 172, normalized size of antiderivative = 0.88
method | result | size |
parallelrisch | \(\frac {\left (-40 a^{5}-400 a^{3} b^{2}-160 a \,b^{4}\right ) \sin \left (2 e x +2 d \right )+\left (70 a^{4} b +80 a^{2} b^{3}\right ) \cos \left (3 e x +3 d \right )+\left (5 a^{5}+20 a^{3} b^{2}\right ) \sin \left (4 e x +4 d \right )-2 a^{4} b \cos \left (5 e x +5 d \right )+\left (-580 a^{4} b -1360 a^{2} b^{3}-160 b^{5}\right ) \cos \left (e x +d \right )+60 x \,a^{5} e +720 x \,a^{3} b^{2} e +480 x a \,b^{4} e -512 a^{4} b -1280 a^{2} b^{3}-160 b^{5}}{160 e}\) | \(172\) |
parts | \(a \,b^{4} x -\frac {\left (4 a^{2} b^{3}+b^{5}\right ) \cos \left (e x +d \right )}{e}+\frac {\left (6 a^{3} b^{2}+4 a \,b^{4}\right ) \left (-\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )}{e}-\frac {\left (4 a^{4} b +6 a^{2} b^{3}\right ) \left (2+\sin \left (e x +d \right )^{2}\right ) \cos \left (e x +d \right )}{3 e}+\frac {\left (a^{5}+4 a^{3} b^{2}\right ) \left (-\frac {\left (\sin \left (e x +d \right )^{3}+\frac {3 \sin \left (e x +d \right )}{2}\right ) \cos \left (e x +d \right )}{4}+\frac {3 e x}{8}+\frac {3 d}{8}\right )}{e}-\frac {a^{4} b \left (\frac {8}{3}+\sin \left (e x +d \right )^{4}+\frac {4 \sin \left (e x +d \right )^{2}}{3}\right ) \cos \left (e x +d \right )}{5 e}\) | \(192\) |
risch | \(\frac {3 a^{5} x}{8}+\frac {9 a^{3} b^{2} x}{2}+3 a \,b^{4} x -\frac {29 b \cos \left (e x +d \right ) a^{4}}{8 e}-\frac {17 b^{3} \cos \left (e x +d \right ) a^{2}}{2 e}-\frac {b^{5} \cos \left (e x +d \right )}{e}-\frac {b \,a^{4} \cos \left (5 e x +5 d \right )}{80 e}+\frac {\sin \left (4 e x +4 d \right ) a^{5}}{32 e}+\frac {\sin \left (4 e x +4 d \right ) a^{3} b^{2}}{8 e}+\frac {7 a^{4} b \cos \left (3 e x +3 d \right )}{16 e}+\frac {a^{2} b^{3} \cos \left (3 e x +3 d \right )}{2 e}-\frac {\sin \left (2 e x +2 d \right ) a^{5}}{4 e}-\frac {5 \sin \left (2 e x +2 d \right ) a^{3} b^{2}}{2 e}-\frac {\sin \left (2 e x +2 d \right ) a \,b^{4}}{e}\) | \(218\) |
derivativedivides | \(\frac {a \,b^{4} \left (e x +d \right )-4 a^{2} b^{3} \cos \left (e x +d \right )+6 a^{3} b^{2} \left (-\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )-\frac {4 a^{4} b \left (2+\sin \left (e x +d \right )^{2}\right ) \cos \left (e x +d \right )}{3}+a^{5} \left (-\frac {\left (\sin \left (e x +d \right )^{3}+\frac {3 \sin \left (e x +d \right )}{2}\right ) \cos \left (e x +d \right )}{4}+\frac {3 e x}{8}+\frac {3 d}{8}\right )-b^{5} \cos \left (e x +d \right )+4 a \,b^{4} \left (-\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )-2 a^{2} b^{3} \left (2+\sin \left (e x +d \right )^{2}\right ) \cos \left (e x +d \right )+4 a^{3} b^{2} \left (-\frac {\left (\sin \left (e x +d \right )^{3}+\frac {3 \sin \left (e x +d \right )}{2}\right ) \cos \left (e x +d \right )}{4}+\frac {3 e x}{8}+\frac {3 d}{8}\right )-\frac {a^{4} b \left (\frac {8}{3}+\sin \left (e x +d \right )^{4}+\frac {4 \sin \left (e x +d \right )^{2}}{3}\right ) \cos \left (e x +d \right )}{5}}{e}\) | \(255\) |
default | \(\frac {a \,b^{4} \left (e x +d \right )-4 a^{2} b^{3} \cos \left (e x +d \right )+6 a^{3} b^{2} \left (-\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )-\frac {4 a^{4} b \left (2+\sin \left (e x +d \right )^{2}\right ) \cos \left (e x +d \right )}{3}+a^{5} \left (-\frac {\left (\sin \left (e x +d \right )^{3}+\frac {3 \sin \left (e x +d \right )}{2}\right ) \cos \left (e x +d \right )}{4}+\frac {3 e x}{8}+\frac {3 d}{8}\right )-b^{5} \cos \left (e x +d \right )+4 a \,b^{4} \left (-\frac {\cos \left (e x +d \right ) \sin \left (e x +d \right )}{2}+\frac {e x}{2}+\frac {d}{2}\right )-2 a^{2} b^{3} \left (2+\sin \left (e x +d \right )^{2}\right ) \cos \left (e x +d \right )+4 a^{3} b^{2} \left (-\frac {\left (\sin \left (e x +d \right )^{3}+\frac {3 \sin \left (e x +d \right )}{2}\right ) \cos \left (e x +d \right )}{4}+\frac {3 e x}{8}+\frac {3 d}{8}\right )-\frac {a^{4} b \left (\frac {8}{3}+\sin \left (e x +d \right )^{4}+\frac {4 \sin \left (e x +d \right )^{2}}{3}\right ) \cos \left (e x +d \right )}{5}}{e}\) | \(255\) |
norman | \(\frac {\left (3 a \,b^{4}+\frac {3}{8} a^{5}+\frac {9}{2} a^{3} b^{2}\right ) x +\left (3 a \,b^{4}+\frac {3}{8} a^{5}+\frac {9}{2} a^{3} b^{2}\right ) x \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{10}+\left (15 a \,b^{4}+\frac {15}{8} a^{5}+\frac {45}{2} a^{3} b^{2}\right ) x \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{2}+\left (15 a \,b^{4}+\frac {15}{8} a^{5}+\frac {45}{2} a^{3} b^{2}\right ) x \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{8}+\left (30 a \,b^{4}+\frac {15}{4} a^{5}+45 a^{3} b^{2}\right ) x \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{4}+\left (30 a \,b^{4}+\frac {15}{4} a^{5}+45 a^{3} b^{2}\right ) x \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{6}-\frac {32 a^{4} b +80 a^{2} b^{3}+10 b^{5}}{5 e}-\frac {\left (8 a^{2} b^{3}+2 b^{5}\right ) \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{8}}{e}-\frac {2 \left (8 a^{4} b +28 a^{2} b^{3}+4 b^{5}\right ) \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{6}}{e}-\frac {2 \left (24 a^{4} b +52 a^{2} b^{3}+6 b^{5}\right ) \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{4}}{e}-\frac {\left (32 a^{4} b +72 a^{2} b^{3}+8 b^{5}\right ) \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{2}}{e}-\frac {a \left (3 a^{4}+36 a^{2} b^{2}+16 b^{4}\right ) \tan \left (\frac {e x}{2}+\frac {d}{2}\right )}{4 e}+\frac {a \left (3 a^{4}+36 a^{2} b^{2}+16 b^{4}\right ) \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{9}}{4 e}-\frac {a \left (7 a^{4}+52 a^{2} b^{2}+16 b^{4}\right ) \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{3}}{2 e}+\frac {a \left (7 a^{4}+52 a^{2} b^{2}+16 b^{4}\right ) \tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{7}}{2 e}}{\left (1+\tan \left (\frac {e x}{2}+\frac {d}{2}\right )^{2}\right )^{5}}\) | \(510\) |
orering | \(\text {Expression too large to display}\) | \(12122\) |
Input:
int((a+b*sin(e*x+d))*(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^2,x,method=_R ETURNVERBOSE)
Output:
1/160*((-40*a^5-400*a^3*b^2-160*a*b^4)*sin(2*e*x+2*d)+(70*a^4*b+80*a^2*b^3 )*cos(3*e*x+3*d)+(5*a^5+20*a^3*b^2)*sin(4*e*x+4*d)-2*a^4*b*cos(5*e*x+5*d)+ (-580*a^4*b-1360*a^2*b^3-160*b^5)*cos(e*x+d)+60*x*a^5*e+720*x*a^3*b^2*e+48 0*x*a*b^4*e-512*a^4*b-1280*a^2*b^3-160*b^5)/e
Time = 0.09 (sec) , antiderivative size = 150, normalized size of antiderivative = 0.77 \[ \int (a+b \sin (d+e x)) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^2 \, dx=-\frac {8 \, a^{4} b \cos \left (e x + d\right )^{5} - 80 \, {\left (a^{4} b + a^{2} b^{3}\right )} \cos \left (e x + d\right )^{3} - 15 \, {\left (a^{5} + 12 \, a^{3} b^{2} + 8 \, a b^{4}\right )} e x + 40 \, {\left (5 \, a^{4} b + 10 \, a^{2} b^{3} + b^{5}\right )} \cos \left (e x + d\right ) - 5 \, {\left (2 \, {\left (a^{5} + 4 \, a^{3} b^{2}\right )} \cos \left (e x + d\right )^{3} - {\left (5 \, a^{5} + 44 \, a^{3} b^{2} + 16 \, a b^{4}\right )} \cos \left (e x + d\right )\right )} \sin \left (e x + d\right )}{40 \, e} \] Input:
integrate((a+b*sin(e*x+d))*(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^2,x, al gorithm="fricas")
Output:
-1/40*(8*a^4*b*cos(e*x + d)^5 - 80*(a^4*b + a^2*b^3)*cos(e*x + d)^3 - 15*( a^5 + 12*a^3*b^2 + 8*a*b^4)*e*x + 40*(5*a^4*b + 10*a^2*b^3 + b^5)*cos(e*x + d) - 5*(2*(a^5 + 4*a^3*b^2)*cos(e*x + d)^3 - (5*a^5 + 44*a^3*b^2 + 16*a* b^4)*cos(e*x + d))*sin(e*x + d))/e
Leaf count of result is larger than twice the leaf count of optimal. 566 vs. \(2 (178) = 356\).
Time = 0.34 (sec) , antiderivative size = 566, normalized size of antiderivative = 2.90 \[ \int (a+b \sin (d+e x)) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^2 \, dx=\begin {cases} \frac {3 a^{5} x \sin ^{4}{\left (d + e x \right )}}{8} + \frac {3 a^{5} x \sin ^{2}{\left (d + e x \right )} \cos ^{2}{\left (d + e x \right )}}{4} + \frac {3 a^{5} x \cos ^{4}{\left (d + e x \right )}}{8} - \frac {5 a^{5} \sin ^{3}{\left (d + e x \right )} \cos {\left (d + e x \right )}}{8 e} - \frac {3 a^{5} \sin {\left (d + e x \right )} \cos ^{3}{\left (d + e x \right )}}{8 e} - \frac {a^{4} b \sin ^{4}{\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} - \frac {4 a^{4} b \sin ^{2}{\left (d + e x \right )} \cos ^{3}{\left (d + e x \right )}}{3 e} - \frac {4 a^{4} b \sin ^{2}{\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} - \frac {8 a^{4} b \cos ^{5}{\left (d + e x \right )}}{15 e} - \frac {8 a^{4} b \cos ^{3}{\left (d + e x \right )}}{3 e} + \frac {3 a^{3} b^{2} x \sin ^{4}{\left (d + e x \right )}}{2} + 3 a^{3} b^{2} x \sin ^{2}{\left (d + e x \right )} \cos ^{2}{\left (d + e x \right )} + 3 a^{3} b^{2} x \sin ^{2}{\left (d + e x \right )} + \frac {3 a^{3} b^{2} x \cos ^{4}{\left (d + e x \right )}}{2} + 3 a^{3} b^{2} x \cos ^{2}{\left (d + e x \right )} - \frac {5 a^{3} b^{2} \sin ^{3}{\left (d + e x \right )} \cos {\left (d + e x \right )}}{2 e} - \frac {3 a^{3} b^{2} \sin {\left (d + e x \right )} \cos ^{3}{\left (d + e x \right )}}{2 e} - \frac {3 a^{3} b^{2} \sin {\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} - \frac {6 a^{2} b^{3} \sin ^{2}{\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} - \frac {4 a^{2} b^{3} \cos ^{3}{\left (d + e x \right )}}{e} - \frac {4 a^{2} b^{3} \cos {\left (d + e x \right )}}{e} + 2 a b^{4} x \sin ^{2}{\left (d + e x \right )} + 2 a b^{4} x \cos ^{2}{\left (d + e x \right )} + a b^{4} x - \frac {2 a b^{4} \sin {\left (d + e x \right )} \cos {\left (d + e x \right )}}{e} - \frac {b^{5} \cos {\left (d + e x \right )}}{e} & \text {for}\: e \neq 0 \\x \left (a + b \sin {\left (d \right )}\right ) \left (a^{2} \sin ^{2}{\left (d \right )} + 2 a b \sin {\left (d \right )} + b^{2}\right )^{2} & \text {otherwise} \end {cases} \] Input:
integrate((a+b*sin(e*x+d))*(b**2+2*a*b*sin(e*x+d)+a**2*sin(e*x+d)**2)**2,x )
Output:
Piecewise((3*a**5*x*sin(d + e*x)**4/8 + 3*a**5*x*sin(d + e*x)**2*cos(d + e *x)**2/4 + 3*a**5*x*cos(d + e*x)**4/8 - 5*a**5*sin(d + e*x)**3*cos(d + e*x )/(8*e) - 3*a**5*sin(d + e*x)*cos(d + e*x)**3/(8*e) - a**4*b*sin(d + e*x)* *4*cos(d + e*x)/e - 4*a**4*b*sin(d + e*x)**2*cos(d + e*x)**3/(3*e) - 4*a** 4*b*sin(d + e*x)**2*cos(d + e*x)/e - 8*a**4*b*cos(d + e*x)**5/(15*e) - 8*a **4*b*cos(d + e*x)**3/(3*e) + 3*a**3*b**2*x*sin(d + e*x)**4/2 + 3*a**3*b** 2*x*sin(d + e*x)**2*cos(d + e*x)**2 + 3*a**3*b**2*x*sin(d + e*x)**2 + 3*a* *3*b**2*x*cos(d + e*x)**4/2 + 3*a**3*b**2*x*cos(d + e*x)**2 - 5*a**3*b**2* sin(d + e*x)**3*cos(d + e*x)/(2*e) - 3*a**3*b**2*sin(d + e*x)*cos(d + e*x) **3/(2*e) - 3*a**3*b**2*sin(d + e*x)*cos(d + e*x)/e - 6*a**2*b**3*sin(d + e*x)**2*cos(d + e*x)/e - 4*a**2*b**3*cos(d + e*x)**3/e - 4*a**2*b**3*cos(d + e*x)/e + 2*a*b**4*x*sin(d + e*x)**2 + 2*a*b**4*x*cos(d + e*x)**2 + a*b* *4*x - 2*a*b**4*sin(d + e*x)*cos(d + e*x)/e - b**5*cos(d + e*x)/e, Ne(e, 0 )), (x*(a + b*sin(d))*(a**2*sin(d)**2 + 2*a*b*sin(d) + b**2)**2, True))
Time = 0.04 (sec) , antiderivative size = 246, normalized size of antiderivative = 1.26 \[ \int (a+b \sin (d+e x)) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^2 \, dx=\frac {15 \, {\left (12 \, e x + 12 \, d + \sin \left (4 \, e x + 4 \, d\right ) - 8 \, \sin \left (2 \, e x + 2 \, d\right )\right )} a^{5} - 32 \, {\left (3 \, \cos \left (e x + d\right )^{5} - 10 \, \cos \left (e x + d\right )^{3} + 15 \, \cos \left (e x + d\right )\right )} a^{4} b + 640 \, {\left (\cos \left (e x + d\right )^{3} - 3 \, \cos \left (e x + d\right )\right )} a^{4} b + 60 \, {\left (12 \, e x + 12 \, d + \sin \left (4 \, e x + 4 \, d\right ) - 8 \, \sin \left (2 \, e x + 2 \, d\right )\right )} a^{3} b^{2} + 720 \, {\left (2 \, e x + 2 \, d - \sin \left (2 \, e x + 2 \, d\right )\right )} a^{3} b^{2} + 960 \, {\left (\cos \left (e x + d\right )^{3} - 3 \, \cos \left (e x + d\right )\right )} a^{2} b^{3} + 480 \, {\left (2 \, e x + 2 \, d - \sin \left (2 \, e x + 2 \, d\right )\right )} a b^{4} + 480 \, {\left (e x + d\right )} a b^{4} - 1920 \, a^{2} b^{3} \cos \left (e x + d\right ) - 480 \, b^{5} \cos \left (e x + d\right )}{480 \, e} \] Input:
integrate((a+b*sin(e*x+d))*(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^2,x, al gorithm="maxima")
Output:
1/480*(15*(12*e*x + 12*d + sin(4*e*x + 4*d) - 8*sin(2*e*x + 2*d))*a^5 - 32 *(3*cos(e*x + d)^5 - 10*cos(e*x + d)^3 + 15*cos(e*x + d))*a^4*b + 640*(cos (e*x + d)^3 - 3*cos(e*x + d))*a^4*b + 60*(12*e*x + 12*d + sin(4*e*x + 4*d) - 8*sin(2*e*x + 2*d))*a^3*b^2 + 720*(2*e*x + 2*d - sin(2*e*x + 2*d))*a^3* b^2 + 960*(cos(e*x + d)^3 - 3*cos(e*x + d))*a^2*b^3 + 480*(2*e*x + 2*d - s in(2*e*x + 2*d))*a*b^4 + 480*(e*x + d)*a*b^4 - 1920*a^2*b^3*cos(e*x + d) - 480*b^5*cos(e*x + d))/e
Time = 0.29 (sec) , antiderivative size = 158, normalized size of antiderivative = 0.81 \[ \int (a+b \sin (d+e x)) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^2 \, dx=-\frac {a^{4} b \cos \left (5 \, e x + 5 \, d\right )}{80 \, e} + \frac {3}{8} \, {\left (a^{5} + 12 \, a^{3} b^{2} + 8 \, a b^{4}\right )} x + \frac {{\left (7 \, a^{4} b + 8 \, a^{2} b^{3}\right )} \cos \left (3 \, e x + 3 \, d\right )}{16 \, e} - \frac {{\left (29 \, a^{4} b + 68 \, a^{2} b^{3} + 8 \, b^{5}\right )} \cos \left (e x + d\right )}{8 \, e} + \frac {{\left (a^{5} + 4 \, a^{3} b^{2}\right )} \sin \left (4 \, e x + 4 \, d\right )}{32 \, e} - \frac {{\left (a^{5} + 10 \, a^{3} b^{2} + 4 \, a b^{4}\right )} \sin \left (2 \, e x + 2 \, d\right )}{4 \, e} \] Input:
integrate((a+b*sin(e*x+d))*(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^2,x, al gorithm="giac")
Output:
-1/80*a^4*b*cos(5*e*x + 5*d)/e + 3/8*(a^5 + 12*a^3*b^2 + 8*a*b^4)*x + 1/16 *(7*a^4*b + 8*a^2*b^3)*cos(3*e*x + 3*d)/e - 1/8*(29*a^4*b + 68*a^2*b^3 + 8 *b^5)*cos(e*x + d)/e + 1/32*(a^5 + 4*a^3*b^2)*sin(4*e*x + 4*d)/e - 1/4*(a^ 5 + 10*a^3*b^2 + 4*a*b^4)*sin(2*e*x + 2*d)/e
Time = 17.78 (sec) , antiderivative size = 456, normalized size of antiderivative = 2.34 \[ \int (a+b \sin (d+e x)) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^2 \, dx=\frac {3\,a\,\mathrm {atan}\left (\frac {3\,a\,\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )\,\left (a^4+12\,a^2\,b^2+8\,b^4\right )}{4\,\left (\frac {3\,a^5}{4}+9\,a^3\,b^2+6\,a\,b^4\right )}\right )\,\left (a^4+12\,a^2\,b^2+8\,b^4\right )}{4\,e}-\frac {\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )\,\left (\frac {3\,a^5}{4}+9\,a^3\,b^2+4\,a\,b^4\right )-{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^9\,\left (\frac {3\,a^5}{4}+9\,a^3\,b^2+4\,a\,b^4\right )+{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^3\,\left (\frac {7\,a^5}{2}+26\,a^3\,b^2+8\,a\,b^4\right )-{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^7\,\left (\frac {7\,a^5}{2}+26\,a^3\,b^2+8\,a\,b^4\right )+{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^6\,\left (16\,a^4\,b+56\,a^2\,b^3+8\,b^5\right )+{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^2\,\left (32\,a^4\,b+72\,a^2\,b^3+8\,b^5\right )+{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^4\,\left (48\,a^4\,b+104\,a^2\,b^3+12\,b^5\right )+\frac {32\,a^4\,b}{5}+2\,b^5+16\,a^2\,b^3+{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^8\,\left (8\,a^2\,b^3+2\,b^5\right )}{e\,\left ({\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^{10}+5\,{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^8+10\,{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^6+10\,{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^4+5\,{\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )}^2+1\right )}-\frac {3\,a\,\left (\mathrm {atan}\left (\mathrm {tan}\left (\frac {d}{2}+\frac {e\,x}{2}\right )\right )-\frac {e\,x}{2}\right )\,\left (a^4+12\,a^2\,b^2+8\,b^4\right )}{4\,e} \] Input:
int((a + b*sin(d + e*x))*(b^2 + a^2*sin(d + e*x)^2 + 2*a*b*sin(d + e*x))^2 ,x)
Output:
(3*a*atan((3*a*tan(d/2 + (e*x)/2)*(a^4 + 8*b^4 + 12*a^2*b^2))/(4*(6*a*b^4 + (3*a^5)/4 + 9*a^3*b^2)))*(a^4 + 8*b^4 + 12*a^2*b^2))/(4*e) - (tan(d/2 + (e*x)/2)*(4*a*b^4 + (3*a^5)/4 + 9*a^3*b^2) - tan(d/2 + (e*x)/2)^9*(4*a*b^4 + (3*a^5)/4 + 9*a^3*b^2) + tan(d/2 + (e*x)/2)^3*(8*a*b^4 + (7*a^5)/2 + 26 *a^3*b^2) - tan(d/2 + (e*x)/2)^7*(8*a*b^4 + (7*a^5)/2 + 26*a^3*b^2) + tan( d/2 + (e*x)/2)^6*(16*a^4*b + 8*b^5 + 56*a^2*b^3) + tan(d/2 + (e*x)/2)^2*(3 2*a^4*b + 8*b^5 + 72*a^2*b^3) + tan(d/2 + (e*x)/2)^4*(48*a^4*b + 12*b^5 + 104*a^2*b^3) + (32*a^4*b)/5 + 2*b^5 + 16*a^2*b^3 + tan(d/2 + (e*x)/2)^8*(2 *b^5 + 8*a^2*b^3))/(e*(5*tan(d/2 + (e*x)/2)^2 + 10*tan(d/2 + (e*x)/2)^4 + 10*tan(d/2 + (e*x)/2)^6 + 5*tan(d/2 + (e*x)/2)^8 + tan(d/2 + (e*x)/2)^10 + 1)) - (3*a*(atan(tan(d/2 + (e*x)/2)) - (e*x)/2)*(a^4 + 8*b^4 + 12*a^2*b^2 ))/(4*e)
Time = 0.17 (sec) , antiderivative size = 245, normalized size of antiderivative = 1.26 \[ \int (a+b \sin (d+e x)) \left (b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)\right )^2 \, dx=\frac {-8 \cos \left (e x +d \right ) \sin \left (e x +d \right )^{4} a^{4} b -10 \cos \left (e x +d \right ) \sin \left (e x +d \right )^{3} a^{5}-40 \cos \left (e x +d \right ) \sin \left (e x +d \right )^{3} a^{3} b^{2}-64 \cos \left (e x +d \right ) \sin \left (e x +d \right )^{2} a^{4} b -80 \cos \left (e x +d \right ) \sin \left (e x +d \right )^{2} a^{2} b^{3}-15 \cos \left (e x +d \right ) \sin \left (e x +d \right ) a^{5}-180 \cos \left (e x +d \right ) \sin \left (e x +d \right ) a^{3} b^{2}-80 \cos \left (e x +d \right ) \sin \left (e x +d \right ) a \,b^{4}-128 \cos \left (e x +d \right ) a^{4} b -320 \cos \left (e x +d \right ) a^{2} b^{3}-40 \cos \left (e x +d \right ) b^{5}+15 a^{5} e x +128 a^{4} b +180 a^{3} b^{2} e x +320 a^{2} b^{3}+120 a \,b^{4} e x +40 b^{5}}{40 e} \] Input:
int((a+b*sin(e*x+d))*(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^2,x)
Output:
( - 8*cos(d + e*x)*sin(d + e*x)**4*a**4*b - 10*cos(d + e*x)*sin(d + e*x)** 3*a**5 - 40*cos(d + e*x)*sin(d + e*x)**3*a**3*b**2 - 64*cos(d + e*x)*sin(d + e*x)**2*a**4*b - 80*cos(d + e*x)*sin(d + e*x)**2*a**2*b**3 - 15*cos(d + e*x)*sin(d + e*x)*a**5 - 180*cos(d + e*x)*sin(d + e*x)*a**3*b**2 - 80*cos (d + e*x)*sin(d + e*x)*a*b**4 - 128*cos(d + e*x)*a**4*b - 320*cos(d + e*x) *a**2*b**3 - 40*cos(d + e*x)*b**5 + 15*a**5*e*x + 128*a**4*b + 180*a**3*b* *2*e*x + 320*a**2*b**3 + 120*a*b**4*e*x + 40*b**5)/(40*e)