Integrand size = 36, antiderivative size = 108 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\frac {(A-4 B) c^2 x}{a^2}+\frac {(A-4 B) c^2 \cos (e+f x)}{a^2 f}-\frac {a^2 (A-B) c^2 \cos ^5(e+f x)}{3 f (a+a \sin (e+f x))^4}+\frac {2 (A-4 B) c^2 \cos ^3(e+f x)}{3 f (a+a \sin (e+f x))^2} \] Output:
(A-4*B)*c^2*x/a^2+(A-4*B)*c^2*cos(f*x+e)/a^2/f-1/3*a^2*(A-B)*c^2*cos(f*x+e )^5/f/(a+a*sin(f*x+e))^4+2/3*(A-4*B)*c^2*cos(f*x+e)^3/f/(a+a*sin(f*x+e))^2
Leaf count is larger than twice the leaf count of optimal. \(234\) vs. \(2(108)=216\).
Time = 11.41 (sec) , antiderivative size = 234, normalized size of antiderivative = 2.17 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \left (8 (A-B) \sin \left (\frac {1}{2} (e+f x)\right )-4 (A-B) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )-8 (2 A-5 B) \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+3 (A-4 B) (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3-3 B \cos (e+f x) \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )^3\right ) (c-c \sin (e+f x))^2}{3 a^2 f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )^4 (1+\sin (e+f x))^2} \] Input:
Integrate[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^2)/(a + a*Sin[e + f*x ])^2,x]
Output:
((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(8*(A - B)*Sin[(e + f*x)/2] - 4*(A - B)*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]) - 8*(2*A - 5*B)*Sin[(e + f*x)/2 ]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 + 3*(A - 4*B)*(e + f*x)*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^3 - 3*B*Cos[e + f*x]*(Cos[(e + f*x)/2] + Sin [(e + f*x)/2])^3)*(c - c*Sin[e + f*x])^2)/(3*a^2*f*(Cos[(e + f*x)/2] - Sin [(e + f*x)/2])^4*(1 + Sin[e + f*x])^2)
Time = 0.65 (sec) , antiderivative size = 105, normalized size of antiderivative = 0.97, number of steps used = 9, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.250, Rules used = {3042, 3446, 3042, 3338, 3042, 3159, 3042, 3161, 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 {(c-c \sin (e+f x))^2 (A+B \sin (e+f x))}{(a \sin (e+f x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(c-c \sin (e+f x))^2 (A+B \sin (e+f x))}{(a \sin (e+f x)+a)^2}dx\) |
\(\Big \downarrow \) 3446 |
\(\displaystyle a^2 c^2 \int \frac {\cos ^4(e+f x) (A+B \sin (e+f x))}{(\sin (e+f x) a+a)^4}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \int \frac {\cos (e+f x)^4 (A+B \sin (e+f x))}{(\sin (e+f x) a+a)^4}dx\) |
\(\Big \downarrow \) 3338 |
\(\displaystyle a^2 c^2 \left (-\frac {(A-4 B) \int \frac {\cos ^4(e+f x)}{(\sin (e+f x) a+a)^3}dx}{3 a}-\frac {(A-B) \cos ^5(e+f x)}{3 f (a \sin (e+f x)+a)^4}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \left (-\frac {(A-4 B) \int \frac {\cos (e+f x)^4}{(\sin (e+f x) a+a)^3}dx}{3 a}-\frac {(A-B) \cos ^5(e+f x)}{3 f (a \sin (e+f x)+a)^4}\right )\) |
\(\Big \downarrow \) 3159 |
\(\displaystyle a^2 c^2 \left (-\frac {(A-4 B) \left (-\frac {3 \int \frac {\cos ^2(e+f x)}{\sin (e+f x) a+a}dx}{a^2}-\frac {2 \cos ^3(e+f x)}{a f (a \sin (e+f x)+a)^2}\right )}{3 a}-\frac {(A-B) \cos ^5(e+f x)}{3 f (a \sin (e+f x)+a)^4}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \left (-\frac {(A-4 B) \left (-\frac {3 \int \frac {\cos (e+f x)^2}{\sin (e+f x) a+a}dx}{a^2}-\frac {2 \cos ^3(e+f x)}{a f (a \sin (e+f x)+a)^2}\right )}{3 a}-\frac {(A-B) \cos ^5(e+f x)}{3 f (a \sin (e+f x)+a)^4}\right )\) |
\(\Big \downarrow \) 3161 |
\(\displaystyle a^2 c^2 \left (-\frac {(A-4 B) \left (-\frac {3 \left (\frac {\int 1dx}{a}+\frac {\cos (e+f x)}{a f}\right )}{a^2}-\frac {2 \cos ^3(e+f x)}{a f (a \sin (e+f x)+a)^2}\right )}{3 a}-\frac {(A-B) \cos ^5(e+f x)}{3 f (a \sin (e+f x)+a)^4}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a^2 c^2 \left (-\frac {(A-4 B) \left (-\frac {3 \left (\frac {\cos (e+f x)}{a f}+\frac {x}{a}\right )}{a^2}-\frac {2 \cos ^3(e+f x)}{a f (a \sin (e+f x)+a)^2}\right )}{3 a}-\frac {(A-B) \cos ^5(e+f x)}{3 f (a \sin (e+f x)+a)^4}\right )\) |
Input:
Int[((A + B*Sin[e + f*x])*(c - c*Sin[e + f*x])^2)/(a + a*Sin[e + f*x])^2,x ]
Output:
a^2*c^2*(-1/3*((A - B)*Cos[e + f*x]^5)/(f*(a + a*Sin[e + f*x])^4) - ((A - 4*B)*((-3*(x/a + Cos[e + f*x]/(a*f)))/a^2 - (2*Cos[e + f*x]^3)/(a*f*(a + a *Sin[e + f*x])^2)))/(3*a))
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[2*g*(g*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f *x])^(m + 1)/(b*f*(2*m + p + 1))), x] + Simp[g^2*((p - 1)/(b^2*(2*m + p + 1 ))) Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 2), x], x] /; FreeQ[{a, b, e, f, g}, x] && EqQ[a^2 - b^2, 0] && LeQ[m, -2] && GtQ[p, 1] & & NeQ[2*m + p + 1, 0] && !ILtQ[m + p + 1, 0] && IntegersQ[2*m, 2*p]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)/((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)]), x_Symbol] :> Simp[g*((g*Cos[e + f*x])^(p - 1)/(b*f*(p - 1))), x] + Si mp[g^2/a Int[(g*Cos[e + f*x])^(p - 2), x], x] /; FreeQ[{a, b, e, f, g}, x ] && EqQ[a^2 - b^2, 0] && GtQ[p, 1] && IntegerQ[2*p]
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]))
Time = 0.73 (sec) , antiderivative size = 107, normalized size of antiderivative = 0.99
method | result | size |
derivativedivides | \(\frac {2 c^{2} \left (-\frac {-8 A +8 B}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {8 A -8 B}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}-\frac {4 B}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {B}{1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}+\left (A -4 B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f \,a^{2}}\) | \(107\) |
default | \(\frac {2 c^{2} \left (-\frac {-8 A +8 B}{2 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {8 A -8 B}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}-\frac {4 B}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {B}{1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}+\left (A -4 B \right ) \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )\right )}{f \,a^{2}}\) | \(107\) |
risch | \(\frac {c^{2} x A}{a^{2}}-\frac {4 c^{2} x B}{a^{2}}-\frac {B \,c^{2} {\mathrm e}^{i \left (f x +e \right )}}{2 a^{2} f}-\frac {B \,c^{2} {\mathrm e}^{-i \left (f x +e \right )}}{2 a^{2} f}+\frac {8 i A \,c^{2} {\mathrm e}^{i \left (f x +e \right )}+8 A \,c^{2} {\mathrm e}^{2 i \left (f x +e \right )}-24 i B \,c^{2} {\mathrm e}^{i \left (f x +e \right )}-16 B \,c^{2} {\mathrm e}^{2 i \left (f x +e \right )}-\frac {16 A \,c^{2}}{3}+\frac {40 B \,c^{2}}{3}}{f \,a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )^{3}}\) | \(160\) |
parallelrisch | \(\frac {3 \left (\left (f x A -4 f x B +\frac {4}{3} A -8 B \right ) \cos \left (\frac {f x}{2}+\frac {e}{2}\right )+\frac {\left (\left (-\frac {11}{6}+4 f x \right ) B -f x A +\frac {4 A}{3}\right ) \cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )}{3}+\left (f x A -4 f x B +\frac {4}{3} A -\frac {14}{3} B \right ) \sin \left (\frac {f x}{2}+\frac {e}{2}\right )+\frac {\left (f x A -4 f x B +4 A -\frac {29}{2} B \right ) \sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )}{3}+\frac {B \left (\cos \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )-\sin \left (\frac {5 f x}{2}+\frac {5 e}{2}\right )\right )}{6}\right ) c^{2}}{f \,a^{2} \left (\sin \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )+3 \sin \left (\frac {f x}{2}+\frac {e}{2}\right )+3 \cos \left (\frac {f x}{2}+\frac {e}{2}\right )-\cos \left (\frac {3 f x}{2}+\frac {3 e}{2}\right )\right )}\) | \(189\) |
norman | \(\frac {\frac {c^{2} \left (A -4 B \right ) x}{a}+\frac {\left (8 A \,c^{2}-30 B \,c^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {c^{2} \left (A -4 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{9}}{a}+\frac {8 A \,c^{2}-38 B \,c^{2}}{3 a f}-\frac {8 B \,c^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}}{a f}+\frac {2 \left (4 A \,c^{2}-61 B \,c^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{3 a f}+\frac {2 \left (4 A \,c^{2}-35 B \,c^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{a f}+\frac {2 \left (4 A \,c^{2}-25 B \,c^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{a f}+\frac {2 \left (4 A \,c^{2}-13 B \,c^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{a f}+\frac {2 \left (12 A \,c^{2}-43 B \,c^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{a f}+\frac {2 \left (12 A \,c^{2}-41 B \,c^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{a f}+\frac {3 c^{2} \left (A -4 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a}+\frac {6 c^{2} \left (A -4 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{a}+\frac {10 c^{2} \left (A -4 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{a}+\frac {12 c^{2} \left (A -4 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{a}+\frac {12 c^{2} \left (A -4 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{a}+\frac {10 c^{2} \left (A -4 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{a}+\frac {6 c^{2} \left (A -4 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{a}+\frac {3 c^{2} \left (A -4 B \right ) x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{8}}{a}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{3} a \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\) | \(534\) |
Input:
int((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x,method=_RETUR NVERBOSE)
Output:
2/f*c^2/a^2*(-1/2*(-8*A+8*B)/(tan(1/2*f*x+1/2*e)+1)^2-1/3*(8*A-8*B)/(tan(1 /2*f*x+1/2*e)+1)^3-4*B/(tan(1/2*f*x+1/2*e)+1)-B/(1+tan(1/2*f*x+1/2*e)^2)+( A-4*B)*arctan(tan(1/2*f*x+1/2*e)))
Leaf count of result is larger than twice the leaf count of optimal. 242 vs. \(2 (104) = 208\).
Time = 0.12 (sec) , antiderivative size = 242, normalized size of antiderivative = 2.24 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=-\frac {3 \, B c^{2} \cos \left (f x + e\right )^{3} + 6 \, {\left (A - 4 \, B\right )} c^{2} f x - 4 \, {\left (A - B\right )} c^{2} - {\left (3 \, {\left (A - 4 \, B\right )} c^{2} f x - {\left (8 \, A - 23 \, B\right )} c^{2}\right )} \cos \left (f x + e\right )^{2} + {\left (3 \, {\left (A - 4 \, B\right )} c^{2} f x + 2 \, {\left (2 \, A - 11 \, B\right )} c^{2}\right )} \cos \left (f x + e\right ) + {\left (6 \, {\left (A - 4 \, B\right )} c^{2} f x - 3 \, B c^{2} \cos \left (f x + e\right )^{2} + 4 \, {\left (A - B\right )} c^{2} + {\left (3 \, {\left (A - 4 \, B\right )} c^{2} f x + 2 \, {\left (4 \, A - 13 \, B\right )} c^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )}{3 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f \cos \left (f x + e\right ) - 2 \, a^{2} f - {\left (a^{2} f \cos \left (f x + e\right ) + 2 \, a^{2} f\right )} \sin \left (f x + e\right )\right )}} \] Input:
integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x, algori thm="fricas")
Output:
-1/3*(3*B*c^2*cos(f*x + e)^3 + 6*(A - 4*B)*c^2*f*x - 4*(A - B)*c^2 - (3*(A - 4*B)*c^2*f*x - (8*A - 23*B)*c^2)*cos(f*x + e)^2 + (3*(A - 4*B)*c^2*f*x + 2*(2*A - 11*B)*c^2)*cos(f*x + e) + (6*(A - 4*B)*c^2*f*x - 3*B*c^2*cos(f* x + e)^2 + 4*(A - B)*c^2 + (3*(A - 4*B)*c^2*f*x + 2*(4*A - 13*B)*c^2)*cos( f*x + e))*sin(f*x + e))/(a^2*f*cos(f*x + e)^2 - a^2*f*cos(f*x + e) - 2*a^2 *f - (a^2*f*cos(f*x + e) + 2*a^2*f)*sin(f*x + e))
Leaf count of result is larger than twice the leaf count of optimal. 2474 vs. \(2 (102) = 204\).
Time = 4.22 (sec) , antiderivative size = 2474, normalized size of antiderivative = 22.91 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\text {Too large to display} \] Input:
integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))**2/(a+a*sin(f*x+e))**2,x)
Output:
Piecewise((3*A*c**2*f*x*tan(e/2 + f*x/2)**5/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f *tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 9*A*c**2*f* x*tan(e/2 + f*x/2)**4/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f *x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 12*A*c**2*f*x*tan(e/2 + f*x/2)**3 /(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f* tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f *x/2) + 3*a**2*f) + 12*A*c**2*f*x*tan(e/2 + f*x/2)**2/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 9 *A*c**2*f*x*tan(e/2 + f*x/2)/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan( e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/ 2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 3*A*c**2*f*x/(3*a**2*f*tan (e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/ 2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2 *f) + 24*A*c**2*tan(e/2 + f*x/2)**3/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2 *f*tan(e/2 + f*x/2)**4 + 12*a**2*f*tan(e/2 + f*x/2)**3 + 12*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 8*A*c**2*tan(e/2 + f*x/2)**2/(3*a**2*f*tan(e/2 + f*x/2)**5 + 9*a**2*f*tan(e/2 + f*x/2)**4 ...
Leaf count of result is larger than twice the leaf count of optimal. 833 vs. \(2 (104) = 208\).
Time = 0.13 (sec) , antiderivative size = 833, normalized size of antiderivative = 7.71 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\text {Too large to display} \] Input:
integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x, algori thm="maxima")
Output:
-2/3*(2*B*c^2*((12*sin(f*x + e)/(cos(f*x + e) + 1) + 11*sin(f*x + e)^2/(co s(f*x + e) + 1)^2 + 9*sin(f*x + e)^3/(cos(f*x + e) + 1)^3 + 3*sin(f*x + e) ^4/(cos(f*x + e) + 1)^4 + 5)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 4*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4*a^2*sin(f*x + e)^3/(cos(f* x + e) + 1)^3 + 3*a^2*sin(f*x + e)^4/(cos(f*x + e) + 1)^4 + a^2*sin(f*x + e)^5/(cos(f*x + e) + 1)^5) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2 ) - A*c^2*((9*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin( f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + 3*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/a^2) + 2*B*c^2*((9*sin(f*x + e)/(cos(f*x + e) + 1) + 3*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + 4)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + 3*arctan(sin(f*x + e) /(cos(f*x + e) + 1))/a^2) + A*c^2*(3*sin(f*x + e)/(cos(f*x + e) + 1) + 3*s in(f*x + e)^2/(cos(f*x + e) + 1)^2 + 2)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + e)^ 3/(cos(f*x + e) + 1)^3) - 2*A*c^2*(3*sin(f*x + e)/(cos(f*x + e) + 1) + 1)/ (a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e) + 1) + 3*a^2*sin(f*x + e)^2/(cos(f *x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + B*c^2*(3*sin(f *x + e)/(cos(f*x + e) + 1) + 1)/(a^2 + 3*a^2*sin(f*x + e)/(cos(f*x + e)...
Time = 0.21 (sec) , antiderivative size = 130, normalized size of antiderivative = 1.20 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\frac {\frac {3 \, {\left (A c^{2} - 4 \, B c^{2}\right )} {\left (f x + e\right )}}{a^{2}} - \frac {6 \, B c^{2}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 1\right )} a^{2}} - \frac {8 \, {\left (3 \, B c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 3 \, A c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 9 \, B c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - A c^{2} + 4 \, B c^{2}\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}}}{3 \, f} \] Input:
integrate((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x, algori thm="giac")
Output:
1/3*(3*(A*c^2 - 4*B*c^2)*(f*x + e)/a^2 - 6*B*c^2/((tan(1/2*f*x + 1/2*e)^2 + 1)*a^2) - 8*(3*B*c^2*tan(1/2*f*x + 1/2*e)^2 - 3*A*c^2*tan(1/2*f*x + 1/2* e) + 9*B*c^2*tan(1/2*f*x + 1/2*e) - A*c^2 + 4*B*c^2)/(a^2*(tan(1/2*f*x + 1 /2*e) + 1)^3))/f
Time = 38.57 (sec) , antiderivative size = 242, normalized size of antiderivative = 2.24 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\frac {\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (8\,A\,c^2-30\,B\,c^2\right )+\frac {8\,A\,c^2}{3}-\frac {38\,B\,c^2}{3}+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3\,\left (8\,A\,c^2-26\,B\,c^2\right )+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (\frac {8\,A\,c^2}{3}-\frac {74\,B\,c^2}{3}\right )-8\,B\,c^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4}{f\,\left (a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^5+3\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^4+4\,a^2\,{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^3+4\,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 )}+\frac {2\,c^2\,\mathrm {atan}\left (\frac {2\,c^2\,\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (A-4\,B\right )}{2\,A\,c^2-8\,B\,c^2}\right )\,\left (A-4\,B\right )}{a^2\,f} \] Input:
int(((A + B*sin(e + f*x))*(c - c*sin(e + f*x))^2)/(a + a*sin(e + f*x))^2,x )
Output:
(tan(e/2 + (f*x)/2)*(8*A*c^2 - 30*B*c^2) + (8*A*c^2)/3 - (38*B*c^2)/3 + ta n(e/2 + (f*x)/2)^3*(8*A*c^2 - 26*B*c^2) + tan(e/2 + (f*x)/2)^2*((8*A*c^2)/ 3 - (74*B*c^2)/3) - 8*B*c^2*tan(e/2 + (f*x)/2)^4)/(f*(4*a^2*tan(e/2 + (f*x )/2)^2 + 4*a^2*tan(e/2 + (f*x)/2)^3 + 3*a^2*tan(e/2 + (f*x)/2)^4 + a^2*tan (e/2 + (f*x)/2)^5 + a^2 + 3*a^2*tan(e/2 + (f*x)/2))) + (2*c^2*atan((2*c^2* tan(e/2 + (f*x)/2)*(A - 4*B))/(2*A*c^2 - 8*B*c^2))*(A - 4*B))/(a^2*f)
Time = 0.17 (sec) , antiderivative size = 277, normalized size of antiderivative = 2.56 \[ \int \frac {(A+B \sin (e+f x)) (c-c \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\frac {c^{2} \left (3 \cos \left (f x +e \right ) \sin \left (f x +e \right )^{2} b +3 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a f x -4 \cos \left (f x +e \right ) \sin \left (f x +e \right ) a -12 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b f x +15 \cos \left (f x +e \right ) \sin \left (f x +e \right ) b +3 \cos \left (f x +e \right ) a f x -12 \cos \left (f x +e \right ) b f x +8 \cos \left (f x +e \right ) b +3 \sin \left (f x +e \right )^{3} b -3 \sin \left (f x +e \right )^{2} a f x -12 \sin \left (f x +e \right )^{2} a +12 \sin \left (f x +e \right )^{2} b f x +34 \sin \left (f x +e \right )^{2} b -6 \sin \left (f x +e \right ) a f x -4 a \sin \left (f x +e \right )+24 \sin \left (f x +e \right ) b f x +15 \sin \left (f x +e \right ) b -3 a f x +12 b f x -8 b \right )}{3 a^{2} f \left (\cos \left (f x +e \right ) \sin \left (f x +e \right )+\cos \left (f x +e \right )-\sin \left (f x +e \right )^{2}-2 \sin \left (f x +e \right )-1\right )} \] Input:
int((A+B*sin(f*x+e))*(c-c*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x)
Output:
(c**2*(3*cos(e + f*x)*sin(e + f*x)**2*b + 3*cos(e + f*x)*sin(e + f*x)*a*f* x - 4*cos(e + f*x)*sin(e + f*x)*a - 12*cos(e + f*x)*sin(e + f*x)*b*f*x + 1 5*cos(e + f*x)*sin(e + f*x)*b + 3*cos(e + f*x)*a*f*x - 12*cos(e + f*x)*b*f *x + 8*cos(e + f*x)*b + 3*sin(e + f*x)**3*b - 3*sin(e + f*x)**2*a*f*x - 12 *sin(e + f*x)**2*a + 12*sin(e + f*x)**2*b*f*x + 34*sin(e + f*x)**2*b - 6*s in(e + f*x)*a*f*x - 4*sin(e + f*x)*a + 24*sin(e + f*x)*b*f*x + 15*sin(e + f*x)*b - 3*a*f*x + 12*b*f*x - 8*b))/(3*a**2*f*(cos(e + f*x)*sin(e + f*x) + cos(e + f*x) - sin(e + f*x)**2 - 2*sin(e + f*x) - 1))