Integrand size = 25, antiderivative size = 85 \[ \int \frac {(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\frac {d^2 x}{a^2}-\frac {(c-d) (c+4 d) \cos (e+f x)}{3 a^2 f (1+\sin (e+f x))}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{3 f (a+a \sin (e+f x))^2} \] Output:
d^2*x/a^2-1/3*(c-d)*(c+4*d)*cos(f*x+e)/a^2/f/(1+sin(f*x+e))-1/3*(c-d)*cos( f*x+e)*(c+d*sin(f*x+e))/f/(a+a*sin(f*x+e))^2
Leaf count is larger than twice the leaf count of optimal. \(172\) vs. \(2(85)=170\).
Time = 0.35 (sec) , antiderivative size = 172, normalized size of antiderivative = 2.02 \[ \int \frac {(c+d \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 (2 (c-d)^2 \sin \left (\frac {1}{2} (e+f x)\right )-(c-d)^2 \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )+2 \left (c^2+4 c d-5 d^2\right ) \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 d^2 (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 )}{3 a^2 f (1+\sin (e+f x))^2} \] Input:
Integrate[(c + d*Sin[e + f*x])^2/(a + a*Sin[e + f*x])^2,x]
Output:
((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(2*(c - d)^2*Sin[(e + f*x)/2] - (c - d)^2*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2]) + 2*(c^2 + 4*c*d - 5*d^2)*Sin [(e + f*x)/2]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 + 3*d^2*(e + f*x)*(C os[(e + f*x)/2] + Sin[(e + f*x)/2])^3))/(3*a^2*f*(1 + Sin[e + f*x])^2)
Time = 0.46 (sec) , antiderivative size = 89, normalized size of antiderivative = 1.05, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.280, Rules used = {3042, 3239, 25, 3042, 3214, 3042, 3127}
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+d \sin (e+f x))^2}{(a \sin (e+f x)+a)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {(c+d \sin (e+f x))^2}{(a \sin (e+f x)+a)^2}dx\) |
\(\Big \downarrow \) 3239 |
\(\displaystyle -\frac {\int -\frac {3 a \sin (e+f x) d^2+a \left (c^2+3 d c-d^2\right )}{\sin (e+f x) a+a}dx}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{3 f (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {3 a \sin (e+f x) d^2+a \left (c^2+3 d c-d^2\right )}{\sin (e+f x) a+a}dx}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{3 f (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {3 a \sin (e+f x) d^2+a \left (c^2+3 d c-d^2\right )}{\sin (e+f x) a+a}dx}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{3 f (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle \frac {a (c-d) (c+4 d) \int \frac {1}{\sin (e+f x) a+a}dx+3 d^2 x}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{3 f (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a (c-d) (c+4 d) \int \frac {1}{\sin (e+f x) a+a}dx+3 d^2 x}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{3 f (a \sin (e+f x)+a)^2}\) |
\(\Big \downarrow \) 3127 |
\(\displaystyle \frac {3 d^2 x-\frac {a (c-d) (c+4 d) \cos (e+f x)}{f (a \sin (e+f x)+a)}}{3 a^2}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{3 f (a \sin (e+f x)+a)^2}\) |
Input:
Int[(c + d*Sin[e + f*x])^2/(a + a*Sin[e + f*x])^2,x]
Output:
-1/3*((c - d)*Cos[e + f*x]*(c + d*Sin[e + f*x]))/(f*(a + a*Sin[e + f*x])^2 ) + (3*d^2*x - (a*(c - d)*(c + 4*d)*Cos[e + f*x])/(f*(a + a*Sin[e + f*x])) )/(3*a^2)
Int[((a_) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> Simp[-Cos[c + d*x]/(d*(b + a*Sin[c + d*x])), x] /; FreeQ[{a, b, c, d}, x] && EqQ[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_)*((c_) + (d_.)*sin[(e_.) + ( f_.)*(x_)])^2, x_Symbol] :> Simp[(b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f* x])^m*((c + d*Sin[e + f*x])/(a*f*(2*m + 1))), x] + Simp[1/(a*b*(2*m + 1)) Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[a*c*d*(m - 1) + b*(d^2 + c^2*(m + 1) ) + d*(a*d*(m - 1) + b*c*(m + 2))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && LtQ[m, -1]
Time = 0.62 (sec) , antiderivative size = 108, normalized size of antiderivative = 1.27
method | result | size |
derivativedivides | \(\frac {-\frac {2 \left (c^{2}-d^{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {-2 c^{2}+4 c d -2 d^{2}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (2 c^{2}-4 c d +2 d^{2}\right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+2 d^{2} \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a^{2} f}\) | \(108\) |
default | \(\frac {-\frac {2 \left (c^{2}-d^{2}\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}-\frac {-2 c^{2}+4 c d -2 d^{2}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{2}}-\frac {2 \left (2 c^{2}-4 c d +2 d^{2}\right )}{3 \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}+2 d^{2} \arctan \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{a^{2} f}\) | \(108\) |
risch | \(\frac {d^{2} x}{a^{2}}-\frac {2 \left (-c^{2}-4 c d +5 d^{2}+3 i c^{2} {\mathrm e}^{i \left (f x +e \right )}+6 i c d \,{\mathrm e}^{i \left (f x +e \right )}-9 i d^{2} {\mathrm e}^{i \left (f x +e \right )}+6 c d \,{\mathrm e}^{2 i \left (f x +e \right )}-6 d^{2} {\mathrm e}^{2 i \left (f x +e \right )}\right )}{3 f \,a^{2} \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )^{3}}\) | \(118\) |
parallelrisch | \(\frac {3 d^{2} \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} x f +\left (\left (9 f x +6\right ) d^{2}-6 c^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+\left (\left (9 f x +18\right ) d^{2}-12 c d -6 c^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\left (3 f x +8\right ) d^{2}-4 c d -4 c^{2}}{3 f \,a^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\) | \(118\) |
norman | \(\frac {\frac {d^{2} x}{a}+\frac {d^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{7}}{a}+\frac {\left (-2 c^{2}+2 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{a f}+\frac {\left (-2 c^{2}-4 c d +6 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a f}+\frac {\left (-2 c^{2}-4 c d +6 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{a f}+\frac {\left (-4 c^{2}-8 c d +12 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{a f}+\frac {-4 c^{2}-4 c d +8 d^{2}}{3 a f}+\frac {3 d^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{a}+\frac {5 d^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{a}+\frac {7 d^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}}{a}+\frac {7 d^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{a}+\frac {5 d^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{5}}{a}+\frac {3 d^{2} x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{6}}{a}+\frac {\left (-14 c^{2}-8 c d +22 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{3 a f}+\frac {\left (-16 c^{2}-4 c d +20 d^{2}\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{4}}{3 a f}}{\left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )^{2} a \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )^{3}}\) | \(396\) |
Input:
int((c+d*sin(f*x+e))^2/(a+sin(f*x+e)*a)^2,x,method=_RETURNVERBOSE)
Output:
2/f/a^2*(-(c^2-d^2)/(tan(1/2*f*x+1/2*e)+1)-1/2*(-2*c^2+4*c*d-2*d^2)/(tan(1 /2*f*x+1/2*e)+1)^2-1/3*(2*c^2-4*c*d+2*d^2)/(tan(1/2*f*x+1/2*e)+1)^3+d^2*ar ctan(tan(1/2*f*x+1/2*e)))
Leaf count of result is larger than twice the leaf count of optimal. 197 vs. \(2 (81) = 162\).
Time = 0.09 (sec) , antiderivative size = 197, normalized size of antiderivative = 2.32 \[ \int \frac {(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=-\frac {6 \, d^{2} f x - {\left (3 \, d^{2} f x + c^{2} + 4 \, c d - 5 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - c^{2} + 2 \, c d - d^{2} + {\left (3 \, d^{2} f x - 2 \, c^{2} - 2 \, c d + 4 \, d^{2}\right )} \cos \left (f x + e\right ) + {\left (6 \, d^{2} f x + c^{2} - 2 \, c d + d^{2} + {\left (3 \, d^{2} f x - c^{2} - 4 \, c d + 5 \, d^{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((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x, algorithm="fricas")
Output:
-1/3*(6*d^2*f*x - (3*d^2*f*x + c^2 + 4*c*d - 5*d^2)*cos(f*x + e)^2 - c^2 + 2*c*d - d^2 + (3*d^2*f*x - 2*c^2 - 2*c*d + 4*d^2)*cos(f*x + e) + (6*d^2*f *x + c^2 - 2*c*d + d^2 + (3*d^2*f*x - c^2 - 4*c*d + 5*d^2)*cos(f*x + e))*s in(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. 915 vs. \(2 (76) = 152\).
Time = 2.29 (sec) , antiderivative size = 915, normalized size of antiderivative = 10.76 \[ \int \frac {(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\text {Too large to display} \] Input:
integrate((c+d*sin(f*x+e))**2/(a+a*sin(f*x+e))**2,x)
Output:
Piecewise((-6*c**2*tan(e/2 + f*x/2)**2/(3*a**2*f*tan(e/2 + f*x/2)**3 + 9*a **2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) - 6*c**2 *tan(e/2 + f*x/2)/(3*a**2*f*tan(e/2 + f*x/2)**3 + 9*a**2*f*tan(e/2 + f*x/2 )**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) - 4*c**2/(3*a**2*f*tan(e/2 + f*x/2)**3 + 9*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*c*d*tan(e/2 + f*x/2)/(3*a**2*f*tan(e/2 + f*x/2)**3 + 9*a**2*f* tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) - 4*c*d/(3*a** 2*f*tan(e/2 + f*x/2)**3 + 9*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*d**2*f*x*tan(e/2 + f*x/2)**3/(3*a**2*f*tan(e/2 + f*x/2)**3 + 9*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*d**2*f*x*tan(e/2 + f*x/2)**2/(3*a**2*f*tan(e/2 + f*x/2)**3 + 9* 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*d** 2*f*x*tan(e/2 + f*x/2)/(3*a**2*f*tan(e/2 + f*x/2)**3 + 9*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*d**2*f*x/(3*a**2*f*t an(e/2 + f*x/2)**3 + 9*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x /2) + 3*a**2*f) + 6*d**2*tan(e/2 + f*x/2)**2/(3*a**2*f*tan(e/2 + f*x/2)**3 + 9*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*x/2) + 3*a**2*f) + 18*d**2*tan(e/2 + f*x/2)/(3*a**2*f*tan(e/2 + f*x/2)**3 + 9*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*d**2/(3*a**2*f*tan (e/2 + f*x/2)**3 + 9*a**2*f*tan(e/2 + f*x/2)**2 + 9*a**2*f*tan(e/2 + f*...
Leaf count of result is larger than twice the leaf count of optimal. 360 vs. \(2 (81) = 162\).
Time = 0.12 (sec) , antiderivative size = 360, normalized size of antiderivative = 4.24 \[ \int \frac {(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\frac {2 \, {\left (d^{2} {\left (\frac {\frac {9 \, \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}} + 4}{a^{2} + \frac {3 \, a^{2} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {3 \, a^{2} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}} + \frac {3 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a^{2}}\right )} - \frac {c^{2} {\left (\frac {3 \, \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}} + 2\right )}}{a^{2} + \frac {3 \, a^{2} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {3 \, a^{2} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}} - \frac {2 \, c d {\left (\frac {3 \, \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}}{a^{2} + \frac {3 \, a^{2} \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + \frac {3 \, a^{2} \sin \left (f x + e\right )^{2}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{2}} + \frac {a^{2} \sin \left (f x + e\right )^{3}}{{\left (\cos \left (f x + e\right ) + 1\right )}^{3}}}\right )}}{3 \, f} \] Input:
integrate((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x, algorithm="maxima")
Output:
2/3*(d^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) - c^2*(3*sin(f*x + e)/(co s(f*x + e) + 1) + 3*sin(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*c*d*(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*si n(f*x + e)^2/(cos(f*x + e) + 1)^2 + a^2*sin(f*x + e)^3/(cos(f*x + e) + 1)^ 3))/f
Time = 0.13 (sec) , antiderivative size = 125, normalized size of antiderivative = 1.47 \[ \int \frac {(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\frac {\frac {3 \, {\left (f x + e\right )} d^{2}}{a^{2}} - \frac {2 \, {\left (3 \, c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - 3 \, d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 3 \, c^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 6 \, c d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 9 \, d^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 2 \, c^{2} + 2 \, c d - 4 \, d^{2}\right )}}{a^{2} {\left (\tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1\right )}^{3}}}{3 \, f} \] Input:
integrate((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x, algorithm="giac")
Output:
1/3*(3*(f*x + e)*d^2/a^2 - 2*(3*c^2*tan(1/2*f*x + 1/2*e)^2 - 3*d^2*tan(1/2 *f*x + 1/2*e)^2 + 3*c^2*tan(1/2*f*x + 1/2*e) + 6*c*d*tan(1/2*f*x + 1/2*e) - 9*d^2*tan(1/2*f*x + 1/2*e) + 2*c^2 + 2*c*d - 4*d^2)/(a^2*(tan(1/2*f*x + 1/2*e) + 1)^3))/f
Time = 16.70 (sec) , antiderivative size = 93, normalized size of antiderivative = 1.09 \[ \int \frac {(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\frac {d^2\,x}{a^2}-\frac {\frac {4\,c\,d}{3}+{\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )}^2\,\left (2\,c^2-2\,d^2\right )+\frac {4\,c^2}{3}-\frac {8\,d^2}{3}+\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\,\left (2\,c^2+4\,c\,d-6\,d^2\right )}{a^2\,f\,{\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )+1\right )}^3} \] Input:
int((c + d*sin(e + f*x))^2/(a + a*sin(e + f*x))^2,x)
Output:
(d^2*x)/a^2 - ((4*c*d)/3 + tan(e/2 + (f*x)/2)^2*(2*c^2 - 2*d^2) + (4*c^2)/ 3 - (8*d^2)/3 + tan(e/2 + (f*x)/2)*(4*c*d + 2*c^2 - 6*d^2))/(a^2*f*(tan(e/ 2 + (f*x)/2) + 1)^3)
Time = 0.16 (sec) , antiderivative size = 180, normalized size of antiderivative = 2.12 \[ \int \frac {(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^2} \, dx=\frac {2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} c^{2}+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} d^{2} f x -2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3} d^{2}+9 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} d^{2} f x -12 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c d +9 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{2} f x +12 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d^{2}-2 c^{2}-4 c d +3 d^{2} f x +6 d^{2}}{3 a^{2} f \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{3}+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+3 \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )} \] Input:
int((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^2,x)
Output:
(2*tan((e + f*x)/2)**3*c**2 + 3*tan((e + f*x)/2)**3*d**2*f*x - 2*tan((e + f*x)/2)**3*d**2 + 9*tan((e + f*x)/2)**2*d**2*f*x - 12*tan((e + f*x)/2)*c*d + 9*tan((e + f*x)/2)*d**2*f*x + 12*tan((e + f*x)/2)*d**2 - 2*c**2 - 4*c*d + 3*d**2*f*x + 6*d**2)/(3*a**2*f*(tan((e + f*x)/2)**3 + 3*tan((e + f*x)/2 )**2 + 3*tan((e + f*x)/2) + 1))