Integrand size = 12, antiderivative size = 137 \[ \int (a+b \sin (e+f x))^4 \, dx=\frac {1}{8} \left (8 a^4+24 a^2 b^2+3 b^4\right ) x-\frac {a b \left (19 a^2+16 b^2\right ) \cos (e+f x)}{6 f}-\frac {b^2 \left (26 a^2+9 b^2\right ) \cos (e+f x) \sin (e+f x)}{24 f}-\frac {7 a b \cos (e+f x) (a+b \sin (e+f x))^2}{12 f}-\frac {b \cos (e+f x) (a+b \sin (e+f x))^3}{4 f} \] Output:
1/8*(8*a^4+24*a^2*b^2+3*b^4)*x-1/6*a*b*(19*a^2+16*b^2)*cos(f*x+e)/f-1/24*b ^2*(26*a^2+9*b^2)*cos(f*x+e)*sin(f*x+e)/f-7/12*a*b*cos(f*x+e)*(a+b*sin(f*x +e))^2/f-1/4*b*cos(f*x+e)*(a+b*sin(f*x+e))^3/f
Time = 0.87 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.77 \[ \int (a+b \sin (e+f x))^4 \, dx=\frac {-96 a b \left (4 a^2+3 b^2\right ) \cos (e+f x)+32 a b^3 \cos (3 (e+f x))+3 \left (4 \left (8 a^4+24 a^2 b^2+3 b^4\right ) (e+f x)-8 \left (6 a^2 b^2+b^4\right ) \sin (2 (e+f x))+b^4 \sin (4 (e+f x))\right )}{96 f} \] Input:
Integrate[(a + b*Sin[e + f*x])^4,x]
Output:
(-96*a*b*(4*a^2 + 3*b^2)*Cos[e + f*x] + 32*a*b^3*Cos[3*(e + f*x)] + 3*(4*( 8*a^4 + 24*a^2*b^2 + 3*b^4)*(e + f*x) - 8*(6*a^2*b^2 + b^4)*Sin[2*(e + f*x )] + b^4*Sin[4*(e + f*x)]))/(96*f)
Time = 0.48 (sec) , antiderivative size = 145, normalized size of antiderivative = 1.06, number of steps used = 6, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.500, Rules used = {3042, 3135, 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 (e+f x))^4 \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a+b \sin (e+f x))^4dx\) |
\(\Big \downarrow \) 3135 |
\(\displaystyle \frac {1}{4} \int (a+b \sin (e+f x))^2 \left (4 a^2+7 b \sin (e+f x) a+3 b^2\right )dx-\frac {b \cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \int (a+b \sin (e+f x))^2 \left (4 a^2+7 b \sin (e+f x) a+3 b^2\right )dx-\frac {b \cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
\(\Big \downarrow \) 3232 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int (a+b \sin (e+f x)) \left (a \left (12 a^2+23 b^2\right )+b \left (26 a^2+9 b^2\right ) \sin (e+f x)\right )dx-\frac {7 a b \cos (e+f x) (a+b \sin (e+f x))^2}{3 f}\right )-\frac {b \cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \int (a+b \sin (e+f x)) \left (a \left (12 a^2+23 b^2\right )+b \left (26 a^2+9 b^2\right ) \sin (e+f x)\right )dx-\frac {7 a b \cos (e+f x) (a+b \sin (e+f x))^2}{3 f}\right )-\frac {b \cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle \frac {1}{4} \left (\frac {1}{3} \left (-\frac {2 a b \left (19 a^2+16 b^2\right ) \cos (e+f x)}{f}-\frac {b^2 \left (26 a^2+9 b^2\right ) \sin (e+f x) \cos (e+f x)}{2 f}+\frac {3}{2} x \left (8 a^4+24 a^2 b^2+3 b^4\right )\right )-\frac {7 a b \cos (e+f x) (a+b \sin (e+f x))^2}{3 f}\right )-\frac {b \cos (e+f x) (a+b \sin (e+f x))^3}{4 f}\) |
Input:
Int[(a + b*Sin[e + f*x])^4,x]
Output:
-1/4*(b*Cos[e + f*x]*(a + b*Sin[e + f*x])^3)/f + ((-7*a*b*Cos[e + f*x]*(a + b*Sin[e + f*x])^2)/(3*f) + ((3*(8*a^4 + 24*a^2*b^2 + 3*b^4)*x)/2 - (2*a* b*(19*a^2 + 16*b^2)*Cos[e + f*x])/f - (b^2*(26*a^2 + 9*b^2)*Cos[e + f*x]*S in[e + f*x])/(2*f))/3)/4
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b)*Cos [c + d*x]*((a + b*Sin[c + d*x])^(n - 1)/(d*n)), x] + Simp[1/n Int[(a + b* Sin[c + d*x])^(n - 2)*Simp[a^2*n + b^2*(n - 1) + a*b*(2*n - 1)*Sin[c + d*x] , x], x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 - b^2, 0] && GtQ[n, 1] && IntegerQ[2*n]
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]
Time = 12.49 (sec) , antiderivative size = 116, normalized size of antiderivative = 0.85
method | result | size |
derivativedivides | \(\frac {b^{4} \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {4 b^{3} a \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+6 b^{2} a^{2} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-4 a^{3} b \cos \left (f x +e \right )+a^{4} \left (f x +e \right )}{f}\) | \(116\) |
default | \(\frac {b^{4} \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )-\frac {4 b^{3} a \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3}+6 b^{2} a^{2} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-4 a^{3} b \cos \left (f x +e \right )+a^{4} \left (f x +e \right )}{f}\) | \(116\) |
parts | \(a^{4} x +\frac {b^{4} \left (-\frac {\left (\sin \left (f x +e \right )^{3}+\frac {3 \sin \left (f x +e \right )}{2}\right ) \cos \left (f x +e \right )}{4}+\frac {3 f x}{8}+\frac {3 e}{8}\right )}{f}-\frac {4 a^{3} b \cos \left (f x +e \right )}{f}+\frac {6 b^{2} a^{2} \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}-\frac {4 b^{3} a \left (2+\sin \left (f x +e \right )^{2}\right ) \cos \left (f x +e \right )}{3 f}\) | \(120\) |
risch | \(a^{4} x +3 x \,b^{2} a^{2}+\frac {3 x \,b^{4}}{8}-\frac {4 a^{3} b \cos \left (f x +e \right )}{f}-\frac {3 a \,b^{3} \cos \left (f x +e \right )}{f}+\frac {b^{4} \sin \left (4 f x +4 e \right )}{32 f}+\frac {a \,b^{3} \cos \left (3 f x +3 e \right )}{3 f}-\frac {3 \sin \left (2 f x +2 e \right ) b^{2} a^{2}}{2 f}-\frac {\sin \left (2 f x +2 e \right ) b^{4}}{4 f}\) | \(124\) |
parallelrisch | \(\frac {96 a^{4} f x +288 a^{2} b^{2} f x +36 b^{4} f x -384 a^{3} b \cos \left (f x +e \right )-288 \cos \left (f x +e \right ) a \,b^{3}+3 b^{4} \sin \left (4 f x +4 e \right )+32 a \,b^{3} \cos \left (3 f x +3 e \right )-144 \sin \left (2 f x +2 e \right ) a^{2} b^{2}-24 \sin \left (2 f x +2 e \right ) b^{4}-384 a^{3} b -256 b^{3} a}{96 f}\) | \(127\) |
norman | \(\frac {\left (a^{4}+3 b^{2} a^{2}+\frac {3}{8} b^{4}\right ) x +\left (a^{4}+3 b^{2} a^{2}+\frac {3}{8} b^{4}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}+\left (4 a^{4}+12 b^{2} a^{2}+\frac {3}{2} b^{4}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\left (4 a^{4}+12 b^{2} a^{2}+\frac {3}{2} b^{4}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}+\left (6 a^{4}+18 b^{2} a^{2}+\frac {9}{4} b^{4}\right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}-\frac {24 a^{3} b +16 b^{3} a}{3 f}-\frac {8 a^{3} b \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{f}-\frac {2 \left (12 a^{3} b +8 b^{3} a \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{f}-\frac {4 \left (18 a^{3} b +16 b^{3} a \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{3 f}-\frac {3 b^{2} \left (8 a^{2}+b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{4 f}+\frac {3 b^{2} \left (8 a^{2}+b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{4 f}-\frac {b^{2} \left (24 a^{2}+11 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{4 f}+\frac {b^{2} \left (24 a^{2}+11 b^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{4 f}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{4}}\) | \(373\) |
Input:
int((a+b*sin(f*x+e))^4,x,method=_RETURNVERBOSE)
Output:
1/f*(b^4*(-1/4*(sin(f*x+e)^3+3/2*sin(f*x+e))*cos(f*x+e)+3/8*f*x+3/8*e)-4/3 *b^3*a*(2+sin(f*x+e)^2)*cos(f*x+e)+6*b^2*a^2*(-1/2*cos(f*x+e)*sin(f*x+e)+1 /2*f*x+1/2*e)-4*a^3*b*cos(f*x+e)+a^4*(f*x+e))
Time = 0.09 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.77 \[ \int (a+b \sin (e+f x))^4 \, dx=\frac {32 \, a b^{3} \cos \left (f x + e\right )^{3} + 3 \, {\left (8 \, a^{4} + 24 \, a^{2} b^{2} + 3 \, b^{4}\right )} f x - 96 \, {\left (a^{3} b + a b^{3}\right )} \cos \left (f x + e\right ) + 3 \, {\left (2 \, b^{4} \cos \left (f x + e\right )^{3} - {\left (24 \, a^{2} b^{2} + 5 \, b^{4}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{24 \, f} \] Input:
integrate((a+b*sin(f*x+e))^4,x, algorithm="fricas")
Output:
1/24*(32*a*b^3*cos(f*x + e)^3 + 3*(8*a^4 + 24*a^2*b^2 + 3*b^4)*f*x - 96*(a ^3*b + a*b^3)*cos(f*x + e) + 3*(2*b^4*cos(f*x + e)^3 - (24*a^2*b^2 + 5*b^4 )*cos(f*x + e))*sin(f*x + e))/f
Time = 0.21 (sec) , antiderivative size = 240, normalized size of antiderivative = 1.75 \[ \int (a+b \sin (e+f x))^4 \, dx=\begin {cases} a^{4} x - \frac {4 a^{3} b \cos {\left (e + f x \right )}}{f} + 3 a^{2} b^{2} x \sin ^{2}{\left (e + f x \right )} + 3 a^{2} b^{2} x \cos ^{2}{\left (e + f x \right )} - \frac {3 a^{2} b^{2} \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {4 a b^{3} \sin ^{2}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{f} - \frac {8 a b^{3} \cos ^{3}{\left (e + f x \right )}}{3 f} + \frac {3 b^{4} x \sin ^{4}{\left (e + f x \right )}}{8} + \frac {3 b^{4} x \sin ^{2}{\left (e + f x \right )} \cos ^{2}{\left (e + f x \right )}}{4} + \frac {3 b^{4} x \cos ^{4}{\left (e + f x \right )}}{8} - \frac {5 b^{4} \sin ^{3}{\left (e + f x \right )} \cos {\left (e + f x \right )}}{8 f} - \frac {3 b^{4} \sin {\left (e + f x \right )} \cos ^{3}{\left (e + f x \right )}}{8 f} & \text {for}\: f \neq 0 \\x \left (a + b \sin {\left (e \right )}\right )^{4} & \text {otherwise} \end {cases} \] Input:
integrate((a+b*sin(f*x+e))**4,x)
Output:
Piecewise((a**4*x - 4*a**3*b*cos(e + f*x)/f + 3*a**2*b**2*x*sin(e + f*x)** 2 + 3*a**2*b**2*x*cos(e + f*x)**2 - 3*a**2*b**2*sin(e + f*x)*cos(e + f*x)/ f - 4*a*b**3*sin(e + f*x)**2*cos(e + f*x)/f - 8*a*b**3*cos(e + f*x)**3/(3* f) + 3*b**4*x*sin(e + f*x)**4/8 + 3*b**4*x*sin(e + f*x)**2*cos(e + f*x)**2 /4 + 3*b**4*x*cos(e + f*x)**4/8 - 5*b**4*sin(e + f*x)**3*cos(e + f*x)/(8*f ) - 3*b**4*sin(e + f*x)*cos(e + f*x)**3/(8*f), Ne(f, 0)), (x*(a + b*sin(e) )**4, True))
Time = 0.03 (sec) , antiderivative size = 113, normalized size of antiderivative = 0.82 \[ \int (a+b \sin (e+f x))^4 \, dx=a^{4} x + \frac {3 \, {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a^{2} b^{2}}{2 \, f} + \frac {4 \, {\left (\cos \left (f x + e\right )^{3} - 3 \, \cos \left (f x + e\right )\right )} a b^{3}}{3 \, f} + \frac {{\left (12 \, f x + 12 \, e + \sin \left (4 \, f x + 4 \, e\right ) - 8 \, \sin \left (2 \, f x + 2 \, e\right )\right )} b^{4}}{32 \, f} - \frac {4 \, a^{3} b \cos \left (f x + e\right )}{f} \] Input:
integrate((a+b*sin(f*x+e))^4,x, algorithm="maxima")
Output:
a^4*x + 3/2*(2*f*x + 2*e - sin(2*f*x + 2*e))*a^2*b^2/f + 4/3*(cos(f*x + e) ^3 - 3*cos(f*x + e))*a*b^3/f + 1/32*(12*f*x + 12*e + sin(4*f*x + 4*e) - 8* sin(2*f*x + 2*e))*b^4/f - 4*a^3*b*cos(f*x + e)/f
Time = 0.12 (sec) , antiderivative size = 108, normalized size of antiderivative = 0.79 \[ \int (a+b \sin (e+f x))^4 \, dx=\frac {a b^{3} \cos \left (3 \, f x + 3 \, e\right )}{3 \, f} + \frac {b^{4} \sin \left (4 \, f x + 4 \, e\right )}{32 \, f} + \frac {1}{8} \, {\left (8 \, a^{4} + 24 \, a^{2} b^{2} + 3 \, b^{4}\right )} x - \frac {{\left (4 \, a^{3} b + 3 \, a b^{3}\right )} \cos \left (f x + e\right )}{f} - \frac {{\left (6 \, a^{2} b^{2} + b^{4}\right )} \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \] Input:
integrate((a+b*sin(f*x+e))^4,x, algorithm="giac")
Output:
1/3*a*b^3*cos(3*f*x + 3*e)/f + 1/32*b^4*sin(4*f*x + 4*e)/f + 1/8*(8*a^4 + 24*a^2*b^2 + 3*b^4)*x - (4*a^3*b + 3*a*b^3)*cos(f*x + e)/f - 1/4*(6*a^2*b^ 2 + b^4)*sin(2*f*x + 2*e)/f
Time = 17.46 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.83 \[ \int (a+b \sin (e+f x))^4 \, dx=\frac {\frac {3\,b^4\,\sin \left (4\,e+4\,f\,x\right )}{4}-6\,b^4\,\sin \left (2\,e+2\,f\,x\right )+8\,a\,b^3\,\cos \left (3\,e+3\,f\,x\right )-36\,a^2\,b^2\,\sin \left (2\,e+2\,f\,x\right )-72\,a\,b^3\,\cos \left (e+f\,x\right )-96\,a^3\,b\,\cos \left (e+f\,x\right )+24\,a^4\,f\,x+9\,b^4\,f\,x+72\,a^2\,b^2\,f\,x}{24\,f} \] Input:
int((a + b*sin(e + f*x))^4,x)
Output:
((3*b^4*sin(4*e + 4*f*x))/4 - 6*b^4*sin(2*e + 2*f*x) + 8*a*b^3*cos(3*e + 3 *f*x) - 36*a^2*b^2*sin(2*e + 2*f*x) - 72*a*b^3*cos(e + f*x) - 96*a^3*b*cos (e + f*x) + 24*a^4*f*x + 9*b^4*f*x + 72*a^2*b^2*f*x)/(24*f)
Time = 0.17 (sec) , antiderivative size = 142, normalized size of antiderivative = 1.04 \[ \int (a+b \sin (e+f x))^4 \, dx=\frac {-6 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{3} b^{4}-32 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} a \,b^{3}-72 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a^{2} b^{2}-9 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b^{4}-96 \cos \left (f x +e \right ) a^{3} b -64 \cos \left (f x +e \right ) a \,b^{3}+24 a^{4} f x +96 a^{3} b +72 a^{2} b^{2} f x +64 a \,b^{3}+9 b^{4} f x}{24 f} \] Input:
int((a+b*sin(f*x+e))^4,x)
Output:
( - 6*cos(e + f*x)*sin(e + f*x)**3*b**4 - 32*cos(e + f*x)*sin(e + f*x)**2* a*b**3 - 72*cos(e + f*x)*sin(e + f*x)*a**2*b**2 - 9*cos(e + f*x)*sin(e + f *x)*b**4 - 96*cos(e + f*x)*a**3*b - 64*cos(e + f*x)*a*b**3 + 24*a**4*f*x + 96*a**3*b + 72*a**2*b**2*f*x + 64*a*b**3 + 9*b**4*f*x)/(24*f)