Integrand size = 36, antiderivative size = 62 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c-c \sin (e+f x))} \, dx=-\frac {(A-B) \sec (e+f x)}{3 c f \left (a^2+a^2 \sin (e+f x)\right )}+\frac {(2 A+B) \tan (e+f x)}{3 a^2 c f} \] Output:
-1/3*(A-B)*sec(f*x+e)/c/f/(a^2+a^2*sin(f*x+e))+1/3*(2*A+B)*tan(f*x+e)/a^2/ c/f
Time = 3.19 (sec) , antiderivative size = 110, normalized size of antiderivative = 1.77 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c-c \sin (e+f x))} \, dx=\frac {\cos (e+f x) (-6 B-2 (A-B) \cos (e+f x)+2 (2 A+B) \cos (2 (e+f x))-8 A \sin (e+f x)-4 B \sin (e+f x)-A \sin (2 (e+f x))+B \sin (2 (e+f x)))}{12 a^2 c f (-1+\sin (e+f x)) (1+\sin (e+f x))^2} \] Input:
Integrate[(A + B*Sin[e + f*x])/((a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x] )),x]
Output:
(Cos[e + f*x]*(-6*B - 2*(A - B)*Cos[e + f*x] + 2*(2*A + B)*Cos[2*(e + f*x) ] - 8*A*Sin[e + f*x] - 4*B*Sin[e + f*x] - A*Sin[2*(e + f*x)] + B*Sin[2*(e + f*x)]))/(12*a^2*c*f*(-1 + Sin[e + f*x])*(1 + Sin[e + f*x])^2)
Time = 0.50 (sec) , antiderivative size = 59, normalized size of antiderivative = 0.95, number of steps used = 8, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.194, Rules used = {3042, 3446, 3042, 3338, 3042, 4254, 24}
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 (e+f x)}{(a \sin (e+f x)+a)^2 (c-c \sin (e+f x))} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \sin (e+f x)}{(a \sin (e+f x)+a)^2 (c-c \sin (e+f x))}dx\) |
\(\Big \downarrow \) 3446 |
\(\displaystyle \frac {\int \frac {\sec ^2(e+f x) (A+B \sin (e+f x))}{\sin (e+f x) a+a}dx}{a c}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {A+B \sin (e+f x)}{\cos (e+f x)^2 (\sin (e+f x) a+a)}dx}{a c}\) |
\(\Big \downarrow \) 3338 |
\(\displaystyle \frac {\frac {(2 A+B) \int \sec ^2(e+f x)dx}{3 a}-\frac {(A-B) \sec (e+f x)}{3 f (a \sin (e+f x)+a)}}{a c}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {(2 A+B) \int \csc \left (e+f x+\frac {\pi }{2}\right )^2dx}{3 a}-\frac {(A-B) \sec (e+f x)}{3 f (a \sin (e+f x)+a)}}{a c}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {-\frac {(2 A+B) \int 1d(-\tan (e+f x))}{3 a f}-\frac {(A-B) \sec (e+f x)}{3 f (a \sin (e+f x)+a)}}{a c}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {(2 A+B) \tan (e+f x)}{3 a f}-\frac {(A-B) \sec (e+f x)}{3 f (a \sin (e+f x)+a)}}{a c}\) |
Input:
Int[(A + B*Sin[e + f*x])/((a + a*Sin[e + f*x])^2*(c - c*Sin[e + f*x])),x]
Output:
(-1/3*((A - B)*Sec[e + f*x])/(f*(a + a*Sin[e + f*x])) + ((2*A + B)*Tan[e + f*x])/(3*a*f))/(a*c)
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(b*c - a*d)*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^m/(a*f*g*(2*m + p + 1) )), x] + Simp[(a*d*m + b*c*(m + p + 1))/(a*b*(2*m + p + 1)) Int[(g*Cos[e + f*x])^p*(a + b*Sin[e + f*x])^(m + 1), x], x] /; FreeQ[{a, b, c, d, e, f, g, m, p}, x] && EqQ[a^2 - b^2, 0] && (LtQ[m, -1] || ILtQ[Simplify[m + p], 0 ]) && NeQ[2*m + p + 1, 0]
Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Si mp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m)*(A + B*Sin [e + f*x]), 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] && IntegerQ[m] && !(IntegerQ[n] && ((LtQ[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1) Subst[Int[Exp andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]
Result contains complex when optimal does not.
Time = 0.45 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.39
method | result | size |
risch | \(\frac {2 i \left (4 i A \,{\mathrm e}^{i \left (f x +e \right )}+2 i B \,{\mathrm e}^{i \left (f x +e \right )}+3 B \,{\mathrm e}^{2 i \left (f x +e \right )}-2 A -B \right )}{3 \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )^{3} \left ({\mathrm e}^{i \left (f x +e \right )}-i\right ) f \,a^{2} c}\) | \(86\) |
parallelrisch | \(\frac {-6 A \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+\left (-6 A -6 B \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\left (-2 A -4 B \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 A -2 B}{3 f \,a^{2} c \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\) | \(95\) |
derivativedivides | \(\frac {-\frac {-A +B}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (A -B \right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}-\frac {2 \left (\frac {3 A}{4}-\frac {B}{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {2 \left (\frac {A}{4}+\frac {B}{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}}{f \,a^{2} c}\) | \(97\) |
default | \(\frac {-\frac {-A +B}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (A -B \right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}-\frac {2 \left (\frac {3 A}{4}-\frac {B}{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {2 \left (\frac {A}{4}+\frac {B}{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}}{f \,a^{2} c}\) | \(97\) |
norman | \(\frac {-\frac {2 A +4 B}{6 a c f}-\frac {4 \left (2 A +B \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{3 a c f}+\frac {A \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{a c f}-\frac {\left (2 A +4 B \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{2 a c f}-\frac {\left (8 A +4 B \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{3 a c f}-\frac {\left (14 A +16 B \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{6 a c f}}{a \left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}\) | \(199\) |
Input:
int((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^2/(c-c*sin(f*x+e)),x,method=_RETURNV ERBOSE)
Output:
2/3*I*(4*I*A*exp(I*(f*x+e))+2*I*B*exp(I*(f*x+e))+3*B*exp(2*I*(f*x+e))-2*A- B)/(exp(I*(f*x+e))+I)^3/(exp(I*(f*x+e))-I)/f/a^2/c
Time = 0.07 (sec) , antiderivative size = 69, normalized size of antiderivative = 1.11 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c-c \sin (e+f x))} \, dx=-\frac {{\left (2 \, A + B\right )} \cos \left (f x + e\right )^{2} - {\left (2 \, A + B\right )} \sin \left (f x + e\right ) - A - 2 \, B}{3 \, {\left (a^{2} c f \cos \left (f x + e\right ) \sin \left (f x + e\right ) + a^{2} c f \cos \left (f x + e\right )\right )}} \] Input:
integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^2/(c-c*sin(f*x+e)),x, algorith m="fricas")
Output:
-1/3*((2*A + B)*cos(f*x + e)^2 - (2*A + B)*sin(f*x + e) - A - 2*B)/(a^2*c* f*cos(f*x + e)*sin(f*x + e) + a^2*c*f*cos(f*x + e))
Leaf count of result is larger than twice the leaf count of optimal. 578 vs. \(2 (51) = 102\).
Time = 2.31 (sec) , antiderivative size = 578, normalized size of antiderivative = 9.32 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c-c \sin (e+f x))} \, dx =\text {Too large to display} \] Input:
integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))**2/(c-c*sin(f*x+e)),x)
Output:
Piecewise((-6*A*tan(e/2 + f*x/2)**3/(3*a**2*c*f*tan(e/2 + f*x/2)**4 + 6*a* *2*c*f*tan(e/2 + f*x/2)**3 - 6*a**2*c*f*tan(e/2 + f*x/2) - 3*a**2*c*f) - 6 *A*tan(e/2 + f*x/2)**2/(3*a**2*c*f*tan(e/2 + f*x/2)**4 + 6*a**2*c*f*tan(e/ 2 + f*x/2)**3 - 6*a**2*c*f*tan(e/2 + f*x/2) - 3*a**2*c*f) - 2*A*tan(e/2 + f*x/2)/(3*a**2*c*f*tan(e/2 + f*x/2)**4 + 6*a**2*c*f*tan(e/2 + f*x/2)**3 - 6*a**2*c*f*tan(e/2 + f*x/2) - 3*a**2*c*f) + 2*A/(3*a**2*c*f*tan(e/2 + f*x/ 2)**4 + 6*a**2*c*f*tan(e/2 + f*x/2)**3 - 6*a**2*c*f*tan(e/2 + f*x/2) - 3*a **2*c*f) - 6*B*tan(e/2 + f*x/2)**2/(3*a**2*c*f*tan(e/2 + f*x/2)**4 + 6*a** 2*c*f*tan(e/2 + f*x/2)**3 - 6*a**2*c*f*tan(e/2 + f*x/2) - 3*a**2*c*f) - 4* B*tan(e/2 + f*x/2)/(3*a**2*c*f*tan(e/2 + f*x/2)**4 + 6*a**2*c*f*tan(e/2 + f*x/2)**3 - 6*a**2*c*f*tan(e/2 + f*x/2) - 3*a**2*c*f) - 2*B/(3*a**2*c*f*ta n(e/2 + f*x/2)**4 + 6*a**2*c*f*tan(e/2 + f*x/2)**3 - 6*a**2*c*f*tan(e/2 + f*x/2) - 3*a**2*c*f), Ne(f, 0)), (x*(A + B*sin(e))/((a*sin(e) + a)**2*(-c* sin(e) + c)), True))
Leaf count of result is larger than twice the leaf count of optimal. 265 vs. \(2 (58) = 116\).
Time = 0.04 (sec) , antiderivative size = 265, normalized size of antiderivative = 4.27 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c-c \sin (e+f x))} \, dx=\frac {2 \, {\left (\frac {B {\left (\frac {2 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {3 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + 1\right )}}{a^{2} c + \frac {2 \, a^{2} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {2 \, a^{2} c \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {a^{2} c \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}} + \frac {A {\left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {3 \, \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {3 \, \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - 1\right )}}{a^{2} c + \frac {2 \, a^{2} c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {2 \, a^{2} c \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {a^{2} c \sin \left (f x + e\right )^{4}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{4}}}\right )}}{3 \, f} \] Input:
integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^2/(c-c*sin(f*x+e)),x, algorith m="maxima")
Output:
2/3*(B*(2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 1)/(a^2*c + 2*a^2*c*sin(f*x + e)/(cos(f*x + e) + 1) - 2*a^2*c*si n(f*x + e)^3/(cos(f*x + e) + 1)^3 - a^2*c*sin(f*x + e)^4/(cos(f*x + e) + 1 )^4) + A*(sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 3*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 - 1)/(a^2*c + 2*a^2*c*sin( f*x + e)/(cos(f*x + e) + 1) - 2*a^2*c*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 - a^2*c*sin(f*x + e)^4/(cos(f*x + e) + 1)^4))/f
Time = 0.24 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.56 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c-c \sin (e+f x))} \, dx=-\frac {\frac {3 \, {\left (A + B\right )}}{a^{2} c {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )}} + \frac {9 \, A \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 3 \, B \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 12 \, A \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 7 \, A - B}{a^{2} c {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}}}{6 \, f} \] Input:
integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^2/(c-c*sin(f*x+e)),x, algorith m="giac")
Output:
-1/6*(3*(A + B)/(a^2*c*(tan(1/2*f*x + 1/2*e) - 1)) + (9*A*tan(1/2*f*x + 1/ 2*e)^2 - 3*B*tan(1/2*f*x + 1/2*e)^2 + 12*A*tan(1/2*f*x + 1/2*e) + 7*A - B) /(a^2*c*(tan(1/2*f*x + 1/2*e) + 1)^3))/f
Time = 37.15 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.89 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c-c \sin (e+f x))} \, dx=\frac {2\,\left (\frac {3\,B}{2}-A\,\cos \left (e+f\,x\right )+B\,\cos \left (e+f\,x\right )+2\,A\,\sin \left (e+f\,x\right )+B\,\sin \left (e+f\,x\right )-A\,\cos \left (2\,e+2\,f\,x\right )-\frac {B\,\cos \left (2\,e+2\,f\,x\right )}{2}-\frac {A\,\sin \left (2\,e+2\,f\,x\right )}{2}+\frac {B\,\sin \left (2\,e+2\,f\,x\right )}{2}\right )}{3\,a^2\,c\,f\,\left (2\,\cos \left (e+f\,x\right )+\sin \left (2\,e+2\,f\,x\right )\right )} \] Input:
int((A + B*sin(e + f*x))/((a + a*sin(e + f*x))^2*(c - c*sin(e + f*x))),x)
Output:
(2*((3*B)/2 - A*cos(e + f*x) + B*cos(e + f*x) + 2*A*sin(e + f*x) + B*sin(e + f*x) - A*cos(2*e + 2*f*x) - (B*cos(2*e + 2*f*x))/2 - (A*sin(2*e + 2*f*x ))/2 + (B*sin(2*e + 2*f*x))/2))/(3*a^2*c*f*(2*cos(e + f*x) + sin(2*e + 2*f *x)))
Time = 0.18 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.90 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c-c \sin (e+f x))} \, dx=\frac {2 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a +\cos \left (f x +e \right ) \sin \left (f x +e \right ) b +2 \cos \left (f x +e \right ) a +\cos \left (f x +e \right ) b +2 \sin \left (f x +e \right )^{2} a +\sin \left (f x +e \right )^{2} b +2 a \sin \left (f x +e \right )+\sin \left (f x +e \right ) b -a +b}{3 \cos \left (f x +e \right ) a^{2} c f \left (\sin \left (f x +e \right )+1\right )} \] Input:
int((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^2/(c-c*sin(f*x+e)),x)
Output:
(2*cos(e + f*x)*sin(e + f*x)*a + cos(e + f*x)*sin(e + f*x)*b + 2*cos(e + f *x)*a + cos(e + f*x)*b + 2*sin(e + f*x)**2*a + sin(e + f*x)**2*b + 2*sin(e + f*x)*a + sin(e + f*x)*b - a + b)/(3*cos(e + f*x)*a**2*c*f*(sin(e + f*x) + 1))