Integrand size = 36, antiderivative size = 63 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x)) (c-c \sin (e+f x))^2} \, dx=\frac {(A+B) \sec (e+f x)}{3 a f \left (c^2-c^2 \sin (e+f x)\right )}+\frac {(2 A-B) \tan (e+f x)}{3 a c^2 f} \] Output:
1/3*(A+B)*sec(f*x+e)/a/f/(c^2-c^2*sin(f*x+e))+1/3*(2*A-B)*tan(f*x+e)/a/c^2 /f
Time = 3.13 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.71 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x)) (c-c \sin (e+f x))^2} \, dx=\frac {\cos (e+f x) (6 B-2 (A+B) \cos (e+f x)+(4 A-2 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 c^2 f (-1+\sin (e+f x))^2 (1+\sin (e+f x))} \] Input:
Integrate[(A + B*Sin[e + f*x])/((a + a*Sin[e + f*x])*(c - c*Sin[e + f*x])^ 2),x]
Output:
(Cos[e + f*x]*(6*B - 2*(A + B)*Cos[e + f*x] + (4*A - 2*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*c^2*f*(-1 + Sin[e + f*x])^2*(1 + Sin[e + f*x]))
Time = 0.51 (sec) , antiderivative size = 60, 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) (c-c \sin (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {A+B \sin (e+f x)}{(a \sin (e+f x)+a) (c-c \sin (e+f x))^2}dx\) |
\(\Big \downarrow \) 3446 |
\(\displaystyle \frac {\int \frac {\sec ^2(e+f x) (A+B \sin (e+f x))}{c-c \sin (e+f x)}dx}{a c}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {A+B \sin (e+f x)}{\cos (e+f x)^2 (c-c \sin (e+f x))}dx}{a c}\) |
\(\Big \downarrow \) 3338 |
\(\displaystyle \frac {\frac {(2 A-B) \int \sec ^2(e+f x)dx}{3 c}+\frac {(A+B) \sec (e+f x)}{3 f (c-c \sin (e+f x))}}{a c}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {(2 A-B) \int \csc \left (e+f x+\frac {\pi }{2}\right )^2dx}{3 c}+\frac {(A+B) \sec (e+f x)}{3 f (c-c \sin (e+f x))}}{a c}\) |
\(\Big \downarrow \) 4254 |
\(\displaystyle \frac {\frac {(A+B) \sec (e+f x)}{3 f (c-c \sin (e+f x))}-\frac {(2 A-B) \int 1d(-\tan (e+f x))}{3 c f}}{a c}\) |
\(\Big \downarrow \) 24 |
\(\displaystyle \frac {\frac {(2 A-B) \tan (e+f x)}{3 c f}+\frac {(A+B) \sec (e+f x)}{3 f (c-c \sin (e+f x))}}{a c}\) |
Input:
Int[(A + B*Sin[e + f*x])/((a + a*Sin[e + f*x])*(c - c*Sin[e + f*x])^2),x]
Output:
(((A + B)*Sec[e + f*x])/(3*f*(c - c*Sin[e + f*x])) + ((2*A - B)*Tan[e + f* x])/(3*c*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.44 (sec) , antiderivative size = 86, normalized size of antiderivative = 1.37
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 \,c^{2}}\) | \(86\) |
derivativedivides | \(\frac {-\frac {2 \left (\frac {A}{4}-\frac {B}{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {2 \left (A +B \right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}-\frac {A +B}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {2 \left (\frac {3 A}{4}+\frac {B}{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}}{f a \,c^{2}}\) | \(93\) |
default | \(\frac {-\frac {2 \left (\frac {A}{4}-\frac {B}{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {2 \left (A +B \right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}-\frac {A +B}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{2}}-\frac {2 \left (\frac {3 A}{4}+\frac {B}{4}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}}{f a \,c^{2}}\) | \(93\) |
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 \,c^{2} \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\) |
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}}{\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 ) c \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )^{3}}\) | \(202\) |
Input:
int((A+B*sin(f*x+e))/(a+a*sin(f*x+e))/(c-c*sin(f*x+e))^2,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/c^2
Time = 0.07 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.16 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x)) (c-c \sin (e+f x))^2} \, 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 c^{2} f \cos \left (f x + e\right ) \sin \left (f x + e\right ) - a c^{2} f \cos \left (f x + e\right )\right )}} \] Input:
integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))/(c-c*sin(f*x+e))^2,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*c^2* f*cos(f*x + e)*sin(f*x + e) - a*c^2*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.33 (sec) , antiderivative size = 578, normalized size of antiderivative = 9.17 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x)) (c-c \sin (e+f x))^2} \, dx =\text {Too large to display} \] Input:
integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))/(c-c*sin(f*x+e))**2,x)
Output:
Piecewise((-6*A*tan(e/2 + f*x/2)**3/(3*a*c**2*f*tan(e/2 + f*x/2)**4 - 6*a* c**2*f*tan(e/2 + f*x/2)**3 + 6*a*c**2*f*tan(e/2 + f*x/2) - 3*a*c**2*f) + 6 *A*tan(e/2 + f*x/2)**2/(3*a*c**2*f*tan(e/2 + f*x/2)**4 - 6*a*c**2*f*tan(e/ 2 + f*x/2)**3 + 6*a*c**2*f*tan(e/2 + f*x/2) - 3*a*c**2*f) - 2*A*tan(e/2 + f*x/2)/(3*a*c**2*f*tan(e/2 + f*x/2)**4 - 6*a*c**2*f*tan(e/2 + f*x/2)**3 + 6*a*c**2*f*tan(e/2 + f*x/2) - 3*a*c**2*f) - 2*A/(3*a*c**2*f*tan(e/2 + f*x/ 2)**4 - 6*a*c**2*f*tan(e/2 + f*x/2)**3 + 6*a*c**2*f*tan(e/2 + f*x/2) - 3*a *c**2*f) - 6*B*tan(e/2 + f*x/2)**2/(3*a*c**2*f*tan(e/2 + f*x/2)**4 - 6*a*c **2*f*tan(e/2 + f*x/2)**3 + 6*a*c**2*f*tan(e/2 + f*x/2) - 3*a*c**2*f) + 4* B*tan(e/2 + f*x/2)/(3*a*c**2*f*tan(e/2 + f*x/2)**4 - 6*a*c**2*f*tan(e/2 + f*x/2)**3 + 6*a*c**2*f*tan(e/2 + f*x/2) - 3*a*c**2*f) - 2*B/(3*a*c**2*f*ta n(e/2 + f*x/2)**4 - 6*a*c**2*f*tan(e/2 + f*x/2)**3 + 6*a*c**2*f*tan(e/2 + f*x/2) - 3*a*c**2*f), Ne(f, 0)), (x*(A + B*sin(e))/((a*sin(e) + a)*(-c*sin (e) + c)**2), True))
Leaf count of result is larger than twice the leaf count of optimal. 266 vs. \(2 (60) = 120\).
Time = 0.04 (sec) , antiderivative size = 266, normalized size of antiderivative = 4.22 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x)) (c-c \sin (e+f x))^2} \, 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 c^{2} - \frac {2 \, a c^{2} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {2 \, a c^{2} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {a c^{2} \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 c^{2} - \frac {2 \, a c^{2} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {2 \, a c^{2} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}} - \frac {a c^{2} \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))/(c-c*sin(f*x+e))^2,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*c^2 - 2*a*c^2*sin(f*x + e)/(cos(f*x + e) + 1) + 2*a*c^2*s in(f*x + e)^3/(cos(f*x + e) + 1)^3 - a*c^2*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*c^2 - 2*a*c^2*sin (f*x + e)/(cos(f*x + e) + 1) + 2*a*c^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 - a*c^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4))/f
Time = 0.22 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.54 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x)) (c-c \sin (e+f x))^2} \, dx=-\frac {\frac {3 \, {\left (A - B\right )}}{a c^{2} {\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 c^{2} {\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))/(c-c*sin(f*x+e))^2,x, algorith m="giac")
Output:
-1/6*(3*(A - B)/(a*c^2*(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*c^2*(tan(1/2*f*x + 1/2*e) - 1)^3))/f
Time = 37.11 (sec) , antiderivative size = 118, normalized size of antiderivative = 1.87 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x)) (c-c \sin (e+f x))^2} \, 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\,c^2\,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))*(c - c*sin(e + f*x))^2),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*c^2*f*(2*cos(e + f*x) - sin(2*e + 2*f *x)))
Time = 0.18 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.94 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x)) (c-c \sin (e+f x))^2} \, 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 \,c^{2} f \left (\sin \left (f x +e \right )-1\right )} \] Input:
int((A+B*sin(f*x+e))/(a+a*sin(f*x+e))/(c-c*sin(f*x+e))^2,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*si n(e + f*x)*a + sin(e + f*x)*b - a - b)/(3*cos(e + f*x)*a*c**2*f*(sin(e + f *x) - 1))