Integrand size = 24, antiderivative size = 77 \[ \int \frac {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {2 f \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2} d^2}-\frac {e+f x}{b d (a+b \sin (c+d x))} \] Output:
2*f*arctan((b+a*tan(1/2*d*x+1/2*c))/(a^2-b^2)^(1/2))/b/(a^2-b^2)^(1/2)/d^2 -(f*x+e)/b/d/(a+b*sin(d*x+c))
Time = 1.51 (sec) , antiderivative size = 73, normalized size of antiderivative = 0.95 \[ \int \frac {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {\frac {2 f \arctan \left (\frac {b+a \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}-\frac {d (e+f x)}{a+b \sin (c+d x)}}{b d^2} \] Input:
Integrate[((e + f*x)*Cos[c + d*x])/(a + b*Sin[c + d*x])^2,x]
Output:
((2*f*ArcTan[(b + a*Tan[(c + d*x)/2])/Sqrt[a^2 - b^2]])/Sqrt[a^2 - b^2] - (d*(e + f*x))/(a + b*Sin[c + d*x]))/(b*d^2)
Time = 0.32 (sec) , antiderivative size = 83, normalized size of antiderivative = 1.08, number of steps used = 6, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.208, Rules used = {4922, 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 {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx\) |
\(\Big \downarrow \) 4922 |
\(\displaystyle \frac {f \int \frac {1}{a+b \sin (c+d x)}dx}{b d}-\frac {e+f x}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {f \int \frac {1}{a+b \sin (c+d x)}dx}{b d}-\frac {e+f x}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle \frac {2 f \int \frac {1}{a \tan ^2\left (\frac {1}{2} (c+d x)\right )+2 b \tan \left (\frac {1}{2} (c+d x)\right )+a}d\tan \left (\frac {1}{2} (c+d x)\right )}{b d^2}-\frac {e+f x}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle -\frac {4 f \int \frac {1}{-\left (2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )^2-4 \left (a^2-b^2\right )}d\left (2 b+2 a \tan \left (\frac {1}{2} (c+d x)\right )\right )}{b d^2}-\frac {e+f x}{b d (a+b \sin (c+d x))}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle \frac {2 f \arctan \left (\frac {2 a \tan \left (\frac {1}{2} (c+d x)\right )+2 b}{2 \sqrt {a^2-b^2}}\right )}{b d^2 \sqrt {a^2-b^2}}-\frac {e+f x}{b d (a+b \sin (c+d x))}\) |
Input:
Int[((e + f*x)*Cos[c + d*x])/(a + b*Sin[c + d*x])^2,x]
Output:
(2*f*ArcTan[(2*b + 2*a*Tan[(c + d*x)/2])/(2*Sqrt[a^2 - b^2])])/(b*Sqrt[a^2 - b^2]*d^2) - (e + f*x)/(b*d*(a + b*Sin[c + d*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[Cos[(c_.) + (d_.)*(x_)]*((e_.) + (f_.)*(x_))^(m_.)*((a_) + (b_.)*Sin[(c _.) + (d_.)*(x_)])^(n_.), x_Symbol] :> Simp[(e + f*x)^m*((a + b*Sin[c + d*x ])^(n + 1)/(b*d*(n + 1))), x] - Simp[f*(m/(b*d*(n + 1))) Int[(e + f*x)^(m - 1)*(a + b*Sin[c + d*x])^(n + 1), x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && IGtQ[m, 0] && NeQ[n, -1]
Result contains complex when optimal does not.
Time = 4.41 (sec) , antiderivative size = 194, normalized size of antiderivative = 2.52
method | result | size |
risch | \(-\frac {2 i \left (f x +e \right ) {\mathrm e}^{i \left (d x +c \right )}}{b d \left (2 i a \,{\mathrm e}^{i \left (d x +c \right )}+b \,{\mathrm e}^{2 i \left (d x +c \right )}-b \right )}-\frac {f \ln \left ({\mathrm e}^{i \left (d x +c \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}}\, d^{2} b}+\frac {f \ln \left ({\mathrm e}^{i \left (d x +c \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}}\, d^{2} b}\) | \(194\) |
Input:
int((f*x+e)*cos(d*x+c)/(a+b*sin(d*x+c))^2,x,method=_RETURNVERBOSE)
Output:
-2*I*(f*x+e)*exp(I*(d*x+c))/b/d/(2*I*a*exp(I*(d*x+c))+b*exp(2*I*(d*x+c))-b )-1/(-a^2+b^2)^(1/2)*f/d^2/b*ln(exp(I*(d*x+c))+(I*(-a^2+b^2)^(1/2)*a-a^2+b ^2)/(-a^2+b^2)^(1/2)/b)+1/(-a^2+b^2)^(1/2)*f/d^2/b*ln(exp(I*(d*x+c))+(I*(- a^2+b^2)^(1/2)*a+a^2-b^2)/(-a^2+b^2)^(1/2)/b)
Time = 0.09 (sec) , antiderivative size = 339, normalized size of antiderivative = 4.40 \[ \int \frac {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\left [-\frac {2 \, {\left (a^{2} - b^{2}\right )} d f x + 2 \, {\left (a^{2} - b^{2}\right )} d e + {\left (b f \sin \left (d x + c\right ) + a f\right )} \sqrt {-a^{2} + b^{2}} \log \left (\frac {{\left (2 \, a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2} + 2 \, {\left (a \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b \cos \left (d x + c\right )\right )} \sqrt {-a^{2} + b^{2}}}{b^{2} \cos \left (d x + c\right )^{2} - 2 \, a b \sin \left (d x + c\right ) - a^{2} - b^{2}}\right )}{2 \, {\left ({\left (a^{2} b^{2} - b^{4}\right )} d^{2} \sin \left (d x + c\right ) + {\left (a^{3} b - a b^{3}\right )} d^{2}\right )}}, -\frac {{\left (a^{2} - b^{2}\right )} d f x + {\left (a^{2} - b^{2}\right )} d e + {\left (b f \sin \left (d x + c\right ) + a f\right )} \sqrt {a^{2} - b^{2}} \arctan \left (-\frac {a \sin \left (d x + c\right ) + b}{\sqrt {a^{2} - b^{2}} \cos \left (d x + c\right )}\right )}{{\left (a^{2} b^{2} - b^{4}\right )} d^{2} \sin \left (d x + c\right ) + {\left (a^{3} b - a b^{3}\right )} d^{2}}\right ] \] Input:
integrate((f*x+e)*cos(d*x+c)/(a+b*sin(d*x+c))^2,x, algorithm="fricas")
Output:
[-1/2*(2*(a^2 - b^2)*d*f*x + 2*(a^2 - b^2)*d*e + (b*f*sin(d*x + c) + a*f)* sqrt(-a^2 + b^2)*log(((2*a^2 - b^2)*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2 + 2*(a*cos(d*x + c)*sin(d*x + c) + b*cos(d*x + c))*sqrt(-a^2 + b ^2))/(b^2*cos(d*x + c)^2 - 2*a*b*sin(d*x + c) - a^2 - b^2)))/((a^2*b^2 - b ^4)*d^2*sin(d*x + c) + (a^3*b - a*b^3)*d^2), -((a^2 - b^2)*d*f*x + (a^2 - b^2)*d*e + (b*f*sin(d*x + c) + a*f)*sqrt(a^2 - b^2)*arctan(-(a*sin(d*x + c ) + b)/(sqrt(a^2 - b^2)*cos(d*x + c))))/((a^2*b^2 - b^4)*d^2*sin(d*x + c) + (a^3*b - a*b^3)*d^2)]
Timed out. \[ \int \frac {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Timed out} \] Input:
integrate((f*x+e)*cos(d*x+c)/(a+b*sin(d*x+c))**2,x)
Output:
Timed out
Exception generated. \[ \int \frac {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((f*x+e)*cos(d*x+c)/(a+b*sin(d*x+c))^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
\[ \int \frac {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\int { \frac {{\left (f x + e\right )} \cos \left (d x + c\right )}{{\left (b \sin \left (d x + c\right ) + a\right )}^{2}} \,d x } \] Input:
integrate((f*x+e)*cos(d*x+c)/(a+b*sin(d*x+c))^2,x, algorithm="giac")
Output:
integrate((f*x + e)*cos(d*x + c)/(b*sin(d*x + c) + a)^2, x)
Timed out. \[ \int \frac {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\text {Hanged} \] Input:
int((cos(c + d*x)*(e + f*x))/(a + b*sin(c + d*x))^2,x)
Output:
\text{Hanged}
Time = 0.18 (sec) , antiderivative size = 158, normalized size of antiderivative = 2.05 \[ \int \frac {(e+f x) \cos (c+d x)}{(a+b \sin (c+d x))^2} \, dx=\frac {2 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) \sin \left (d x +c \right ) b f +2 \sqrt {a^{2}-b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a +b}{\sqrt {a^{2}-b^{2}}}\right ) a f -a^{2} d e -a^{2} d f x +b^{2} d e +b^{2} d f x}{b \,d^{2} \left (\sin \left (d x +c \right ) a^{2} b -\sin \left (d x +c \right ) b^{3}+a^{3}-a \,b^{2}\right )} \] Input:
int((f*x+e)*cos(d*x+c)/(a+b*sin(d*x+c))^2,x)
Output:
(2*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*sin( c + d*x)*b*f + 2*sqrt(a**2 - b**2)*atan((tan((c + d*x)/2)*a + b)/sqrt(a**2 - b**2))*a*f - a**2*d*e - a**2*d*f*x + b**2*d*e + b**2*d*f*x)/(b*d**2*(si n(c + d*x)*a**2*b - sin(c + d*x)*b**3 + a**3 - a*b**2))