Integrand size = 35, antiderivative size = 152 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))} \, dx=-\frac {2 d (B c-A d) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{a^2 (c-d)^2 \sqrt {c^2-d^2} f}-\frac {(A (c-4 d)+B (2 c+d)) \cos (e+f x)}{3 a^2 (c-d)^2 f (1+\sin (e+f x))}-\frac {(A-B) \cos (e+f x)}{3 (c-d) f (a+a \sin (e+f x))^2} \] Output:
-2*d*(-A*d+B*c)*arctan((d+c*tan(1/2*f*x+1/2*e))/(c^2-d^2)^(1/2))/a^2/(c-d) ^2/(c^2-d^2)^(1/2)/f-1/3*(A*(c-4*d)+B*(2*c+d))*cos(f*x+e)/a^2/(c-d)^2/f/(1 +sin(f*x+e))-1/3*(A-B)*cos(f*x+e)/(c-d)/f/(a+a*sin(f*x+e))^2
Time = 4.17 (sec) , antiderivative size = 229, normalized size of antiderivative = 1.51 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (2 (A-B) (c-d) \sin \left (\frac {1}{2} (e+f x)\right )+(-A+B) (c-d) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+2 (A (c-4 d)+B (2 c+d)) \sin \left (\frac {1}{2} (e+f x)\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2+\frac {6 d (-B c+A d) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right ) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3}{\sqrt {c^2-d^2}}\right )}{3 a^2 (c-d)^2 f (1+\sin (e+f x))^2} \] Input:
Integrate[(A + B*Sin[e + f*x])/((a + a*Sin[e + f*x])^2*(c + d*Sin[e + f*x] )),x]
Output:
((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(2*(A - B)*(c - d)*Sin[(e + f*x)/2] + (-A + B)*(c - d)*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]) + 2*(A*(c - 4*d) + B*(2*c + d))*Sin[(e + f*x)/2]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 + (6*d*(-(B*c) + A*d)*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]]*(Cos [(e + f*x)/2] + Sin[(e + f*x)/2])^3)/Sqrt[c^2 - d^2]))/(3*a^2*(c - d)^2*f* (1 + Sin[e + f*x])^2)
Time = 0.76 (sec) , antiderivative size = 165, normalized size of antiderivative = 1.09, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.286, Rules used = {3042, 3457, 25, 3042, 3457, 27, 3042, 3139, 1083, 217}
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+d \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+d \sin (e+f x))}dx\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle -\frac {\int -\frac {a (2 B c+A (c-3 d))+a (A-B) d \sin (e+f x)}{(\sin (e+f x) a+a) (c+d \sin (e+f x))}dx}{3 a^2 (c-d)}-\frac {(A-B) \cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {a (2 B c+A (c-3 d))+a (A-B) d \sin (e+f x)}{(\sin (e+f x) a+a) (c+d \sin (e+f x))}dx}{3 a^2 (c-d)}-\frac {(A-B) \cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a (2 B c+A (c-3 d))+a (A-B) d \sin (e+f x)}{(\sin (e+f x) a+a) (c+d \sin (e+f x))}dx}{3 a^2 (c-d)}-\frac {(A-B) \cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3457 |
\(\displaystyle \frac {-\frac {\int \frac {3 a^2 d (B c-A d)}{c+d \sin (e+f x)}dx}{a^2 (c-d)}-\frac {(A (c-4 d)+B (2 c+d)) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1)}}{3 a^2 (c-d)}-\frac {(A-B) \cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {-\frac {3 d (B c-A d) \int \frac {1}{c+d \sin (e+f x)}dx}{c-d}-\frac {(A (c-4 d)+B (2 c+d)) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1)}}{3 a^2 (c-d)}-\frac {(A-B) \cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {-\frac {3 d (B c-A d) \int \frac {1}{c+d \sin (e+f x)}dx}{c-d}-\frac {(A (c-4 d)+B (2 c+d)) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1)}}{3 a^2 (c-d)}-\frac {(A-B) \cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle \frac {-\frac {6 d (B c-A d) \int \frac {1}{c \tan ^2\left (\frac {1}{2} (e+f x)\right )+2 d \tan \left (\frac {1}{2} (e+f x)\right )+c}d\tan \left (\frac {1}{2} (e+f x)\right )}{f (c-d)}-\frac {(A (c-4 d)+B (2 c+d)) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1)}}{3 a^2 (c-d)}-\frac {(A-B) \cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {\frac {12 d (B c-A d) \int \frac {1}{-\left (2 d+2 c \tan \left (\frac {1}{2} (e+f x)\right )\right )^2-4 \left (c^2-d^2\right )}d\left (2 d+2 c \tan \left (\frac {1}{2} (e+f x)\right )\right )}{f (c-d)}-\frac {(A (c-4 d)+B (2 c+d)) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1)}}{3 a^2 (c-d)}-\frac {(A-B) \cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {-\frac {6 d (B c-A d) \arctan \left (\frac {2 c \tan \left (\frac {1}{2} (e+f x)\right )+2 d}{2 \sqrt {c^2-d^2}}\right )}{f (c-d) \sqrt {c^2-d^2}}-\frac {(A (c-4 d)+B (2 c+d)) \cos (e+f x)}{f (c-d) (\sin (e+f x)+1)}}{3 a^2 (c-d)}-\frac {(A-B) \cos (e+f x)}{3 f (c-d) (a \sin (e+f x)+a)^2}\) |
Input:
Int[(A + B*Sin[e + f*x])/((a + a*Sin[e + f*x])^2*(c + d*Sin[e + f*x])),x]
Output:
-1/3*((A - B)*Cos[e + f*x])/((c - d)*f*(a + a*Sin[e + f*x])^2) + ((-6*d*(B *c - A*d)*ArcTan[(2*d + 2*c*Tan[(e + f*x)/2])/(2*Sqrt[c^2 - d^2])])/((c - d)*Sqrt[c^2 - d^2]*f) - ((A*(c - 4*d) + B*(2*c + d))*Cos[e + f*x])/((c - d )*f*(1 + Sin[e + f*x])))/(3*a^2*(c - d))
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[(-(Rt[-a, 2]*Rt[-b, 2])^( -1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & & (LtQ[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_)])^(m_)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Sim p[b*(A*b - a*B)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*((c + d*Sin[e + f*x])^( n + 1)/(a*f*(2*m + 1)*(b*c - a*d))), x] + Simp[1/(a*(2*m + 1)*(b*c - a*d)) Int[(a + b*Sin[e + f*x])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[B*(a*c*m + b *d*(n + 1)) + A*(b*c*(m + 1) - a*d*(2*m + n + 2)) + d*(A*b - a*B)*(m + n + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, A, B, n}, x] && NeQ [b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -2^(-1)] && !GtQ[n, 0] && IntegerQ[2*m] && (IntegerQ[2*n] || EqQ[c, 0])
Time = 0.86 (sec) , antiderivative size = 159, normalized size of antiderivative = 1.05
method | result | size |
derivativedivides | \(\frac {-\frac {-2 A +2 B}{\left (c -d \right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (2 A -2 B \right )}{3 \left (c -d \right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}-\frac {2 \left (A c -2 A d +B d \right )}{\left (c -d \right )^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}+\frac {2 d \left (A d -B c \right ) \arctan \left (\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 d}{2 \sqrt {c^{2}-d^{2}}}\right )}{\left (c -d \right )^{2} \sqrt {c^{2}-d^{2}}}}{a^{2} f}\) | \(159\) |
default | \(\frac {-\frac {-2 A +2 B}{\left (c -d \right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (2 A -2 B \right )}{3 \left (c -d \right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}-\frac {2 \left (A c -2 A d +B d \right )}{\left (c -d \right )^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}+\frac {2 d \left (A d -B c \right ) \arctan \left (\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 d}{2 \sqrt {c^{2}-d^{2}}}\right )}{\left (c -d \right )^{2} \sqrt {c^{2}-d^{2}}}}{a^{2} f}\) | \(159\) |
risch | \(\frac {\frac {2 A c}{3}-\frac {8 A d}{3}-2 i A c \,{\mathrm e}^{i \left (f x +e \right )}+6 i A d \,{\mathrm e}^{i \left (f x +e \right )}+2 A d \,{\mathrm e}^{2 i \left (f x +e \right )}+\frac {4 B c}{3}+\frac {2 B d}{3}-2 i B c \,{\mathrm e}^{i \left (f x +e \right )}-2 i B d \,{\mathrm e}^{i \left (f x +e \right )}-2 B c \,{\mathrm e}^{2 i \left (f x +e \right )}}{\left ({\mathrm e}^{i \left (f x +e \right )}+i\right )^{3} \left (c -d \right )^{2} f \,a^{2}}-\frac {d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-c^{2}+d^{2}}\, c -c^{2}+d^{2}}{\sqrt {-c^{2}+d^{2}}\, d}\right ) A}{\sqrt {-c^{2}+d^{2}}\, \left (c -d \right )^{2} f \,a^{2}}+\frac {d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-c^{2}+d^{2}}\, c -c^{2}+d^{2}}{\sqrt {-c^{2}+d^{2}}\, d}\right ) B c}{\sqrt {-c^{2}+d^{2}}\, \left (c -d \right )^{2} f \,a^{2}}+\frac {d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-c^{2}+d^{2}}\, c +c^{2}-d^{2}}{\sqrt {-c^{2}+d^{2}}\, d}\right ) A}{\sqrt {-c^{2}+d^{2}}\, \left (c -d \right )^{2} f \,a^{2}}-\frac {d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-c^{2}+d^{2}}\, c +c^{2}-d^{2}}{\sqrt {-c^{2}+d^{2}}\, d}\right ) B c}{\sqrt {-c^{2}+d^{2}}\, \left (c -d \right )^{2} f \,a^{2}}\) | \(444\) |
Input:
int((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^2/(c+d*sin(f*x+e)),x,method=_RETURNV ERBOSE)
Output:
2/f/a^2*(-1/2*(-2*A+2*B)/(c-d)/(tan(1/2*f*x+1/2*e)+1)^2-1/3*(2*A-2*B)/(c-d )/(tan(1/2*f*x+1/2*e)+1)^3-(A*c-2*A*d+B*d)/(c-d)^2/(tan(1/2*f*x+1/2*e)+1)+ d*(A*d-B*c)/(c-d)^2/(c^2-d^2)^(1/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d )/(c^2-d^2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 599 vs. \(2 (143) = 286\).
Time = 0.11 (sec) , antiderivative size = 1285, normalized size of antiderivative = 8.45 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c+d \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+d*sin(f*x+e)),x, algorith m="fricas")
Output:
[1/6*(2*(A - B)*c^3 - 2*(A - B)*c^2*d - 2*(A - B)*c*d^2 + 2*(A - B)*d^3 + 2*((A + 2*B)*c^3 - (4*A - B)*c^2*d - (A + 2*B)*c*d^2 + (4*A - B)*d^3)*cos( f*x + e)^2 - 3*(2*B*c*d - 2*A*d^2 - (B*c*d - A*d^2)*cos(f*x + e)^2 + (B*c* d - A*d^2)*cos(f*x + e) + (2*B*c*d - 2*A*d^2 + (B*c*d - A*d^2)*cos(f*x + e ))*sin(f*x + e))*sqrt(-c^2 + d^2)*log(((2*c^2 - d^2)*cos(f*x + e)^2 - 2*c* d*sin(f*x + e) - c^2 - d^2 + 2*(c*cos(f*x + e)*sin(f*x + e) + d*cos(f*x + e))*sqrt(-c^2 + d^2))/(d^2*cos(f*x + e)^2 - 2*c*d*sin(f*x + e) - c^2 - d^2 )) + 2*((2*A + B)*c^3 - (5*A - 2*B)*c^2*d - (2*A + B)*c*d^2 + (5*A - 2*B)* d^3)*cos(f*x + e) - 2*((A - B)*c^3 - (A - B)*c^2*d - (A - B)*c*d^2 + (A - B)*d^3 - ((A + 2*B)*c^3 - (4*A - B)*c^2*d - (A + 2*B)*c*d^2 + (4*A - B)*d^ 3)*cos(f*x + e))*sin(f*x + e))/((a^2*c^4 - 2*a^2*c^3*d + 2*a^2*c*d^3 - a^2 *d^4)*f*cos(f*x + e)^2 - (a^2*c^4 - 2*a^2*c^3*d + 2*a^2*c*d^3 - a^2*d^4)*f *cos(f*x + e) - 2*(a^2*c^4 - 2*a^2*c^3*d + 2*a^2*c*d^3 - a^2*d^4)*f - ((a^ 2*c^4 - 2*a^2*c^3*d + 2*a^2*c*d^3 - a^2*d^4)*f*cos(f*x + e) + 2*(a^2*c^4 - 2*a^2*c^3*d + 2*a^2*c*d^3 - a^2*d^4)*f)*sin(f*x + e)), 1/3*((A - B)*c^3 - (A - B)*c^2*d - (A - B)*c*d^2 + (A - B)*d^3 + ((A + 2*B)*c^3 - (4*A - B)* c^2*d - (A + 2*B)*c*d^2 + (4*A - B)*d^3)*cos(f*x + e)^2 - 3*(2*B*c*d - 2*A *d^2 - (B*c*d - A*d^2)*cos(f*x + e)^2 + (B*c*d - A*d^2)*cos(f*x + e) + (2* B*c*d - 2*A*d^2 + (B*c*d - A*d^2)*cos(f*x + e))*sin(f*x + e))*sqrt(c^2 - d ^2)*arctan(-(c*sin(f*x + e) + d)/(sqrt(c^2 - d^2)*cos(f*x + e))) + ((2*...
Timed out. \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))} \, dx=\text {Timed out} \] Input:
integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))**2/(c+d*sin(f*x+e)),x)
Output:
Timed out
Exception generated. \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^2/(c+d*sin(f*x+e)),x, algorith m="maxima")
Output:
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*d^2-4*c^2>0)', see `assume?` f or more de
Time = 0.27 (sec) , antiderivative size = 249, normalized size of antiderivative = 1.64 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))} \, dx=-\frac {2 \, {\left (\frac {3 \, {\left (B c d - A d^{2}\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (c\right ) + \arctan \left (\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + d}{\sqrt {c^{2} - d^{2}}}\right )\right )}}{{\left (a^{2} c^{2} - 2 \, a^{2} c d + a^{2} d^{2}\right )} \sqrt {c^{2} - d^{2}}} + \frac {3 \, A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 6 \, A d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, B d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, A c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 3 \, B c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 9 \, A d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 3 \, B d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, A c + B c - 5 \, A d + 2 \, B d}{{\left (a^{2} c^{2} - 2 \, a^{2} c d + a^{2} d^{2}\right )} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}}\right )}}{3 \, f} \] Input:
integrate((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^2/(c+d*sin(f*x+e)),x, algorith m="giac")
Output:
-2/3*(3*(B*c*d - A*d^2)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(c) + arctan( (c*tan(1/2*f*x + 1/2*e) + d)/sqrt(c^2 - d^2)))/((a^2*c^2 - 2*a^2*c*d + a^2 *d^2)*sqrt(c^2 - d^2)) + (3*A*c*tan(1/2*f*x + 1/2*e)^2 - 6*A*d*tan(1/2*f*x + 1/2*e)^2 + 3*B*d*tan(1/2*f*x + 1/2*e)^2 + 3*A*c*tan(1/2*f*x + 1/2*e) + 3*B*c*tan(1/2*f*x + 1/2*e) - 9*A*d*tan(1/2*f*x + 1/2*e) + 3*B*d*tan(1/2*f* x + 1/2*e) + 2*A*c + B*c - 5*A*d + 2*B*d)/((a^2*c^2 - 2*a^2*c*d + a^2*d^2) *(tan(1/2*f*x + 1/2*e) + 1)^3))/f
Time = 37.97 (sec) , antiderivative size = 302, normalized size of antiderivative = 1.99 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))} \, dx=\frac {2\,d\,\mathrm {atan}\left (\frac {\frac {d\,\left (A\,d-B\,c\right )\,\left (2\,a^2\,c^2\,d-4\,a^2\,c\,d^2+2\,a^2\,d^3\right )}{a^2\,\sqrt {c+d}\,{\left (c-d\right )}^{5/2}}+\frac {2\,c\,d\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (A\,d-B\,c\right )\,\left (a^2\,c^2-2\,a^2\,c\,d+a^2\,d^2\right )}{a^2\,\sqrt {c+d}\,{\left (c-d\right )}^{5/2}}}{2\,A\,d^2-2\,B\,c\,d}\right )\,\left (A\,d-B\,c\right )}{a^2\,f\,\sqrt {c+d}\,{\left (c-d\right )}^{5/2}}-\frac {\frac {2\,\left (2\,A\,c-5\,A\,d+B\,c+2\,B\,d\right )}{3\,{\left (c-d\right )}^2}+\frac {2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (A\,c-3\,A\,d+B\,c+B\,d\right )}{{\left (c-d\right )}^2}+\frac {2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (A\,c-2\,A\,d+B\,d\right )}{{\left (c-d\right )}^2}}{f\,\left (a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+3\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2+3\,a^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+a^2\right )} \] Input:
int((A + B*sin(e + f*x))/((a + a*sin(e + f*x))^2*(c + d*sin(e + f*x))),x)
Output:
(2*d*atan(((d*(A*d - B*c)*(2*a^2*d^3 - 4*a^2*c*d^2 + 2*a^2*c^2*d))/(a^2*(c + d)^(1/2)*(c - d)^(5/2)) + (2*c*d*tan(e/2 + (f*x)/2)*(A*d - B*c)*(a^2*c^ 2 + a^2*d^2 - 2*a^2*c*d))/(a^2*(c + d)^(1/2)*(c - d)^(5/2)))/(2*A*d^2 - 2* B*c*d))*(A*d - B*c))/(a^2*f*(c + d)^(1/2)*(c - d)^(5/2)) - ((2*(2*A*c - 5* A*d + B*c + 2*B*d))/(3*(c - d)^2) + (2*tan(e/2 + (f*x)/2)*(A*c - 3*A*d + B *c + B*d))/(c - d)^2 + (2*tan(e/2 + (f*x)/2)^2*(A*c - 2*A*d + B*d))/(c - d )^2)/(f*(3*a^2*tan(e/2 + (f*x)/2)^2 + a^2*tan(e/2 + (f*x)/2)^3 + a^2 + 3*a ^2*tan(e/2 + (f*x)/2)))
Time = 0.20 (sec) , antiderivative size = 837, normalized size of antiderivative = 5.51 \[ \int \frac {A+B \sin (e+f x)}{(a+a \sin (e+f x))^2 (c+d \sin (e+f x))} \, dx =\text {Too large to display} \] Input:
int((A+B*sin(f*x+e))/(a+a*sin(f*x+e))^2/(c+d*sin(f*x+e)),x)
Output:
(2*(3*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*t an((e + f*x)/2)**3*a*d**2 - 3*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)**3*b*c*d + 9*sqrt(c**2 - d**2)*ata n((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)**2*a*d**2 - 9*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan( (e + f*x)/2)**2*b*c*d + 9*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/ sqrt(c**2 - d**2))*tan((e + f*x)/2)*a*d**2 - 9*sqrt(c**2 - d**2)*atan((tan ((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*tan((e + f*x)/2)*b*c*d + 3*sqrt(c* *2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*a*d**2 - 3*sqr t(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*b*c*d + ta n((e + f*x)/2)**3*a*c**3 - 2*tan((e + f*x)/2)**3*a*c**2*d - tan((e + f*x)/ 2)**3*a*c*d**2 + 2*tan((e + f*x)/2)**3*a*d**3 + tan((e + f*x)/2)**3*b*c**2 *d - tan((e + f*x)/2)**3*b*d**3 + 3*tan((e + f*x)/2)*a*c**2*d - 3*tan((e + f*x)/2)*a*d**3 - 3*tan((e + f*x)/2)*b*c**3 + 3*tan((e + f*x)/2)*b*c*d**2 - a*c**3 + 3*a*c**2*d + a*c*d**2 - 3*a*d**3 - b*c**3 - b*c**2*d + b*c*d**2 + b*d**3))/(3*a**2*f*(tan((e + f*x)/2)**3*c**4 - 2*tan((e + f*x)/2)**3*c* *3*d + 2*tan((e + f*x)/2)**3*c*d**3 - tan((e + f*x)/2)**3*d**4 + 3*tan((e + f*x)/2)**2*c**4 - 6*tan((e + f*x)/2)**2*c**3*d + 6*tan((e + f*x)/2)**2*c *d**3 - 3*tan((e + f*x)/2)**2*d**4 + 3*tan((e + f*x)/2)*c**4 - 6*tan((e + f*x)/2)*c**3*d + 6*tan((e + f*x)/2)*c*d**3 - 3*tan((e + f*x)/2)*d**4 + ...