Integrand size = 26, antiderivative size = 57 \[ \int \frac {(a+a \sin (e+f x))^2}{c-c \sin (e+f x)} \, dx=-\frac {3 a^2 x}{c}+\frac {3 a^2 \cos (e+f x)}{c f}+\frac {2 a^2 c \cos ^3(e+f x)}{f (c-c \sin (e+f x))^2} \] Output:
-3*a^2*x/c+3*a^2*cos(f*x+e)/c/f+2*a^2*c*cos(f*x+e)^3/f/(c-c*sin(f*x+e))^2
Time = 0.36 (sec) , antiderivative size = 71, normalized size of antiderivative = 1.25 \[ \int \frac {(a+a \sin (e+f x))^2}{c-c \sin (e+f x)} \, dx=\frac {a^2 \cos (e+f x) \left (\frac {6 \arcsin \left (\frac {\sqrt {1-\sin (e+f x)}}{\sqrt {2}}\right )}{\sqrt {\cos ^2(e+f x)}}+\frac {-5+\sin (e+f x)}{-1+\sin (e+f x)}\right )}{c f} \] Input:
Integrate[(a + a*Sin[e + f*x])^2/(c - c*Sin[e + f*x]),x]
Output:
(a^2*Cos[e + f*x]*((6*ArcSin[Sqrt[1 - Sin[e + f*x]]/Sqrt[2]])/Sqrt[Cos[e + f*x]^2] + (-5 + Sin[e + f*x])/(-1 + Sin[e + f*x])))/(c*f)
Time = 0.44 (sec) , antiderivative size = 62, normalized size of antiderivative = 1.09, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.269, Rules used = {3042, 3215, 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 {(a \sin (e+f x)+a)^2}{c-c \sin (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(a \sin (e+f x)+a)^2}{c-c \sin (e+f x)}dx\) |
\(\Big \downarrow \) 3215 |
\(\displaystyle a^2 c^2 \int \frac {\cos ^4(e+f x)}{(c-c \sin (e+f x))^3}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \int \frac {\cos (e+f x)^4}{(c-c \sin (e+f x))^3}dx\) |
\(\Big \downarrow \) 3159 |
\(\displaystyle a^2 c^2 \left (\frac {2 \cos ^3(e+f x)}{c f (c-c \sin (e+f x))^2}-\frac {3 \int \frac {\cos ^2(e+f x)}{c-c \sin (e+f x)}dx}{c^2}\right )\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle a^2 c^2 \left (\frac {2 \cos ^3(e+f x)}{c f (c-c \sin (e+f x))^2}-\frac {3 \int \frac {\cos (e+f x)^2}{c-c \sin (e+f x)}dx}{c^2}\right )\) |
\(\Big \downarrow \) 3161 |
\(\displaystyle a^2 c^2 \left (\frac {2 \cos ^3(e+f x)}{c f (c-c \sin (e+f x))^2}-\frac {3 \left (\frac {\int 1dx}{c}-\frac {\cos (e+f x)}{c f}\right )}{c^2}\right )\) |
\(\Big \downarrow \) 24 |
\(\displaystyle a^2 c^2 \left (\frac {2 \cos ^3(e+f x)}{c f (c-c \sin (e+f x))^2}-\frac {3 \left (\frac {x}{c}-\frac {\cos (e+f x)}{c f}\right )}{c^2}\right )\) |
Input:
Int[(a + a*Sin[e + f*x])^2/(c - c*Sin[e + f*x]),x]
Output:
a^2*c^2*((-3*(x/c - Cos[e + f*x]/(c*f)))/c^2 + (2*Cos[e + f*x]^3)/(c*f*(c - c*Sin[e + f*x])^2))
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[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_.)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Simp[a^m*c^m Int[Cos[e + f*x]^(2*m)*(c + d*Sin[e + f*x])^(n - m), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && EqQ[ b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IntegerQ[m] && !(IntegerQ[n] && ((Lt Q[m, 0] && GtQ[n, 0]) || LtQ[0, n, m] || LtQ[m, n, 0]))
Time = 0.58 (sec) , antiderivative size = 55, normalized size of antiderivative = 0.96
method | result | size |
derivativedivides | \(\frac {2 a^{2} \left (\frac {1}{1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}-3 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {4}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}\right )}{f c}\) | \(55\) |
default | \(\frac {2 a^{2} \left (\frac {1}{1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}-3 \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )-\frac {4}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1}\right )}{f c}\) | \(55\) |
parallelrisch | \(\frac {a^{2} \left (9+\cos \left (2 f x +2 e \right )+10 \cos \left (f x +e \right )-6 \cos \left (f x +e \right ) f x +8 \sin \left (f x +e \right )\right )}{2 c f \cos \left (f x +e \right )}\) | \(57\) |
risch | \(-\frac {3 a^{2} x}{c}+\frac {a^{2} {\mathrm e}^{i \left (f x +e \right )}}{2 c f}+\frac {a^{2} {\mathrm e}^{-i \left (f x +e \right )}}{2 c f}+\frac {8 a^{2}}{f c \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}\) | \(76\) |
norman | \(\frac {\frac {3 a^{2} x}{c}-\frac {8 a^{2}}{c f}-\frac {3 a^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{c}+\frac {6 a^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{c}-\frac {6 a^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{c}+\frac {3 a^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{c}-\frac {3 a^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{c}-\frac {2 a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{c f}-\frac {2 a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{c f}-\frac {6 a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{c f}-\frac {14 a^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{c f}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}\) | \(237\) |
Input:
int((a+sin(f*x+e)*a)^2/(c-c*sin(f*x+e)),x,method=_RETURNVERBOSE)
Output:
2/f*a^2/c*(1/(1+tan(1/2*f*x+1/2*e)^2)-3*arctan(tan(1/2*f*x+1/2*e))-4/(tan( 1/2*f*x+1/2*e)-1))
Time = 0.09 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.84 \[ \int \frac {(a+a \sin (e+f x))^2}{c-c \sin (e+f x)} \, dx=-\frac {3 \, a^{2} f x - a^{2} \cos \left (f x + e\right )^{2} - 4 \, a^{2} + {\left (3 \, a^{2} f x - 5 \, a^{2}\right )} \cos \left (f x + e\right ) - {\left (3 \, a^{2} f x - a^{2} \cos \left (f x + e\right ) + 4 \, a^{2}\right )} \sin \left (f x + e\right )}{c f \cos \left (f x + e\right ) - c f \sin \left (f x + e\right ) + c f} \] Input:
integrate((a+a*sin(f*x+e))^2/(c-c*sin(f*x+e)),x, algorithm="fricas")
Output:
-(3*a^2*f*x - a^2*cos(f*x + e)^2 - 4*a^2 + (3*a^2*f*x - 5*a^2)*cos(f*x + e ) - (3*a^2*f*x - a^2*cos(f*x + e) + 4*a^2)*sin(f*x + e))/(c*f*cos(f*x + e) - c*f*sin(f*x + e) + c*f)
Leaf count of result is larger than twice the leaf count of optimal. 454 vs. \(2 (51) = 102\).
Time = 1.04 (sec) , antiderivative size = 454, normalized size of antiderivative = 7.96 \[ \int \frac {(a+a \sin (e+f x))^2}{c-c \sin (e+f x)} \, dx=\begin {cases} - \frac {3 a^{2} f x \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{c f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f} + \frac {3 a^{2} f x \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{c f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f} - \frac {3 a^{2} f x \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{c f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f} + \frac {3 a^{2} f x}{c f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f} - \frac {8 a^{2} \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )}}{c f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f} + \frac {2 a^{2} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{c f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f} - \frac {10 a^{2}}{c f \tan ^{3}{\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f \tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + c f \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} - c f} & \text {for}\: f \neq 0 \\\frac {x \left (a \sin {\left (e \right )} + a\right )^{2}}{- c \sin {\left (e \right )} + c} & \text {otherwise} \end {cases} \] Input:
integrate((a+a*sin(f*x+e))**2/(c-c*sin(f*x+e)),x)
Output:
Piecewise((-3*a**2*f*x*tan(e/2 + f*x/2)**3/(c*f*tan(e/2 + f*x/2)**3 - c*f* tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) + 3*a**2*f*x*tan(e/2 + f *x/2)**2/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) - 3*a**2*f*x*tan(e/2 + f*x/2)/(c*f*tan(e/2 + f*x/2)**3 - c *f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) + 3*a**2*f*x/(c*f*tan (e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) - 8*a**2*tan(e/2 + f*x/2)**2/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2 )**2 + c*f*tan(e/2 + f*x/2) - c*f) + 2*a**2*tan(e/2 + f*x/2)/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x/2) - c*f) - 10*a **2/(c*f*tan(e/2 + f*x/2)**3 - c*f*tan(e/2 + f*x/2)**2 + c*f*tan(e/2 + f*x /2) - c*f), Ne(f, 0)), (x*(a*sin(e) + a)**2/(-c*sin(e) + c), True))
Leaf count of result is larger than twice the leaf count of optimal. 218 vs. \(2 (58) = 116\).
Time = 0.11 (sec) , antiderivative size = 218, normalized size of antiderivative = 3.82 \[ \int \frac {(a+a \sin (e+f x))^2}{c-c \sin (e+f x)} \, dx=-\frac {2 \, {\left (a^{2} {\left (\frac {\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - \frac {\sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - 2}{c - \frac {c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {c \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} - \frac {c \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}} + \frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{c}\right )} + 2 \, a^{2} {\left (\frac {\arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{c} - \frac {1}{c - \frac {c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )} - \frac {a^{2}}{c - \frac {c \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}\right )}}{f} \] Input:
integrate((a+a*sin(f*x+e))^2/(c-c*sin(f*x+e)),x, algorithm="maxima")
Output:
-2*(a^2*((sin(f*x + e)/(cos(f*x + e) + 1) - sin(f*x + e)^2/(cos(f*x + e) + 1)^2 - 2)/(c - c*sin(f*x + e)/(cos(f*x + e) + 1) + c*sin(f*x + e)^2/(cos( f*x + e) + 1)^2 - c*sin(f*x + e)^3/(cos(f*x + e) + 1)^3) + arctan(sin(f*x + e)/(cos(f*x + e) + 1))/c) + 2*a^2*(arctan(sin(f*x + e)/(cos(f*x + e) + 1 ))/c - 1/(c - c*sin(f*x + e)/(cos(f*x + e) + 1))) - a^2/(c - c*sin(f*x + e )/(cos(f*x + e) + 1)))/f
Time = 0.13 (sec) , antiderivative size = 97, normalized size of antiderivative = 1.70 \[ \int \frac {(a+a \sin (e+f x))^2}{c-c \sin (e+f x)} \, dx=-\frac {\frac {3 \, {\left (f x + e\right )} a^{2}}{c} + \frac {2 \, {\left (4 \, a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 5 \, a^{2}\right )}}{{\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{3} - \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1\right )} c}}{f} \] Input:
integrate((a+a*sin(f*x+e))^2/(c-c*sin(f*x+e)),x, algorithm="giac")
Output:
-(3*(f*x + e)*a^2/c + 2*(4*a^2*tan(1/2*f*x + 1/2*e)^2 - a^2*tan(1/2*f*x + 1/2*e) + 5*a^2)/((tan(1/2*f*x + 1/2*e)^3 - tan(1/2*f*x + 1/2*e)^2 + tan(1/ 2*f*x + 1/2*e) - 1)*c))/f
Time = 17.07 (sec) , antiderivative size = 118, normalized size of antiderivative = 2.07 \[ \int \frac {(a+a \sin (e+f x))^2}{c-c \sin (e+f x)} \, dx=\frac {3\,\sqrt {2}\,a^2\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (e+f\,x\right )-\frac {\sqrt {2}\,a^2\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (6\,e+6\,f\,x-16\right )}{2}}{c\,f\,\left (\sqrt {2}\,\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )-\sqrt {2}\,\sin \left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}-\frac {3\,a^2\,x}{c}+\frac {2\,a^2\,{\cos \left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2}{c\,f} \] Input:
int((a + a*sin(e + f*x))^2/(c - c*sin(e + f*x)),x)
Output:
(3*2^(1/2)*a^2*sin(e/2 + (f*x)/2)*(e + f*x) - (2^(1/2)*a^2*sin(e/2 + (f*x) /2)*(6*e + 6*f*x - 16))/2)/(c*f*(2^(1/2)*cos(e/2 + (f*x)/2) - 2^(1/2)*sin( e/2 + (f*x)/2))) - (3*a^2*x)/c + (2*a^2*cos(e/2 + (f*x)/2)^2)/(c*f)
Time = 0.18 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.33 \[ \int \frac {(a+a \sin (e+f x))^2}{c-c \sin (e+f x)} \, dx=\frac {a^{2} \left (\cos \left (f x +e \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\cos \left (f x +e \right )-3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) f x -8 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+3 f x \right )}{c f \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )} \] Input:
int((a+a*sin(f*x+e))^2/(c-c*sin(f*x+e)),x)
Output:
(a**2*(cos(e + f*x)*tan((e + f*x)/2) - cos(e + f*x) - 3*tan((e + f*x)/2)*f *x - 8*tan((e + f*x)/2) + 3*f*x))/(c*f*(tan((e + f*x)/2) - 1))