Integrand size = 25, antiderivative size = 185 \[ \int \frac {1}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\frac {2 b^2 \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2} (b c-a d)^2 f}+\frac {2 d \left (a c d-b \left (2 c^2-d^2\right )\right ) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{(b c-a d)^2 \left (c^2-d^2\right )^{3/2} f}-\frac {d^2 \cos (e+f x)}{(b c-a d) \left (c^2-d^2\right ) f (c+d \sin (e+f x))} \] Output:
2*b^2*arctan((b+a*tan(1/2*f*x+1/2*e))/(a^2-b^2)^(1/2))/(a^2-b^2)^(1/2)/(-a *d+b*c)^2/f+2*d*(a*c*d-b*(2*c^2-d^2))*arctan((d+c*tan(1/2*f*x+1/2*e))/(c^2 -d^2)^(1/2))/(-a*d+b*c)^2/(c^2-d^2)^(3/2)/f-d^2*cos(f*x+e)/(-a*d+b*c)/(c^2 -d^2)/f/(c+d*sin(f*x+e))
Time = 1.00 (sec) , antiderivative size = 165, normalized size of antiderivative = 0.89 \[ \int \frac {1}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\frac {\frac {2 b^2 \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {2 d \left (a c d+b \left (-2 c^2+d^2\right )\right ) \arctan \left (\frac {d+c \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{\left (c^2-d^2\right )^{3/2}}+\frac {d^2 (-b c+a d) \cos (e+f x)}{(c-d) (c+d) (c+d \sin (e+f x))}}{(b c-a d)^2 f} \] Input:
Integrate[1/((a + b*Sin[e + f*x])*(c + d*Sin[e + f*x])^2),x]
Output:
((2*b^2*ArcTan[(b + a*Tan[(e + f*x)/2])/Sqrt[a^2 - b^2]])/Sqrt[a^2 - b^2] + (2*d*(a*c*d + b*(-2*c^2 + d^2))*ArcTan[(d + c*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/(c^2 - d^2)^(3/2) + (d^2*(-(b*c) + a*d)*Cos[e + f*x])/((c - d)*( c + d)*(c + d*Sin[e + f*x])))/((b*c - a*d)^2*f)
Time = 0.84 (sec) , antiderivative size = 230, normalized size of antiderivative = 1.24, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.360, Rules used = {3042, 3281, 25, 3042, 3480, 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 {1}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2}dx\) |
\(\Big \downarrow \) 3281 |
\(\displaystyle \frac {\int -\frac {a c d+b c \sin (e+f x) d-b \left (c^2-d^2\right )}{(a+b \sin (e+f x)) (c+d \sin (e+f x))}dx}{\left (c^2-d^2\right ) (b c-a d)}-\frac {d^2 \cos (e+f x)}{f \left (c^2-d^2\right ) (b c-a d) (c+d \sin (e+f x))}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {\int \frac {a c d+b c \sin (e+f x) d-b \left (c^2-d^2\right )}{(a+b \sin (e+f x)) (c+d \sin (e+f x))}dx}{\left (c^2-d^2\right ) (b c-a d)}-\frac {d^2 \cos (e+f x)}{f \left (c^2-d^2\right ) (b c-a d) (c+d \sin (e+f x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \frac {a c d+b c \sin (e+f x) d-b \left (c^2-d^2\right )}{(a+b \sin (e+f x)) (c+d \sin (e+f x))}dx}{\left (c^2-d^2\right ) (b c-a d)}-\frac {d^2 \cos (e+f x)}{f \left (c^2-d^2\right ) (b c-a d) (c+d \sin (e+f x))}\) |
\(\Big \downarrow \) 3480 |
\(\displaystyle -\frac {-\frac {b^2 \left (c^2-d^2\right ) \int \frac {1}{a+b \sin (e+f x)}dx}{b c-a d}-\frac {d \left (a c d-b \left (2 c^2-d^2\right )\right ) \int \frac {1}{c+d \sin (e+f x)}dx}{b c-a d}}{\left (c^2-d^2\right ) (b c-a d)}-\frac {d^2 \cos (e+f x)}{f \left (c^2-d^2\right ) (b c-a d) (c+d \sin (e+f x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {b^2 \left (c^2-d^2\right ) \int \frac {1}{a+b \sin (e+f x)}dx}{b c-a d}-\frac {d \left (a c d-b \left (2 c^2-d^2\right )\right ) \int \frac {1}{c+d \sin (e+f x)}dx}{b c-a d}}{\left (c^2-d^2\right ) (b c-a d)}-\frac {d^2 \cos (e+f x)}{f \left (c^2-d^2\right ) (b c-a d) (c+d \sin (e+f x))}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle -\frac {-\frac {2 b^2 \left (c^2-d^2\right ) \int \frac {1}{a \tan ^2\left (\frac {1}{2} (e+f x)\right )+2 b \tan \left (\frac {1}{2} (e+f x)\right )+a}d\tan \left (\frac {1}{2} (e+f x)\right )}{f (b c-a d)}-\frac {2 d \left (a c d-b \left (2 c^2-d^2\right )\right ) \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 (b c-a d)}}{\left (c^2-d^2\right ) (b c-a d)}-\frac {d^2 \cos (e+f x)}{f \left (c^2-d^2\right ) (b c-a d) (c+d \sin (e+f x))}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle -\frac {\frac {4 b^2 \left (c^2-d^2\right ) \int \frac {1}{-\left (2 b+2 a \tan \left (\frac {1}{2} (e+f x)\right )\right )^2-4 \left (a^2-b^2\right )}d\left (2 b+2 a \tan \left (\frac {1}{2} (e+f x)\right )\right )}{f (b c-a d)}+\frac {4 d \left (a c d-b \left (2 c^2-d^2\right )\right ) \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 (b c-a d)}}{\left (c^2-d^2\right ) (b c-a d)}-\frac {d^2 \cos (e+f x)}{f \left (c^2-d^2\right ) (b c-a d) (c+d \sin (e+f x))}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle -\frac {-\frac {2 b^2 \left (c^2-d^2\right ) \arctan \left (\frac {2 a \tan \left (\frac {1}{2} (e+f x)\right )+2 b}{2 \sqrt {a^2-b^2}}\right )}{f \sqrt {a^2-b^2} (b c-a d)}-\frac {2 d \left (a c d-b \left (2 c^2-d^2\right )\right ) \arctan \left (\frac {2 c \tan \left (\frac {1}{2} (e+f x)\right )+2 d}{2 \sqrt {c^2-d^2}}\right )}{f \sqrt {c^2-d^2} (b c-a d)}}{\left (c^2-d^2\right ) (b c-a d)}-\frac {d^2 \cos (e+f x)}{f \left (c^2-d^2\right ) (b c-a d) (c+d \sin (e+f x))}\) |
Input:
Int[1/((a + b*Sin[e + f*x])*(c + d*Sin[e + f*x])^2),x]
Output:
-(((-2*b^2*(c^2 - d^2)*ArcTan[(2*b + 2*a*Tan[(e + f*x)/2])/(2*Sqrt[a^2 - b ^2])])/(Sqrt[a^2 - b^2]*(b*c - a*d)*f) - (2*d*(a*c*d - b*(2*c^2 - d^2))*Ar cTan[(2*d + 2*c*Tan[(e + f*x)/2])/(2*Sqrt[c^2 - d^2])])/((b*c - a*d)*Sqrt[ c^2 - d^2]*f))/((b*c - a*d)*(c^2 - d^2))) - (d^2*Cos[e + f*x])/((b*c - a*d )*(c^2 - d^2)*f*(c + d*Sin[e + f*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_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(-b^2)*Cos[e + f*x]*(a + b*Sin[e + f* x])^(m + 1)*((c + d*Sin[e + f*x])^(n + 1)/(f*(m + 1)*(b*c - a*d)*(a^2 - b^2 ))), x] + Simp[1/((m + 1)*(b*c - a*d)*(a^2 - b^2)) Int[(a + b*Sin[e + f*x ])^(m + 1)*(c + d*Sin[e + f*x])^n*Simp[a*(b*c - a*d)*(m + 1) + b^2*d*(m + n + 2) - (b^2*c + b*(b*c - a*d)*(m + 1))*Sin[e + f*x] - b^2*d*(m + n + 3)*Si n[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a* d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] && IntegersQ[ 2*m, 2*n] && ((EqQ[a, 0] && IntegerQ[m] && !IntegerQ[n]) || !(IntegerQ[2* n] && LtQ[n, -1] && ((IntegerQ[n] && !IntegerQ[m]) || EqQ[a, 0])))
Int[((A_.) + (B_.)*sin[(e_.) + (f_.)*(x_)])/(((a_.) + (b_.)*sin[(e_.) + (f_ .)*(x_)])*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])), x_Symbol] :> Simp[(A*b - a*B)/(b*c - a*d) Int[1/(a + b*Sin[e + f*x]), x], x] + Simp[(B*c - A*d)/ (b*c - a*d) Int[1/(c + d*Sin[e + f*x]), x], x] /; FreeQ[{a, b, c, d, e, f , A, B}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0]
Time = 2.17 (sec) , antiderivative size = 234, normalized size of antiderivative = 1.26
method | result | size |
derivativedivides | \(\frac {\frac {2 d \left (\frac {\frac {d^{2} \left (a d -b c \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{c \left (c^{2}-d^{2}\right )}+\frac {d \left (a d -b c \right )}{c^{2}-d^{2}}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c +2 d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+c}+\frac {\left (a c d -2 b \,c^{2}+b \,d^{2}\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^{2}-d^{2}\right )^{\frac {3}{2}}}\right )}{\left (a d -b c \right )^{2}}+\frac {2 b^{2} \arctan \left (\frac {2 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \sqrt {a^{2}-b^{2}}}}{f}\) | \(234\) |
default | \(\frac {\frac {2 d \left (\frac {\frac {d^{2} \left (a d -b c \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{c \left (c^{2}-d^{2}\right )}+\frac {d \left (a d -b c \right )}{c^{2}-d^{2}}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} c +2 d \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+c}+\frac {\left (a c d -2 b \,c^{2}+b \,d^{2}\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^{2}-d^{2}\right )^{\frac {3}{2}}}\right )}{\left (a d -b c \right )^{2}}+\frac {2 b^{2} \arctan \left (\frac {2 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{\left (a^{2} d^{2}-2 a b c d +b^{2} c^{2}\right ) \sqrt {a^{2}-b^{2}}}}{f}\) | \(234\) |
risch | \(-\frac {2 d \left (i d +c \,{\mathrm e}^{i \left (f x +e \right )}\right )}{\left (c^{2}-d^{2}\right ) \left (-a d +b c \right ) f \left (d \,{\mathrm e}^{2 i \left (f x +e \right )}-d +2 i c \,{\mathrm e}^{i \left (f x +e \right )}\right )}-\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 c}{\sqrt {-c^{2}+d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}+\frac {2 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^{2}}{\sqrt {-c^{2}+d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}-\frac {d^{3} \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}{\sqrt {-c^{2}+d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}+\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 c}{\sqrt {-c^{2}+d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}-\frac {2 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^{2}}{\sqrt {-c^{2}+d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}+\frac {d^{3} \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}{\sqrt {-c^{2}+d^{2}}\, \left (a d -b c \right )^{2} \left (c +d \right ) \left (c -d \right ) f}-\frac {b^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a -a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a d -b c \right )^{2} f}+\frac {b^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i \sqrt {-a^{2}+b^{2}}\, a +a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a d -b c \right )^{2} f}\) | \(786\) |
Input:
int(1/(a+b*sin(f*x+e))/(c+d*sin(f*x+e))^2,x,method=_RETURNVERBOSE)
Output:
1/f*(2*d/(a*d-b*c)^2*((d^2*(a*d-b*c)/c/(c^2-d^2)*tan(1/2*f*x+1/2*e)+d*(a*d -b*c)/(c^2-d^2))/(tan(1/2*f*x+1/2*e)^2*c+2*d*tan(1/2*f*x+1/2*e)+c)+(a*c*d- 2*b*c^2+b*d^2)/(c^2-d^2)^(3/2)*arctan(1/2*(2*c*tan(1/2*f*x+1/2*e)+2*d)/(c^ 2-d^2)^(1/2)))+2*b^2/(a^2*d^2-2*a*b*c*d+b^2*c^2)/(a^2-b^2)^(1/2)*arctan(1/ 2*(2*a*tan(1/2*f*x+1/2*e)+2*b)/(a^2-b^2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 637 vs. \(2 (175) = 350\).
Time = 88.21 (sec) , antiderivative size = 2882, normalized size of antiderivative = 15.58 \[ \int \frac {1}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\text {Too large to display} \] Input:
integrate(1/(a+b*sin(f*x+e))/(c+d*sin(f*x+e))^2,x, algorithm="fricas")
Output:
[-1/2*((b^2*c^5 - 2*b^2*c^3*d^2 + b^2*c*d^4 + (b^2*c^4*d - 2*b^2*c^2*d^3 + b^2*d^5)*sin(f*x + e))*sqrt(-a^2 + b^2)*log(((2*a^2 - b^2)*cos(f*x + e)^2 - 2*a*b*sin(f*x + e) - a^2 - b^2 + 2*(a*cos(f*x + e)*sin(f*x + e) + b*cos (f*x + e))*sqrt(-a^2 + b^2))/(b^2*cos(f*x + e)^2 - 2*a*b*sin(f*x + e) - a^ 2 - b^2)) + (2*(a^2*b - b^3)*c^3*d - (a^3 - a*b^2)*c^2*d^2 - (a^2*b - b^3) *c*d^3 + (2*(a^2*b - b^3)*c^2*d^2 - (a^3 - a*b^2)*c*d^3 - (a^2*b - b^3)*d^ 4)*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*((a^2*b - b^3)*c^3*d^2 - (a^3 - a*b^2)*c^2*d^3 - (a^2*b - b^3)*c*d ^4 + (a^3 - a*b^2)*d^5)*cos(f*x + e))/(((a^2*b^2 - b^4)*c^6*d - 2*(a^3*b - a*b^3)*c^5*d^2 + (a^4 - 3*a^2*b^2 + 2*b^4)*c^4*d^3 + 4*(a^3*b - a*b^3)*c^ 3*d^4 - (2*a^4 - 3*a^2*b^2 + b^4)*c^2*d^5 - 2*(a^3*b - a*b^3)*c*d^6 + (a^4 - a^2*b^2)*d^7)*f*sin(f*x + e) + ((a^2*b^2 - b^4)*c^7 - 2*(a^3*b - a*b^3) *c^6*d + (a^4 - 3*a^2*b^2 + 2*b^4)*c^5*d^2 + 4*(a^3*b - a*b^3)*c^4*d^3 - ( 2*a^4 - 3*a^2*b^2 + b^4)*c^3*d^4 - 2*(a^3*b - a*b^3)*c^2*d^5 + (a^4 - a^2* b^2)*c*d^6)*f), 1/2*(2*(2*(a^2*b - b^3)*c^3*d - (a^3 - a*b^2)*c^2*d^2 - (a ^2*b - b^3)*c*d^3 + (2*(a^2*b - b^3)*c^2*d^2 - (a^3 - a*b^2)*c*d^3 - (a^2* b - b^3)*d^4)*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))) - (b^2*c^5 - 2*b^2*c^3*d^2 + b^2*c*d^4 +...
Timed out. \[ \int \frac {1}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\text {Timed out} \] Input:
integrate(1/(a+b*sin(f*x+e))/(c+d*sin(f*x+e))**2,x)
Output:
Timed out
Exception generated. \[ \int \frac {1}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(1/(a+b*sin(f*x+e))/(c+d*sin(f*x+e))^2,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*b^2-4*a^2>0)', see `assume?` f or more de
Time = 0.37 (sec) , antiderivative size = 301, normalized size of antiderivative = 1.63 \[ \int \frac {1}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\frac {2 \, {\left (\frac {{\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )} b^{2}}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {a^{2} - b^{2}}} - \frac {{\left (2 \, b c^{2} d - a c d^{2} - b d^{3}\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 (b^{2} c^{4} - 2 \, a b c^{3} d + a^{2} c^{2} d^{2} - b^{2} c^{2} d^{2} + 2 \, a b c d^{3} - a^{2} d^{4}\right )} \sqrt {c^{2} - d^{2}}} - \frac {d^{3} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + c d^{2}}{{\left (b c^{4} - a c^{3} d - b c^{2} d^{2} + a c d^{3}\right )} {\left (c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} + 2 \, d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + c\right )}}\right )}}{f} \] Input:
integrate(1/(a+b*sin(f*x+e))/(c+d*sin(f*x+e))^2,x, algorithm="giac")
Output:
2*((pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*f*x + 1/2* e) + b)/sqrt(a^2 - b^2)))*b^2/((b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(a^2 - b^2)) - (2*b*c^2*d - a*c*d^2 - b*d^3)*(pi*floor(1/2*(f*x + e)/pi + 1/2)*sg n(c) + arctan((c*tan(1/2*f*x + 1/2*e) + d)/sqrt(c^2 - d^2)))/((b^2*c^4 - 2 *a*b*c^3*d + a^2*c^2*d^2 - b^2*c^2*d^2 + 2*a*b*c*d^3 - a^2*d^4)*sqrt(c^2 - d^2)) - (d^3*tan(1/2*f*x + 1/2*e) + c*d^2)/((b*c^4 - a*c^3*d - b*c^2*d^2 + a*c*d^3)*(c*tan(1/2*f*x + 1/2*e)^2 + 2*d*tan(1/2*f*x + 1/2*e) + c)))/f
Time = 28.23 (sec) , antiderivative size = 24122, normalized size of antiderivative = 130.39 \[ \int \frac {1}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx=\text {Too large to display} \] Input:
int(1/((a + b*sin(e + f*x))*(c + d*sin(e + f*x))^2),x)
Output:
((2*d^2)/((c^2 - d^2)*(a*d - b*c)) + (2*d^3*tan(e/2 + (f*x)/2))/(c*(c^2 - d^2)*(a*d - b*c)))/(f*(c + 2*d*tan(e/2 + (f*x)/2) + c*tan(e/2 + (f*x)/2)^2 )) + (b^2*atan(((b^2*(b^2 - a^2)^(1/2)*((32*tan(e/2 + (f*x)/2)*(a^6*c^3*d^ 5 - a*b^5*c^8 + 4*a*b^5*c^2*d^6 - 13*a*b^5*c^4*d^4 + 12*a*b^5*c^6*d^2 - 4* a^2*b^4*c*d^7 + a^2*b^4*c^7*d + a^4*b^2*c*d^7 + 2*a^5*b*c^2*d^6 - 5*a^5*b* c^4*d^4 + 17*a^2*b^4*c^3*d^5 - 20*a^2*b^4*c^5*d^3 - 5*a^3*b^3*c^2*d^6 + 14 *a^3*b^3*c^4*d^4 - 4*a^3*b^3*c^6*d^2 - 8*a^4*b^2*c^3*d^5 + 8*a^4*b^2*c^5*d ^3))/(a^3*d^7 - b^3*c^7 - 2*a^3*c^2*d^5 + a^3*c^4*d^3 - b^3*c^3*d^4 + 2*b^ 3*c^5*d^2 + 3*a*b^2*c^2*d^5 - 6*a*b^2*c^4*d^3 + 6*a^2*b*c^3*d^4 - 3*a^2*b* c^5*d^2 + 3*a*b^2*c^6*d - 3*a^2*b*c*d^6) - (32*(2*a*b^5*c^5*d^3 - a*b^5*c^ 3*d^5 + a^3*b^3*c*d^7 + a^5*b*c^3*d^5 + 2*a^2*b^4*c^4*d^4 - 3*a^2*b^4*c^6* d^2 - 6*a^3*b^3*c^3*d^5 + 8*a^3*b^3*c^5*d^3 + 2*a^4*b^2*c^2*d^6 - 5*a^4*b^ 2*c^4*d^4 - a*b^5*c^7*d))/(a^3*d^7 - b^3*c^7 - 2*a^3*c^2*d^5 + a^3*c^4*d^3 - b^3*c^3*d^4 + 2*b^3*c^5*d^2 + 3*a*b^2*c^2*d^5 - 6*a*b^2*c^4*d^3 + 6*a^2 *b*c^3*d^4 - 3*a^2*b*c^5*d^2 + 3*a*b^2*c^6*d - 3*a^2*b*c*d^6) + (b^2*(b^2 - a^2)^(1/2)*((32*(a^2*b^5*c^10 + a^7*c^3*d^7 - a^7*c^5*d^5 + a*b^6*c^5*d^ 5 - 3*a*b^6*c^7*d^3 - 5*a^3*b^4*c^9*d + a^5*b^2*c*d^9 + a^6*b*c^2*d^8 - 6* a^6*b*c^4*d^6 + 5*a^6*b*c^6*d^4 - 4*a^2*b^5*c^4*d^6 + 13*a^2*b^5*c^6*d^4 - 10*a^2*b^5*c^8*d^2 + 6*a^3*b^4*c^3*d^7 - 22*a^3*b^4*c^5*d^5 + 21*a^3*b^4* c^7*d^3 - 4*a^4*b^3*c^2*d^8 + 18*a^4*b^3*c^4*d^6 - 24*a^4*b^3*c^6*d^4 +...
Time = 0.22 (sec) , antiderivative size = 1480, normalized size of antiderivative = 8.00 \[ \int \frac {1}{(a+b \sin (e+f x)) (c+d \sin (e+f x))^2} \, dx =\text {Too large to display} \] Input:
int(1/(a+b*sin(f*x+e))/(c+d*sin(f*x+e))^2,x)
Output:
(2*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*sin( e + f*x)*b**2*c**4*d - 4*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/s qrt(a**2 - b**2))*sin(e + f*x)*b**2*c**2*d**3 + 2*sqrt(a**2 - b**2)*atan(( tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*sin(e + f*x)*b**2*d**5 + 2*sqrt (a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*b**2*c**5 - 4*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*b**2 *c**3*d**2 + 2*sqrt(a**2 - b**2)*atan((tan((e + f*x)/2)*a + b)/sqrt(a**2 - b**2))*b**2*c*d**4 + 2*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sq rt(c**2 - d**2))*sin(e + f*x)*a**3*c*d**3 - 4*sqrt(c**2 - d**2)*atan((tan( (e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*sin(e + f*x)*a**2*b*c**2*d**2 + 2*s qrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*sin(e + f*x)*a**2*b*d**4 - 2*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt( c**2 - d**2))*sin(e + f*x)*a*b**2*c*d**3 + 4*sqrt(c**2 - d**2)*atan((tan(( e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*sin(e + f*x)*b**3*c**2*d**2 - 2*sqrt (c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*sin(e + f*x )*b**3*d**4 + 2*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*a**3*c**2*d**2 - 4*sqrt(c**2 - d**2)*atan((tan((e + f*x)/2)*c + d )/sqrt(c**2 - d**2))*a**2*b*c**3*d + 2*sqrt(c**2 - d**2)*atan((tan((e + f* x)/2)*c + d)/sqrt(c**2 - d**2))*a**2*b*c*d**3 - 2*sqrt(c**2 - d**2)*atan(( tan((e + f*x)/2)*c + d)/sqrt(c**2 - d**2))*a*b**2*c**2*d**2 + 4*sqrt(c*...