Integrand size = 41, antiderivative size = 137 \[ \int \frac {a+b \sin (d+e x)}{\sqrt {b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)}} \, dx=\frac {b x (b+a \sin (d+e x))}{a \sqrt {b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)}}-\frac {2 \sqrt {a^2-b^2} \text {arctanh}\left (\frac {a+b \tan \left (\frac {1}{2} (d+e x)\right )}{\sqrt {a^2-b^2}}\right ) (b+a \sin (d+e x))}{a e \sqrt {b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)}} \]
b*x*(b+a*sin(e*x+d))/a/(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^(1/2)-2*arc tanh((a+b*tan(1/2*e*x+1/2*d))/(a^2-b^2)^(1/2))*(b+a*sin(e*x+d))*(a^2-b^2)^ (1/2)/a/e/(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^(1/2)
Time = 0.45 (sec) , antiderivative size = 85, normalized size of antiderivative = 0.62 \[ \int \frac {a+b \sin (d+e x)}{\sqrt {b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)}} \, dx=\frac {\left (b (d+e x)-2 \sqrt {-a^2+b^2} \arctan \left (\frac {a+b \tan \left (\frac {1}{2} (d+e x)\right )}{\sqrt {-a^2+b^2}}\right )\right ) (b+a \sin (d+e x))}{a e \sqrt {(b+a \sin (d+e x))^2}} \]
((b*(d + e*x) - 2*Sqrt[-a^2 + b^2]*ArcTan[(a + b*Tan[(d + e*x)/2])/Sqrt[-a ^2 + b^2]])*(b + a*Sin[d + e*x]))/(a*e*Sqrt[(b + a*Sin[d + e*x])^2])
Time = 0.52 (sec) , antiderivative size = 114, normalized size of antiderivative = 0.83, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.220, Rules used = {3042, 3771, 27, 3042, 3214, 3042, 3139, 1083, 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+b \sin (d+e x)}{\sqrt {a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2}} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \sin (d+e x)}{\sqrt {a^2 \sin (d+e x)^2+2 a b \sin (d+e x)+b^2}}dx\) |
\(\Big \downarrow \) 3771 |
\(\displaystyle \frac {2 \left (a^2 \sin (d+e x)+a b\right ) \int \frac {a+b \sin (d+e x)}{2 \left (\sin (d+e x) a^2+b a\right )}dx}{\sqrt {a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2}}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {\left (a^2 \sin (d+e x)+a b\right ) \int \frac {a+b \sin (d+e x)}{\sin (d+e x) a^2+b a}dx}{\sqrt {a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 \sin (d+e x)+a b\right ) \int \frac {a+b \sin (d+e x)}{\sin (d+e x) a^2+b a}dx}{\sqrt {a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2}}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\left (a^2 \sin (d+e x)+a b\right ) \left (\frac {\left (a^2-b^2\right ) \int \frac {1}{\sin (d+e x) a^2+b a}dx}{a}+\frac {b x}{a^2}\right )}{\sqrt {a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2}}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\left (a^2 \sin (d+e x)+a b\right ) \left (\frac {\left (a^2-b^2\right ) \int \frac {1}{\sin (d+e x) a^2+b a}dx}{a}+\frac {b x}{a^2}\right )}{\sqrt {a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2}}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle \frac {\left (a^2 \sin (d+e x)+a b\right ) \left (\frac {2 \left (a^2-b^2\right ) \int \frac {1}{2 \tan \left (\frac {1}{2} (d+e x)\right ) a^2+b \tan ^2\left (\frac {1}{2} (d+e x)\right ) a+b a}d\tan \left (\frac {1}{2} (d+e x)\right )}{a e}+\frac {b x}{a^2}\right )}{\sqrt {a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2}}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {\left (a^2 \sin (d+e x)+a b\right ) \left (\frac {b x}{a^2}-\frac {4 \left (a^2-b^2\right ) \int \frac {1}{4 a^2 \left (a^2-b^2\right )-\left (2 a^2+2 b \tan \left (\frac {1}{2} (d+e x)\right ) a\right )^2}d\left (2 a^2+2 b \tan \left (\frac {1}{2} (d+e x)\right ) a\right )}{a e}\right )}{\sqrt {a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2}}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\left (a^2 \sin (d+e x)+a b\right ) \left (\frac {b x}{a^2}-\frac {2 \sqrt {a^2-b^2} \text {arctanh}\left (\frac {2 a^2+2 a b \tan \left (\frac {1}{2} (d+e x)\right )}{2 a \sqrt {a^2-b^2}}\right )}{a^2 e}\right )}{\sqrt {a^2 \sin ^2(d+e x)+2 a b \sin (d+e x)+b^2}}\) |
(((b*x)/a^2 - (2*Sqrt[a^2 - b^2]*ArcTanh[(2*a^2 + 2*a*b*Tan[(d + e*x)/2])/ (2*a*Sqrt[a^2 - b^2])])/(a^2*e))*(a*b + a^2*Sin[d + e*x]))/Sqrt[b^2 + 2*a* b*Sin[d + e*x] + a^2*Sin[d + e*x]^2]
3.6.6.3.1 Defintions of rubi rules used
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_.)*(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[((a_) + (b_.)*(x_) + (c_.)*(x_)^2)^(-1), x_Symbol] :> Simp[-2 Subst[I nt[1/Simp[b^2 - 4*a*c - x^2, x], x], x, b + 2*c*x], x] /; FreeQ[{a, b, c}, x]
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{e = Fre eFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + 2*b*e*x + a *e^2*x^2), x], x, Tan[(c + d*x)/2]/e], x]] /; FreeQ[{a, b, c, d}, x] && NeQ [a^2 - b^2, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])/((c_.) + (d_.)*sin[(e_.) + (f_. )*(x_)]), x_Symbol] :> Simp[b*(x/d), x] - Simp[(b*c - a*d)/d Int[1/(c + d *Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0]
Int[((A_) + (B_.)*sin[(d_.) + (e_.)*(x_)])*((a_) + (b_.)*sin[(d_.) + (e_.)* (x_)] + (c_.)*sin[(d_.) + (e_.)*(x_)]^2)^(n_), x_Symbol] :> Simp[(a + b*Sin [d + e*x] + c*Sin[d + e*x]^2)^n/(b + 2*c*Sin[d + e*x])^(2*n) Int[(A + B*S in[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]
Result contains higher order function than in optimal. Order 9 vs. order 3.
Time = 2.05 (sec) , antiderivative size = 88, normalized size of antiderivative = 0.64
method | result | size |
default | \(\frac {\operatorname {csgn}\left (b +a \sin \left (e x +d \right )\right ) \left (\frac {2 b \arctan \left (\tan \left (\frac {e x}{2}+\frac {d}{2}\right )\right )}{a}+\frac {2 \left (a^{2}-b^{2}\right ) \arctan \left (\frac {2 b \tan \left (\frac {e x}{2}+\frac {d}{2}\right )+2 a}{2 \sqrt {-a^{2}+b^{2}}}\right )}{a \sqrt {-a^{2}+b^{2}}}\right )}{e}\) | \(88\) |
parts | \(-\frac {2 a \,\operatorname {csgn}\left (b +a \sin \left (e x +d \right )\right ) \arctan \left (\frac {\cot \left (e x +d \right ) b -b \csc \left (e x +d \right )-a}{\sqrt {-a^{2}+b^{2}}}\right )}{e \sqrt {-a^{2}+b^{2}}}+\frac {b \,\operatorname {csgn}\left (b +a \sin \left (e x +d \right )\right ) \left (2 b \arctan \left (\frac {\cot \left (e x +d \right ) b -b \csc \left (e x +d \right )-a}{\sqrt {-a^{2}+b^{2}}}\right )+\left (e x +d \right ) \sqrt {-a^{2}+b^{2}}\right )}{e a \sqrt {-a^{2}+b^{2}}}\) | \(149\) |
csgn(b+a*sin(e*x+d))/e*(2*b/a*arctan(tan(1/2*e*x+1/2*d))+2*(a^2-b^2)/a/(-a ^2+b^2)^(1/2)*arctan(1/2*(2*b*tan(1/2*e*x+1/2*d)+2*a)/(-a^2+b^2)^(1/2)))
Time = 0.26 (sec) , antiderivative size = 204, normalized size of antiderivative = 1.49 \[ \int \frac {a+b \sin (d+e x)}{\sqrt {b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)}} \, dx=\left [\frac {2 \, b e x + \sqrt {a^{2} - b^{2}} \log \left (-\frac {{\left (a^{2} - 2 \, b^{2}\right )} \cos \left (e x + d\right )^{2} + 2 \, a b \sin \left (e x + d\right ) + a^{2} + b^{2} - 2 \, {\left (b \cos \left (e x + d\right ) \sin \left (e x + d\right ) + a \cos \left (e x + d\right )\right )} \sqrt {a^{2} - b^{2}}}{a^{2} \cos \left (e x + d\right )^{2} - 2 \, a b \sin \left (e x + d\right ) - a^{2} - b^{2}}\right )}{2 \, a e}, \frac {b e x - \sqrt {-a^{2} + b^{2}} \arctan \left (-\frac {\sqrt {-a^{2} + b^{2}} {\left (b \sin \left (e x + d\right ) + a\right )}}{{\left (a^{2} - b^{2}\right )} \cos \left (e x + d\right )}\right )}{a e}\right ] \]
integrate((a+b*sin(e*x+d))/(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^(1/2),x , algorithm="fricas")
[1/2*(2*b*e*x + sqrt(a^2 - b^2)*log(-((a^2 - 2*b^2)*cos(e*x + d)^2 + 2*a*b *sin(e*x + d) + a^2 + b^2 - 2*(b*cos(e*x + d)*sin(e*x + d) + a*cos(e*x + d ))*sqrt(a^2 - b^2))/(a^2*cos(e*x + d)^2 - 2*a*b*sin(e*x + d) - a^2 - b^2)) )/(a*e), (b*e*x - sqrt(-a^2 + b^2)*arctan(-sqrt(-a^2 + b^2)*(b*sin(e*x + d ) + a)/((a^2 - b^2)*cos(e*x + d))))/(a*e)]
\[ \int \frac {a+b \sin (d+e x)}{\sqrt {b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)}} \, dx=\int \frac {a + b \sin {\left (d + e x \right )}}{\sqrt {\left (a \sin {\left (d + e x \right )} + b\right )^{2}}}\, dx \]
Exception generated. \[ \int \frac {a+b \sin (d+e x)}{\sqrt {b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)}} \, dx=\text {Exception raised: ValueError} \]
integrate((a+b*sin(e*x+d))/(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^(1/2),x , algorithm="maxima")
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a^2-4*b^2>0)', see `assume?` f or more de
Time = 0.30 (sec) , antiderivative size = 110, normalized size of antiderivative = 0.80 \[ \int \frac {a+b \sin (d+e x)}{\sqrt {b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)}} \, dx=\frac {\frac {{\left (e x + d\right )} b}{a \mathrm {sgn}\left (a \sin \left (e x + d\right ) + b\right )} + \frac {2 \, {\left (\pi \left \lfloor \frac {e x + d}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (b\right ) + \arctan \left (\frac {b \tan \left (\frac {1}{2} \, e x + \frac {1}{2} \, d\right ) + a}{\sqrt {-a^{2} + b^{2}}}\right )\right )} {\left (a^{2} - b^{2}\right )}}{\sqrt {-a^{2} + b^{2}} a \mathrm {sgn}\left (a \sin \left (e x + d\right ) + b\right )}}{e} \]
integrate((a+b*sin(e*x+d))/(b^2+2*a*b*sin(e*x+d)+a^2*sin(e*x+d)^2)^(1/2),x , algorithm="giac")
((e*x + d)*b/(a*sgn(a*sin(e*x + d) + b)) + 2*(pi*floor(1/2*(e*x + d)/pi + 1/2)*sgn(b) + arctan((b*tan(1/2*e*x + 1/2*d) + a)/sqrt(-a^2 + b^2)))*(a^2 - b^2)/(sqrt(-a^2 + b^2)*a*sgn(a*sin(e*x + d) + b)))/e
Timed out. \[ \int \frac {a+b \sin (d+e x)}{\sqrt {b^2+2 a b \sin (d+e x)+a^2 \sin ^2(d+e x)}} \, dx=\int \frac {a+b\,\sin \left (d+e\,x\right )}{\sqrt {a^2\,{\sin \left (d+e\,x\right )}^2+2\,a\,b\,\sin \left (d+e\,x\right )+b^2}} \,d x \]