Integrand size = 21, antiderivative size = 48 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {1}{2} a (2 c+d) x-\frac {a (c+d) \cos (e+f x)}{f}-\frac {a d \cos (e+f x) \sin (e+f x)}{2 f} \] Output:
1/2*a*(2*c+d)*x-a*(c+d)*cos(f*x+e)/f-1/2*a*d*cos(f*x+e)*sin(f*x+e)/f
Time = 0.24 (sec) , antiderivative size = 45, normalized size of antiderivative = 0.94 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {a (2 d e+4 c f x+2 d f x-4 (c+d) \cos (e+f x)-d \sin (2 (e+f x)))}{4 f} \] Input:
Integrate[(a + a*Sin[e + f*x])*(c + d*Sin[e + f*x]),x]
Output:
(a*(2*d*e + 4*c*f*x + 2*d*f*x - 4*(c + d)*Cos[e + f*x] - d*Sin[2*(e + f*x) ]))/(4*f)
Time = 0.21 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {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 \sin (e+f x)+a) (c+d \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int (a \sin (e+f x)+a) (c+d \sin (e+f x))dx\) |
\(\Big \downarrow \) 3213 |
\(\displaystyle -\frac {a (c+d) \cos (e+f x)}{f}+\frac {1}{2} a x (2 c+d)-\frac {a d \sin (e+f x) \cos (e+f x)}{2 f}\) |
Input:
Int[(a + a*Sin[e + f*x])*(c + d*Sin[e + f*x]),x]
Output:
(a*(2*c + d)*x)/2 - (a*(c + d)*Cos[e + f*x])/f - (a*d*Cos[e + f*x]*Sin[e + f*x])/(2*f)
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]
Time = 0.99 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.92
method | result | size |
parallelrisch | \(\frac {a \left (-\frac {d \sin \left (2 f x +2 e \right )}{4}+\left (-c -d \right ) \cos \left (f x +e \right )+f x c +\frac {f x d}{2}+c +d \right )}{f}\) | \(44\) |
parts | \(a c x -\frac {\left (a c +a d \right ) \cos \left (f x +e \right )}{f}+\frac {a d \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )}{f}\) | \(52\) |
risch | \(a c x +\frac {a x d}{2}-\frac {a \cos \left (f x +e \right ) c}{f}-\frac {a \cos \left (f x +e \right ) d}{f}-\frac {a d \sin \left (2 f x +2 e \right )}{4 f}\) | \(53\) |
derivativedivides | \(\frac {a d \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a c \cos \left (f x +e \right )-a d \cos \left (f x +e \right )+a c \left (f x +e \right )}{f}\) | \(59\) |
default | \(\frac {a d \left (-\frac {\cos \left (f x +e \right ) \sin \left (f x +e \right )}{2}+\frac {f x}{2}+\frac {e}{2}\right )-a c \cos \left (f x +e \right )-a d \cos \left (f x +e \right )+a c \left (f x +e \right )}{f}\) | \(59\) |
norman | \(\frac {\left (a c +\frac {1}{2} a d \right ) x +\left (a c +\frac {1}{2} a d \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}+\left (2 a c +a d \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\frac {\left (2 a c +2 a d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{f}+\frac {a d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{f}+\frac {2 \left (a c +a d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{f}-\frac {a d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{2}}\) | \(150\) |
orering | \(x \left (a +\sin \left (f x +e \right ) a \right ) \left (c +d \sin \left (f x +e \right )\right )-\frac {5 \left (f \cos \left (f x +e \right ) a \left (c +d \sin \left (f x +e \right )\right )+\left (a +\sin \left (f x +e \right ) a \right ) d f \cos \left (f x +e \right )\right )}{4 f^{2}}+\frac {5 x \left (-f^{2} \sin \left (f x +e \right ) a \left (c +d \sin \left (f x +e \right )\right )+2 f^{2} \cos \left (f x +e \right )^{2} a d -\left (a +\sin \left (f x +e \right ) a \right ) d \,f^{2} \sin \left (f x +e \right )\right )}{4 f^{2}}-\frac {-f^{3} \cos \left (f x +e \right ) a \left (c +d \sin \left (f x +e \right )\right )-6 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a d \,f^{3}-\left (a +\sin \left (f x +e \right ) a \right ) d \,f^{3} \cos \left (f x +e \right )}{4 f^{4}}+\frac {x \left (f^{4} \sin \left (f x +e \right ) a \left (c +d \sin \left (f x +e \right )\right )-8 \cos \left (f x +e \right )^{2} f^{4} a d +6 f^{4} \sin \left (f x +e \right )^{2} a d +\left (a +\sin \left (f x +e \right ) a \right ) d \,f^{4} \sin \left (f x +e \right )\right )}{4 f^{4}}\) | \(282\) |
Input:
int((a+sin(f*x+e)*a)*(c+d*sin(f*x+e)),x,method=_RETURNVERBOSE)
Output:
a*(-1/4*d*sin(2*f*x+2*e)+(-c-d)*cos(f*x+e)+f*x*c+1/2*f*x*d+c+d)/f
Time = 0.08 (sec) , antiderivative size = 48, normalized size of antiderivative = 1.00 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x)) \, dx=-\frac {a d \cos \left (f x + e\right ) \sin \left (f x + e\right ) - {\left (2 \, a c + a d\right )} f x + 2 \, {\left (a c + a d\right )} \cos \left (f x + e\right )}{2 \, f} \] Input:
integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e)),x, algorithm="fricas")
Output:
-1/2*(a*d*cos(f*x + e)*sin(f*x + e) - (2*a*c + a*d)*f*x + 2*(a*c + a*d)*co s(f*x + e))/f
Leaf count of result is larger than twice the leaf count of optimal. 94 vs. \(2 (42) = 84\).
Time = 0.09 (sec) , antiderivative size = 94, normalized size of antiderivative = 1.96 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\begin {cases} a c x - \frac {a c \cos {\left (e + f x \right )}}{f} + \frac {a d x \sin ^{2}{\left (e + f x \right )}}{2} + \frac {a d x \cos ^{2}{\left (e + f x \right )}}{2} - \frac {a d \sin {\left (e + f x \right )} \cos {\left (e + f x \right )}}{2 f} - \frac {a d \cos {\left (e + f x \right )}}{f} & \text {for}\: f \neq 0 \\x \left (c + d \sin {\left (e \right )}\right ) \left (a \sin {\left (e \right )} + a\right ) & \text {otherwise} \end {cases} \] Input:
integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e)),x)
Output:
Piecewise((a*c*x - a*c*cos(e + f*x)/f + a*d*x*sin(e + f*x)**2/2 + a*d*x*co s(e + f*x)**2/2 - a*d*sin(e + f*x)*cos(e + f*x)/(2*f) - a*d*cos(e + f*x)/f , Ne(f, 0)), (x*(c + d*sin(e))*(a*sin(e) + a), True))
Time = 0.03 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.19 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {4 \, {\left (f x + e\right )} a c + {\left (2 \, f x + 2 \, e - \sin \left (2 \, f x + 2 \, e\right )\right )} a d - 4 \, a c \cos \left (f x + e\right ) - 4 \, a d \cos \left (f x + e\right )}{4 \, f} \] Input:
integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e)),x, algorithm="maxima")
Output:
1/4*(4*(f*x + e)*a*c + (2*f*x + 2*e - sin(2*f*x + 2*e))*a*d - 4*a*c*cos(f* x + e) - 4*a*d*cos(f*x + e))/f
Time = 0.12 (sec) , antiderivative size = 52, normalized size of antiderivative = 1.08 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x)) \, dx=a c x + \frac {1}{2} \, a d x - \frac {a c \cos \left (f x + e\right )}{f} - \frac {a d \cos \left (f x + e\right )}{f} - \frac {a d \sin \left (2 \, f x + 2 \, e\right )}{4 \, f} \] Input:
integrate((a+a*sin(f*x+e))*(c+d*sin(f*x+e)),x, algorithm="giac")
Output:
a*c*x + 1/2*a*d*x - a*c*cos(f*x + e)/f - a*d*cos(f*x + e)/f - 1/4*a*d*sin( 2*f*x + 2*e)/f
Time = 16.55 (sec) , antiderivative size = 100, normalized size of antiderivative = 2.08 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x)) \, dx=a\,c\,x+\frac {a\,d\,x}{2}-\frac {-a\,d\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+\left (2\,a\,c+2\,a\,d\right )\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+a\,d\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+2\,a\,c+2\,a\,d}{f\,\left ({\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+1\right )} \] Input:
int((a + a*sin(e + f*x))*(c + d*sin(e + f*x)),x)
Output:
a*c*x + (a*d*x)/2 - (2*a*c + 2*a*d + tan(e/2 + (f*x)/2)^2*(2*a*c + 2*a*d) - a*d*tan(e/2 + (f*x)/2)^3 + a*d*tan(e/2 + (f*x)/2))/(f*(2*tan(e/2 + (f*x) /2)^2 + tan(e/2 + (f*x)/2)^4 + 1))
Time = 0.16 (sec) , antiderivative size = 55, normalized size of antiderivative = 1.15 \[ \int (a+a \sin (e+f x)) (c+d \sin (e+f x)) \, dx=\frac {a \left (-\cos \left (f x +e \right ) \sin \left (f x +e \right ) d -2 \cos \left (f x +e \right ) c -2 \cos \left (f x +e \right ) d +2 c f x +2 c +d f x +2 d \right )}{2 f} \] Input:
int((a+a*sin(f*x+e))*(c+d*sin(f*x+e)),x)
Output:
(a*( - cos(e + f*x)*sin(e + f*x)*d - 2*cos(e + f*x)*c - 2*cos(e + f*x)*d + 2*c*f*x + 2*c + d*f*x + 2*d))/(2*f)