Integrand size = 33, antiderivative size = 98 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=-\frac {a (B c-(A+B) d) x}{d^2}+\frac {2 a (c-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 )}{d^2 \sqrt {c^2-d^2} f}-\frac {a B \cos (e+f x)}{d f} \] Output:
-a*(B*c-(A+B)*d)*x/d^2+2*a*(c-d)*(-A*d+B*c)*arctan((d+c*tan(1/2*f*x+1/2*e) )/(c^2-d^2)^(1/2))/d^2/(c^2-d^2)^(1/2)/f-a*B*cos(f*x+e)/d/f
Result contains complex when optimal does not.
Time = 1.94 (sec) , antiderivative size = 196, normalized size of antiderivative = 2.00 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\frac {a \left (A d x+B (-c+d) x-\frac {B d \cos (e) \cos (f x)}{f}+\frac {2 (c-d) (B c-A d) \arctan \left (\frac {\sec \left (\frac {f x}{2}\right ) (\cos (e)-i \sin (e)) \left (d \cos \left (e+\frac {f x}{2}\right )+c \sin \left (\frac {f x}{2}\right )\right )}{\sqrt {c^2-d^2} \sqrt {(\cos (e)-i \sin (e))^2}}\right ) (\cos (e)-i \sin (e))}{\sqrt {c^2-d^2} f \sqrt {(\cos (e)-i \sin (e))^2}}+\frac {B d \sin (e) \sin (f x)}{f}\right ) (1+\sin (e+f x))}{d^2 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^2} \] Input:
Integrate[((a + a*Sin[e + f*x])*(A + B*Sin[e + f*x]))/(c + d*Sin[e + f*x]) ,x]
Output:
(a*(A*d*x + B*(-c + d)*x - (B*d*Cos[e]*Cos[f*x])/f + (2*(c - d)*(B*c - A*d )*ArcTan[(Sec[(f*x)/2]*(Cos[e] - I*Sin[e])*(d*Cos[e + (f*x)/2] + c*Sin[(f* x)/2]))/(Sqrt[c^2 - d^2]*Sqrt[(Cos[e] - I*Sin[e])^2])]*(Cos[e] - I*Sin[e]) )/(Sqrt[c^2 - d^2]*f*Sqrt[(Cos[e] - I*Sin[e])^2]) + (B*d*Sin[e]*Sin[f*x])/ f)*(1 + Sin[e + f*x]))/(d^2*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2)
Time = 0.65 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.11, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.303, Rules used = {3042, 3447, 3042, 3502, 3042, 3214, 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 \sin (e+f x)+a) (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (e+f x)+a) (A+B \sin (e+f x))}{c+d \sin (e+f x)}dx\) |
\(\Big \downarrow \) 3447 |
\(\displaystyle \int \frac {(a A+a B) \sin (e+f x)+a A+a B \sin ^2(e+f x)}{c+d \sin (e+f x)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a A+a B) \sin (e+f x)+a A+a B \sin (e+f x)^2}{c+d \sin (e+f x)}dx\) |
\(\Big \downarrow \) 3502 |
\(\displaystyle \frac {\int \frac {a A d-a (B c-(A+B) d) \sin (e+f x)}{c+d \sin (e+f x)}dx}{d}-\frac {a B \cos (e+f x)}{d f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a A d-a (B c-(A+B) d) \sin (e+f x)}{c+d \sin (e+f x)}dx}{d}-\frac {a B \cos (e+f x)}{d f}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {\frac {a (c-d) (B c-A d) \int \frac {1}{c+d \sin (e+f x)}dx}{d}-\frac {a x (B c-d (A+B))}{d}}{d}-\frac {a B \cos (e+f x)}{d f}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {a (c-d) (B c-A d) \int \frac {1}{c+d \sin (e+f x)}dx}{d}-\frac {a x (B c-d (A+B))}{d}}{d}-\frac {a B \cos (e+f x)}{d f}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle \frac {\frac {2 a (c-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 )}{d f}-\frac {a x (B c-d (A+B))}{d}}{d}-\frac {a B \cos (e+f x)}{d f}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle \frac {-\frac {4 a (c-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 )}{d f}-\frac {a x (B c-d (A+B))}{d}}{d}-\frac {a B \cos (e+f x)}{d f}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {\frac {2 a (c-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 )}{d f \sqrt {c^2-d^2}}-\frac {a x (B c-d (A+B))}{d}}{d}-\frac {a B \cos (e+f x)}{d f}\) |
Input:
Int[((a + a*Sin[e + f*x])*(A + B*Sin[e + f*x]))/(c + d*Sin[e + f*x]),x]
Output:
(-((a*(B*c - (A + B)*d)*x)/d) + (2*a*(c - d)*(B*c - A*d)*ArcTan[(2*d + 2*c *Tan[(e + f*x)/2])/(2*Sqrt[c^2 - d^2])])/(d*Sqrt[c^2 - d^2]*f))/d - (a*B*C os[e + f*x])/(d*f)
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_)])/((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[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Int[(a + b*Sin[e + f*x])^m*(A*c + (B*c + A*d)*Sin[e + f*x] + B*d*Sin[e + f*x]^2), x] /; FreeQ[{a, b, c, d, e, f, A, B, m}, x] && NeQ[b*c - a*d, 0]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)] + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-C)*Co s[e + f*x]*((a + b*Sin[e + f*x])^(m + 1)/(b*f*(m + 2))), x] + Simp[1/(b*(m + 2)) Int[(a + b*Sin[e + f*x])^m*Simp[A*b*(m + 2) + b*C*(m + 1) + (b*B*(m + 2) - a*C)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B, C, m}, x] && !LtQ[m, -1]
Time = 0.46 (sec) , antiderivative size = 120, normalized size of antiderivative = 1.22
method | result | size |
derivativedivides | \(\frac {2 a \left (\frac {-\frac {B d}{1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}+\left (A d -B c +B d \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{d^{2}}+\frac {\left (-A c d +A \,d^{2}+B \,c^{2}-B c d \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 )}{d^{2} \sqrt {c^{2}-d^{2}}}\right )}{f}\) | \(120\) |
default | \(\frac {2 a \left (\frac {-\frac {B d}{1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}+\left (A d -B c +B d \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{d^{2}}+\frac {\left (-A c d +A \,d^{2}+B \,c^{2}-B c d \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 )}{d^{2} \sqrt {c^{2}-d^{2}}}\right )}{f}\) | \(120\) |
risch | \(\frac {a x A}{d}-\frac {a x B c}{d^{2}}+\frac {a x B}{d}-\frac {B a \,{\mathrm e}^{i \left (f x +e \right )}}{2 d f}-\frac {B a \,{\mathrm e}^{-i \left (f x +e \right )}}{2 d f}+\frac {\sqrt {-\left (c +d \right ) \left (c -d \right )}\, a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c -\sqrt {-\left (c +d \right ) \left (c -d \right )}}{d}\right ) A}{\left (c +d \right ) f d}-\frac {\sqrt {-\left (c +d \right ) \left (c -d \right )}\, a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c -\sqrt {-\left (c +d \right ) \left (c -d \right )}}{d}\right ) B c}{\left (c +d \right ) f \,d^{2}}-\frac {\sqrt {-\left (c +d \right ) \left (c -d \right )}\, a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c +\sqrt {-\left (c +d \right ) \left (c -d \right )}}{d}\right ) A}{\left (c +d \right ) f d}+\frac {\sqrt {-\left (c +d \right ) \left (c -d \right )}\, a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c +\sqrt {-\left (c +d \right ) \left (c -d \right )}}{d}\right ) B c}{\left (c +d \right ) f \,d^{2}}\) | \(303\) |
Input:
int((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c+d*sin(f*x+e)),x,method=_RETURNVER BOSE)
Output:
2/f*a*(1/d^2*(-B*d/(1+tan(1/2*f*x+1/2*e)^2)+(A*d-B*c+B*d)*arctan(tan(1/2*f *x+1/2*e)))+(-A*c*d+A*d^2+B*c^2-B*c*d)/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)))
Time = 0.10 (sec) , antiderivative size = 290, normalized size of antiderivative = 2.96 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\left [-\frac {2 \, B a d \cos \left (f x + e\right ) + 2 \, {\left (B a c - {\left (A + B\right )} a d\right )} f x + {\left (B a c - A a d\right )} \sqrt {-\frac {c - d}{c + d}} \log \left (\frac {{\left (2 \, c^{2} - d^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, c d \sin \left (f x + e\right ) - c^{2} - d^{2} + 2 \, {\left ({\left (c^{2} + c d\right )} \cos \left (f x + e\right ) \sin \left (f x + e\right ) + {\left (c d + d^{2}\right )} \cos \left (f x + e\right )\right )} \sqrt {-\frac {c - d}{c + d}}}{d^{2} \cos \left (f x + e\right )^{2} - 2 \, c d \sin \left (f x + e\right ) - c^{2} - d^{2}}\right )}{2 \, d^{2} f}, -\frac {B a d \cos \left (f x + e\right ) + {\left (B a c - {\left (A + B\right )} a d\right )} f x + {\left (B a c - A a d\right )} \sqrt {\frac {c - d}{c + d}} \arctan \left (-\frac {{\left (c \sin \left (f x + e\right ) + d\right )} \sqrt {\frac {c - d}{c + d}}}{{\left (c - d\right )} \cos \left (f x + e\right )}\right )}{d^{2} f}\right ] \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c+d*sin(f*x+e)),x, algorithm= "fricas")
Output:
[-1/2*(2*B*a*d*cos(f*x + e) + 2*(B*a*c - (A + B)*a*d)*f*x + (B*a*c - A*a*d )*sqrt(-(c - d)/(c + d))*log(((2*c^2 - d^2)*cos(f*x + e)^2 - 2*c*d*sin(f*x + e) - c^2 - d^2 + 2*((c^2 + c*d)*cos(f*x + e)*sin(f*x + e) + (c*d + d^2) *cos(f*x + e))*sqrt(-(c - d)/(c + d)))/(d^2*cos(f*x + e)^2 - 2*c*d*sin(f*x + e) - c^2 - d^2)))/(d^2*f), -(B*a*d*cos(f*x + e) + (B*a*c - (A + B)*a*d) *f*x + (B*a*c - A*a*d)*sqrt((c - d)/(c + d))*arctan(-(c*sin(f*x + e) + d)* sqrt((c - d)/(c + d))/((c - d)*cos(f*x + e))))/(d^2*f)]
Leaf count of result is larger than twice the leaf count of optimal. 5508 vs. \(2 (82) = 164\).
Time = 125.83 (sec) , antiderivative size = 5508, normalized size of antiderivative = 56.20 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\text {Too large to display} \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c+d*sin(f*x+e)),x)
Output:
Piecewise((zoo*x*(A + B*sin(e))*(a*sin(e) + a)/sin(e), Eq(c, 0) & Eq(d, 0) & Eq(f, 0)), ((A*a*f*x*tan(e/2 + f*x/2)**2/(f*tan(e/2 + f*x/2)**2 + f) + A*a*f*x/(f*tan(e/2 + f*x/2)**2 + f) + A*a*log(tan(e/2 + f*x/2))*tan(e/2 + f*x/2)**2/(f*tan(e/2 + f*x/2)**2 + f) + A*a*log(tan(e/2 + f*x/2))/(f*tan(e /2 + f*x/2)**2 + f) + B*a*f*x*tan(e/2 + f*x/2)**2/(f*tan(e/2 + f*x/2)**2 + f) + B*a*f*x/(f*tan(e/2 + f*x/2)**2 + f) - 2*B*a/(f*tan(e/2 + f*x/2)**2 + f))/d, Eq(c, 0)), (A*a*d**2*f*x*tan(e/2 + f*x/2)**3/(d**3*f*tan(e/2 + f*x /2)**3 + d**3*f*tan(e/2 + f*x/2) - f*(d**2)**(3/2)*tan(e/2 + f*x/2)**2 - f *(d**2)**(3/2)) + A*a*d**2*f*x*tan(e/2 + f*x/2)/(d**3*f*tan(e/2 + f*x/2)** 3 + d**3*f*tan(e/2 + f*x/2) - f*(d**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(d** 2)**(3/2)) + 2*A*a*d**2*tan(e/2 + f*x/2)**2/(d**3*f*tan(e/2 + f*x/2)**3 + d**3*f*tan(e/2 + f*x/2) - f*(d**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(d**2)** (3/2)) + 2*A*a*d**2/(d**3*f*tan(e/2 + f*x/2)**3 + d**3*f*tan(e/2 + f*x/2) - f*(d**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(d**2)**(3/2)) - A*a*d*f*x*sqrt( d**2)*tan(e/2 + f*x/2)**2/(d**3*f*tan(e/2 + f*x/2)**3 + d**3*f*tan(e/2 + f *x/2) - f*(d**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(d**2)**(3/2)) - A*a*d*f*x *sqrt(d**2)/(d**3*f*tan(e/2 + f*x/2)**3 + d**3*f*tan(e/2 + f*x/2) - f*(d** 2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(d**2)**(3/2)) + 2*A*a*d*sqrt(d**2)*tan( e/2 + f*x/2)**2/(d**3*f*tan(e/2 + f*x/2)**3 + d**3*f*tan(e/2 + f*x/2) - f* (d**2)**(3/2)*tan(e/2 + f*x/2)**2 - f*(d**2)**(3/2)) + 2*A*a*d*sqrt(d**...
Exception generated. \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c+d*sin(f*x+e)),x, algorithm= "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.24 (sec) , antiderivative size = 137, normalized size of antiderivative = 1.40 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=-\frac {\frac {{\left (B a c - A a d - B a d\right )} {\left (f x + e\right )}}{d^{2}} + \frac {2 \, B a}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )} d} - \frac {2 \, {\left (B a c^{2} - A a c d - B a c d + A 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 )}}{\sqrt {c^{2} - d^{2}} d^{2}}}{f} \] Input:
integrate((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c+d*sin(f*x+e)),x, algorithm= "giac")
Output:
-((B*a*c - A*a*d - B*a*d)*(f*x + e)/d^2 + 2*B*a/((tan(1/2*f*x + 1/2*e)^2 + 1)*d) - 2*(B*a*c^2 - A*a*c*d - B*a*c*d + A*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)))/ (sqrt(c^2 - d^2)*d^2))/f
Time = 38.14 (sec) , antiderivative size = 3074, normalized size of antiderivative = 31.37 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\text {Too large to display} \] Input:
int(((A + B*sin(e + f*x))*(a + a*sin(e + f*x)))/(c + d*sin(e + f*x)),x)
Output:
(2*A*a*atan(sin(e/2 + (f*x)/2)/cos(e/2 + (f*x)/2)))/(f*(c + d)) + (2*B*a*a tan(sin(e/2 + (f*x)/2)/cos(e/2 + (f*x)/2)))/(f*(c + d)) - (B*a*cos(e + f*x ))/(f*(c + d)) + (2*A*a*c*atan(sin(e/2 + (f*x)/2)/cos(e/2 + (f*x)/2)))/(d* f*(c + d)) - (A*a*atan((A^2*d^4*sin(e/2 + (f*x)/2)*(d^2 - c^2)^(3/2)*3i + A^2*d^6*sin(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*1i - B^2*c^4*sin(e/2 + (f*x)/ 2)*(d^2 - c^2)^(3/2)*2i - B^2*c^6*sin(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*2i + B^2*d^6*sin(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*2i + A*B*d^6*sin(e/2 + (f*x )/2)*(d^2 - c^2)^(1/2)*4i + A^2*c*d^3*cos(e/2 + (f*x)/2)*(d^2 - c^2)^(3/2) *1i + A^2*c*d^5*cos(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*1i + B^2*c*d^5*cos(e/ 2 + (f*x)/2)*(d^2 - c^2)^(1/2)*1i + B^2*c^3*d*cos(e/2 + (f*x)/2)*(d^2 - c^ 2)^(3/2)*1i + B^2*c^5*d*cos(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*1i + A^2*c*d^ 5*sin(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*4i + A^2*c^2*d^4*cos(e/2 + (f*x)/2) *(d^2 - c^2)^(1/2)*2i + A^2*c^3*d^3*cos(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*1 i - B^2*c^3*d^3*cos(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*2i - A^2*c^2*d^2*sin( e/2 + (f*x)/2)*(d^2 - c^2)^(3/2)*2i + A^2*c^2*d^4*sin(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*3i - A^2*c^3*d^3*sin(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*2i - A^ 2*c^4*d^2*sin(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*2i + B^2*c^2*d^2*sin(e/2 + (f*x)/2)*(d^2 - c^2)^(3/2)*3i - B^2*c^2*d^4*sin(e/2 + (f*x)/2)*(d^2 - c^2) ^(1/2)*6i + B^2*c^4*d^2*sin(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*6i + A*B*c*d^ 5*cos(e/2 + (f*x)/2)*(d^2 - c^2)^(1/2)*2i - A*B*c*d^3*sin(e/2 + (f*x)/2...
Time = 0.17 (sec) , antiderivative size = 147, normalized size of antiderivative = 1.50 \[ \int \frac {(a+a \sin (e+f x)) (A+B \sin (e+f x))}{c+d \sin (e+f x)} \, dx=\frac {a \left (-2 \sqrt {c^{2}-d^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c +d}{\sqrt {c^{2}-d^{2}}}\right ) a d +2 \sqrt {c^{2}-d^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c +d}{\sqrt {c^{2}-d^{2}}}\right ) b c -\cos \left (f x +e \right ) b c d -\cos \left (f x +e \right ) b \,d^{2}+a c d f x +a \,d^{2} f x -b \,c^{2} f x +b \,d^{2} f x \right )}{d^{2} f \left (c +d \right )} \] Input:
int((a+a*sin(f*x+e))*(A+B*sin(f*x+e))/(c+d*sin(f*x+e)),x)
Output:
(a*( - 2*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2) )*a*d + 2*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2 ))*b*c - cos(e + f*x)*b*c*d - cos(e + f*x)*b*d**2 + a*c*d*f*x + a*d**2*f*x - b*c**2*f*x + b*d**2*f*x))/(d**2*f*(c + d))