Integrand size = 26, antiderivative size = 77 \[ \int \frac {a+a \sin (e+f x)}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {2 \sqrt {2} a \text {arctanh}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{\sqrt {c} f}-\frac {2 a \cos (e+f x)}{f \sqrt {c-c \sin (e+f x)}} \] Output:
2*2^(1/2)*a*arctanh(1/2*c^(1/2)*cos(f*x+e)*2^(1/2)/(c-c*sin(f*x+e))^(1/2)) /c^(1/2)/f-2*a*cos(f*x+e)/f/(c-c*sin(f*x+e))^(1/2)
Time = 1.88 (sec) , antiderivative size = 135, normalized size of antiderivative = 1.75 \[ \int \frac {a+a \sin (e+f x)}{\sqrt {c-c \sin (e+f x)}} \, dx=-\frac {2 a \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (\sqrt {c} (1+\sin (e+f x))+\sqrt {2} \arctan \left (\frac {\sqrt {-c (1+\sin (e+f x))}}{\sqrt {2} \sqrt {c}}\right ) \sqrt {-c (1+\sin (e+f x))}\right )}{\sqrt {c} f \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {c-c \sin (e+f x)}} \] Input:
Integrate[(a + a*Sin[e + f*x])/Sqrt[c - c*Sin[e + f*x]],x]
Output:
(-2*a*(Cos[(e + f*x)/2] - Sin[(e + f*x)/2])*(Sqrt[c]*(1 + Sin[e + f*x]) + Sqrt[2]*ArcTan[Sqrt[-(c*(1 + Sin[e + f*x]))]/(Sqrt[2]*Sqrt[c])]*Sqrt[-(c*( 1 + Sin[e + f*x]))]))/(Sqrt[c]*f*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*Sqr t[c - c*Sin[e + f*x]])
Time = 0.44 (sec) , antiderivative size = 81, normalized size of antiderivative = 1.05, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {3042, 3215, 3042, 3158, 3042, 3128, 219}
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 \frac {a \sin (e+f x)+a}{\sqrt {c-c \sin (e+f x)}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a \sin (e+f x)+a}{\sqrt {c-c \sin (e+f x)}}dx\) |
\(\Big \downarrow \) 3215 |
\(\displaystyle a c \int \frac {\cos ^2(e+f x)}{(c-c \sin (e+f x))^{3/2}}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \int \frac {\cos (e+f x)^2}{(c-c \sin (e+f x))^{3/2}}dx\) |
\(\Big \downarrow \) 3158 |
\(\displaystyle a c \left (\frac {2 \int \frac {1}{\sqrt {c-c \sin (e+f x)}}dx}{c}-\frac {2 \cos (e+f x)}{c f \sqrt {c-c \sin (e+f x)}}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a c \left (\frac {2 \int \frac {1}{\sqrt {c-c \sin (e+f x)}}dx}{c}-\frac {2 \cos (e+f x)}{c f \sqrt {c-c \sin (e+f x)}}\right )\) |
\(\Big \downarrow \) 3128 |
\(\displaystyle a c \left (-\frac {4 \int \frac {1}{2 c-\frac {c^2 \cos ^2(e+f x)}{c-c \sin (e+f x)}}d\left (-\frac {c \cos (e+f x)}{\sqrt {c-c \sin (e+f x)}}\right )}{c f}-\frac {2 \cos (e+f x)}{c f \sqrt {c-c \sin (e+f x)}}\right )\) |
\(\Big \downarrow \) 219 |
\(\displaystyle a c \left (\frac {2 \sqrt {2} \text {arctanh}\left (\frac {\sqrt {c} \cos (e+f x)}{\sqrt {2} \sqrt {c-c \sin (e+f x)}}\right )}{c^{3/2} f}-\frac {2 \cos (e+f x)}{c f \sqrt {c-c \sin (e+f x)}}\right )\) |
Input:
Int[(a + a*Sin[e + f*x])/Sqrt[c - c*Sin[e + f*x]],x]
Output:
a*c*((2*Sqrt[2]*ArcTanh[(Sqrt[c]*Cos[e + f*x])/(Sqrt[2]*Sqrt[c - c*Sin[e + f*x]])])/(c^(3/2)*f) - (2*Cos[e + f*x])/(c*f*Sqrt[c - c*Sin[e + f*x]]))
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Simp[-2/d Subst[Int[1/(2*a - x^2), x], x, b*(Cos[c + d*x]/Sqrt[a + b*Sin[c + d*x]])], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[g*(g*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f*x ])^(m + 1)/(b*f*(m + p))), x] + Simp[g^2*((p - 1)/(a*(m + p))) Int[(g*Cos [e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 - b^2, 0] && LtQ[m, -1] && GtQ[p, 1] && (GtQ[m, -2] || EqQ[2*m + p + 1, 0] || (EqQ[m, -2] && IntegerQ[p])) && NeQ[m + p, 0] && In tegersQ[2*m, 2*p]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[ b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((Lt Q[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
Time = 1.29 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.21
method | result | size |
default | \(\frac {2 \left (-1+\sin \left (f x +e \right )\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, a \left (-\sqrt {c}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )+\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\right )}{c \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(93\) |
parts | \(-\frac {a \left (-1+\sin \left (f x +e \right )\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )}{\sqrt {c}\, \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}-\frac {a \left (-1+\sin \left (f x +e \right )\right ) \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \left (\sqrt {c}\, \sqrt {2}\, \operatorname {arctanh}\left (\frac {\sqrt {c \left (1+\sin \left (f x +e \right )\right )}\, \sqrt {2}}{2 \sqrt {c}}\right )-2 \sqrt {c \left (1+\sin \left (f x +e \right )\right )}\right )}{c \cos \left (f x +e \right ) \sqrt {c -c \sin \left (f x +e \right )}\, f}\) | \(169\) |
risch | \(-\frac {\left ({\mathrm e}^{i \left (f x +e \right )}-3 i\right ) \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) a \sqrt {2}\, {\mathrm e}^{-i \left (f x +e \right )}}{f \sqrt {c \left (i {\mathrm e}^{2 i \left (f x +e \right )}-i+2 \,{\mathrm e}^{i \left (f x +e \right )}\right ) {\mathrm e}^{-i \left (f x +e \right )}}}+\frac {4 i \left (-{\mathrm e}^{i \left (f x +e \right )}+i\right ) \left (\arctan \left (\frac {\sqrt {i c \,{\mathrm e}^{i \left (f x +e \right )}}}{\sqrt {c}}\right ) c \sqrt {i c \,{\mathrm e}^{i \left (f x +e \right )}}+c^{\frac {3}{2}}\right ) a \sqrt {2}\, \sqrt {i c \left (-2 i {\mathrm e}^{i \left (f x +e \right )}+{\mathrm e}^{2 i \left (f x +e \right )}-1\right ) {\mathrm e}^{i \left (f x +e \right )}}\, {\mathrm e}^{-i \left (f x +e \right )}}{f \sqrt {-i c \left (2 i {\mathrm e}^{i \left (f x +e \right )}-{\mathrm e}^{2 i \left (f x +e \right )}+1\right ) {\mathrm e}^{i \left (f x +e \right )}}\, c^{\frac {3}{2}} \sqrt {c \left (i {\mathrm e}^{2 i \left (f x +e \right )}-i+2 \,{\mathrm e}^{i \left (f x +e \right )}\right ) {\mathrm e}^{-i \left (f x +e \right )}}}\) | \(293\) |
Input:
int((a+sin(f*x+e)*a)/(c-c*sin(f*x+e))^(1/2),x,method=_RETURNVERBOSE)
Output:
2*(-1+sin(f*x+e))*(c*(1+sin(f*x+e)))^(1/2)*a*(-c^(1/2)*2^(1/2)*arctanh(1/2 *(c*(1+sin(f*x+e)))^(1/2)*2^(1/2)/c^(1/2))+(c*(1+sin(f*x+e)))^(1/2))/c/cos (f*x+e)/(c-c*sin(f*x+e))^(1/2)/f
Leaf count of result is larger than twice the leaf count of optimal. 196 vs. \(2 (66) = 132\).
Time = 0.10 (sec) , antiderivative size = 196, normalized size of antiderivative = 2.55 \[ \int \frac {a+a \sin (e+f x)}{\sqrt {c-c \sin (e+f x)}} \, dx=\frac {\frac {\sqrt {2} {\left (a c \cos \left (f x + e\right ) - a c \sin \left (f x + e\right ) + a c\right )} \log \left (-\frac {\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) - 2\right )} \sin \left (f x + e\right ) + \frac {2 \, \sqrt {2} \sqrt {-c \sin \left (f x + e\right ) + c} {\left (\cos \left (f x + e\right ) + \sin \left (f x + e\right ) + 1\right )}}{\sqrt {c}} + 3 \, \cos \left (f x + e\right ) + 2}{\cos \left (f x + e\right )^{2} + {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right )}{\sqrt {c}} - 2 \, {\left (a \cos \left (f x + e\right ) + a \sin \left (f x + e\right ) + a\right )} \sqrt {-c \sin \left (f x + e\right ) + c}}{c f \cos \left (f x + e\right ) - c f \sin \left (f x + e\right ) + c f} \] Input:
integrate((a+a*sin(f*x+e))/(c-c*sin(f*x+e))^(1/2),x, algorithm="fricas")
Output:
(sqrt(2)*(a*c*cos(f*x + e) - a*c*sin(f*x + e) + a*c)*log(-(cos(f*x + e)^2 + (cos(f*x + e) - 2)*sin(f*x + e) + 2*sqrt(2)*sqrt(-c*sin(f*x + e) + c)*(c os(f*x + e) + sin(f*x + e) + 1)/sqrt(c) + 3*cos(f*x + e) + 2)/(cos(f*x + e )^2 + (cos(f*x + e) + 2)*sin(f*x + e) - cos(f*x + e) - 2))/sqrt(c) - 2*(a* cos(f*x + e) + a*sin(f*x + e) + a)*sqrt(-c*sin(f*x + e) + c))/(c*f*cos(f*x + e) - c*f*sin(f*x + e) + c*f)
\[ \int \frac {a+a \sin (e+f x)}{\sqrt {c-c \sin (e+f x)}} \, dx=a \left (\int \frac {\sin {\left (e + f x \right )}}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx + \int \frac {1}{\sqrt {- c \sin {\left (e + f x \right )} + c}}\, dx\right ) \] Input:
integrate((a+a*sin(f*x+e))/(c-c*sin(f*x+e))**(1/2),x)
Output:
a*(Integral(sin(e + f*x)/sqrt(-c*sin(e + f*x) + c), x) + Integral(1/sqrt(- c*sin(e + f*x) + c), x))
\[ \int \frac {a+a \sin (e+f x)}{\sqrt {c-c \sin (e+f x)}} \, dx=\int { \frac {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))/(c-c*sin(f*x+e))^(1/2),x, algorithm="maxima")
Output:
integrate((a*sin(f*x + e) + a)/sqrt(-c*sin(f*x + e) + c), x)
Exception generated. \[ \int \frac {a+a \sin (e+f x)}{\sqrt {c-c \sin (e+f x)}} \, dx=\text {Exception raised: TypeError} \] Input:
integrate((a+a*sin(f*x+e))/(c-c*sin(f*x+e))^(1/2),x, algorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:sym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument Value
Timed out. \[ \int \frac {a+a \sin (e+f x)}{\sqrt {c-c \sin (e+f x)}} \, dx=\int \frac {a+a\,\sin \left (e+f\,x\right )}{\sqrt {c-c\,\sin \left (e+f\,x\right )}} \,d x \] Input:
int((a + a*sin(e + f*x))/(c - c*sin(e + f*x))^(1/2),x)
Output:
int((a + a*sin(e + f*x))/(c - c*sin(e + f*x))^(1/2), x)
\[ \int \frac {a+a \sin (e+f x)}{\sqrt {c-c \sin (e+f x)}} \, dx=-\frac {\sqrt {c}\, a \left (\int \frac {\sqrt {-\sin \left (f x +e \right )+1}}{\sin \left (f x +e \right )-1}d x +\int \frac {\sqrt {-\sin \left (f x +e \right )+1}\, \sin \left (f x +e \right )}{\sin \left (f x +e \right )-1}d x \right )}{c} \] Input:
int((a+a*sin(f*x+e))/(c-c*sin(f*x+e))^(1/2),x)
Output:
( - sqrt(c)*a*(int(sqrt( - sin(e + f*x) + 1)/(sin(e + f*x) - 1),x) + int(( sqrt( - sin(e + f*x) + 1)*sin(e + f*x))/(sin(e + f*x) - 1),x)))/c