Integrand size = 40, antiderivative size = 92 \[ \int \sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=-\frac {a (A+B) \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a+a \sin (e+f x)}}+\frac {a B \cos (e+f x) (c-c \sin (e+f x))^{3/2}}{2 c f \sqrt {a+a \sin (e+f x)}} \] Output:
-a*(A+B)*cos(f*x+e)*(c-c*sin(f*x+e))^(1/2)/f/(a+a*sin(f*x+e))^(1/2)+1/2*a* B*cos(f*x+e)*(c-c*sin(f*x+e))^(3/2)/c/f/(a+a*sin(f*x+e))^(1/2)
Time = 0.18 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.62 \[ \int \sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\frac {\sec (e+f x) \sqrt {a (1+\sin (e+f x))} (A+B \sin (e+f x))^2 \sqrt {c-c \sin (e+f x)}}{2 B f} \] Input:
Integrate[Sqrt[a + a*Sin[e + f*x]]*(A + B*Sin[e + f*x])*Sqrt[c - c*Sin[e + f*x]],x]
Output:
(Sec[e + f*x]*Sqrt[a*(1 + Sin[e + f*x])]*(A + B*Sin[e + f*x])^2*Sqrt[c - c *Sin[e + f*x]])/(2*B*f)
Time = 0.59 (sec) , antiderivative size = 92, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.100, Rules used = {3042, 3450, 3042, 3217}
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 \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)} (A+B \sin (e+f x)) \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)} (A+B \sin (e+f x))dx\) |
\(\Big \downarrow \) 3450 |
\(\displaystyle (A+B) \int \sqrt {\sin (e+f x) a+a} \sqrt {c-c \sin (e+f x)}dx-\frac {B \int \sqrt {\sin (e+f x) a+a} (c-c \sin (e+f x))^{3/2}dx}{c}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle (A+B) \int \sqrt {\sin (e+f x) a+a} \sqrt {c-c \sin (e+f x)}dx-\frac {B \int \sqrt {\sin (e+f x) a+a} (c-c \sin (e+f x))^{3/2}dx}{c}\) |
\(\Big \downarrow \) 3217 |
\(\displaystyle \frac {a B \cos (e+f x) (c-c \sin (e+f x))^{3/2}}{2 c f \sqrt {a \sin (e+f x)+a}}-\frac {a (A+B) \cos (e+f x) \sqrt {c-c \sin (e+f x)}}{f \sqrt {a \sin (e+f x)+a}}\) |
Input:
Int[Sqrt[a + a*Sin[e + f*x]]*(A + B*Sin[e + f*x])*Sqrt[c - c*Sin[e + f*x]] ,x]
Output:
-((a*(A + B)*Cos[e + f*x]*Sqrt[c - c*Sin[e + f*x]])/(f*Sqrt[a + a*Sin[e + f*x]])) + (a*B*Cos[e + f*x]*(c - c*Sin[e + f*x])^(3/2))/(2*c*f*Sqrt[a + a* Sin[e + f*x]])
Int[Sqrt[(a_) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((c_) + (d_.)*sin[(e_.) + (f _.)*(x_)])^(n_), x_Symbol] :> Simp[-2*b*Cos[e + f*x]*((c + d*Sin[e + f*x])^ n/(f*(2*n + 1)*Sqrt[a + b*Sin[e + f*x]])), x] /; FreeQ[{a, b, c, d, e, f, n }, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[n, -2^(-1)]
Int[Sqrt[(a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)]]*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp [B/d Int[Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])^(n + 1), x], x] - Simp[(B*c - A*d)/d Int[Sqrt[a + b*Sin[e + f*x]]*(c + d*Sin[e + f*x])^n, x ], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && EqQ[b*c + a*d, 0] && EqQ[ a^2 - b^2, 0]
Time = 5.31 (sec) , antiderivative size = 111, normalized size of antiderivative = 1.21
method | result | size |
default | \(\frac {4 \left (A \left (\cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-\frac {1}{2}\right ) \tan \left (\frac {\pi }{4}+\frac {f x}{2}+\frac {e}{2}\right )+B \sin \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right ) \sqrt {c \cos \left (\frac {\pi }{4}+\frac {f x}{2}+\frac {e}{2}\right )^{2}}\, \sqrt {a \sin \left (\frac {\pi }{4}+\frac {f x}{2}+\frac {e}{2}\right )^{2}}}{2 f \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-f}\) | \(111\) |
parts | \(\frac {A \sqrt {4}\, \sqrt {a \sin \left (\frac {\pi }{4}+\frac {f x}{2}+\frac {e}{2}\right )^{2}}\, \sqrt {c \cos \left (\frac {\pi }{4}+\frac {f x}{2}+\frac {e}{2}\right )^{2}}\, \tan \left (\frac {\pi }{4}+\frac {f x}{2}+\frac {e}{2}\right )}{f}+\frac {2 B \sqrt {\left (2 \sin \left (\frac {f x}{2}+\frac {e}{2}\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) a}\, \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} \sqrt {-\left (2 \sin \left (\frac {f x}{2}+\frac {e}{2}\right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) c}\, \sin \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{f \left (-1+2 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )}\) | \(156\) |
Input:
int((a+a*sin(f*x+e))^(1/2)*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2),x,metho d=_RETURNVERBOSE)
Output:
4*(A*(cos(1/2*f*x+1/2*e)^2-1/2)*tan(1/4*Pi+1/2*f*x+1/2*e)+B*sin(1/2*f*x+1/ 2*e)^2*cos(1/2*f*x+1/2*e)^2)*(c*cos(1/4*Pi+1/2*f*x+1/2*e)^2)^(1/2)*(a*sin( 1/4*Pi+1/2*f*x+1/2*e)^2)^(1/2)/(2*f*cos(1/2*f*x+1/2*e)^2-f)
Time = 0.08 (sec) , antiderivative size = 61, normalized size of antiderivative = 0.66 \[ \int \sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=-\frac {{\left (B \cos \left (f x + e\right )^{2} - 2 \, A \sin \left (f x + e\right ) - B\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c}}{2 \, f \cos \left (f x + e\right )} \] Input:
integrate((a+a*sin(f*x+e))^(1/2)*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2),x , algorithm="fricas")
Output:
-1/2*(B*cos(f*x + e)^2 - 2*A*sin(f*x + e) - B)*sqrt(a*sin(f*x + e) + a)*sq rt(-c*sin(f*x + e) + c)/(f*cos(f*x + e))
\[ \int \sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\int \sqrt {a \left (\sin {\left (e + f x \right )} + 1\right )} \sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )} \left (A + B \sin {\left (e + f x \right )}\right )\, dx \] Input:
integrate((a+a*sin(f*x+e))**(1/2)*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))**(1/2) ,x)
Output:
Integral(sqrt(a*(sin(e + f*x) + 1))*sqrt(-c*(sin(e + f*x) - 1))*(A + B*sin (e + f*x)), x)
\[ \int \sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\int { {\left (B \sin \left (f x + e\right ) + A\right )} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {-c \sin \left (f x + e\right ) + c} \,d x } \] Input:
integrate((a+a*sin(f*x+e))^(1/2)*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2),x , algorithm="maxima")
Output:
integrate((B*sin(f*x + e) + A)*sqrt(a*sin(f*x + e) + a)*sqrt(-c*sin(f*x + e) + c), x)
Time = 0.23 (sec) , antiderivative size = 140, normalized size of antiderivative = 1.52 \[ \int \sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=-\frac {2 \, {\left (B \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{4} - A \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - B \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) \sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}\right )} \sqrt {a} \sqrt {c}}{f} \] Input:
integrate((a+a*sin(f*x+e))^(1/2)*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2),x , algorithm="giac")
Output:
-2*(B*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2* e))*sin(-1/4*pi + 1/2*f*x + 1/2*e)^4 - A*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e ))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))*sin(-1/4*pi + 1/2*f*x + 1/2*e)^2 - B*sgn(cos(-1/4*pi + 1/2*f*x + 1/2*e))*sgn(sin(-1/4*pi + 1/2*f*x + 1/2*e))* sin(-1/4*pi + 1/2*f*x + 1/2*e)^2)*sqrt(a)*sqrt(c)/f
Time = 1.04 (sec) , antiderivative size = 75, normalized size of antiderivative = 0.82 \[ \int \sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=-\frac {\sqrt {a\,\left (\sin \left (e+f\,x\right )+1\right )}\,\sqrt {-c\,\left (\sin \left (e+f\,x\right )-1\right )}\,\left (B\,\cos \left (e+f\,x\right )+B\,\cos \left (3\,e+3\,f\,x\right )-4\,A\,\sin \left (2\,e+2\,f\,x\right )\right )}{4\,f\,\left (\cos \left (2\,e+2\,f\,x\right )+1\right )} \] Input:
int((A + B*sin(e + f*x))*(a + a*sin(e + f*x))^(1/2)*(c - c*sin(e + f*x))^( 1/2),x)
Output:
-((a*(sin(e + f*x) + 1))^(1/2)*(-c*(sin(e + f*x) - 1))^(1/2)*(B*cos(e + f* x) + B*cos(3*e + 3*f*x) - 4*A*sin(2*e + 2*f*x)))/(4*f*(cos(2*e + 2*f*x) + 1))
\[ \int \sqrt {a+a \sin (e+f x)} (A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)} \, dx=\sqrt {c}\, \sqrt {a}\, \left (\left (\int \sqrt {\sin \left (f x +e \right )+1}\, \sqrt {-\sin \left (f x +e \right )+1}\, \sin \left (f x +e \right )d x \right ) b +\left (\int \sqrt {\sin \left (f x +e \right )+1}\, \sqrt {-\sin \left (f x +e \right )+1}d x \right ) a \right ) \] Input:
int((a+a*sin(f*x+e))^(1/2)*(A+B*sin(f*x+e))*(c-c*sin(f*x+e))^(1/2),x)
Output:
sqrt(c)*sqrt(a)*(int(sqrt(sin(e + f*x) + 1)*sqrt( - sin(e + f*x) + 1)*sin( e + f*x),x)*b + int(sqrt(sin(e + f*x) + 1)*sqrt( - sin(e + f*x) + 1),x)*a)