Integrand size = 21, antiderivative size = 47 \[ \int \frac {\sin (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\sqrt {b} \arctan \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{a^{3/2} f}-\frac {\cos (e+f x)}{a f} \] Output:
b^(1/2)*arctan(a^(1/2)*cos(f*x+e)/b^(1/2))/a^(3/2)/f-cos(f*x+e)/a/f
Result contains complex when optimal does not.
Time = 0.46 (sec) , antiderivative size = 329, normalized size of antiderivative = 7.00 \[ \int \frac {\sin (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\left ((a+4 b) \arctan \left (\frac {\left (-\sqrt {a}-i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right ) \sin (e) \tan \left (\frac {f x}{2}\right )+\cos (e) \left (\sqrt {a}-\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )+(a+4 b) \arctan \left (\frac {\left (-\sqrt {a}+i \sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2}\right ) \sin (e) \tan \left (\frac {f x}{2}\right )+\cos (e) \left (\sqrt {a}+\sqrt {a+b} \sqrt {(\cos (e)-i \sin (e))^2} \tan \left (\frac {f x}{2}\right )\right )}{\sqrt {b}}\right )-a \arctan \left (\frac {\sqrt {a}-\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )-a \arctan \left (\frac {\sqrt {a}+\sqrt {a+b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {b}}\right )-4 \sqrt {a} \sqrt {b} \cos (e+f x)\right ) (a+2 b+a \cos (2 (e+f x)))}{8 a^{3/2} \sqrt {b} f \left (b+a \cos ^2(e+f x)\right )} \] Input:
Integrate[Sin[e + f*x]/(a + b*Sec[e + f*x]^2),x]
Output:
(((a + 4*b)*ArcTan[((-Sqrt[a] - I*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]) *Sin[e]*Tan[(f*x)/2] + Cos[e]*(Sqrt[a] - Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[ e])^2]*Tan[(f*x)/2]))/Sqrt[b]] + (a + 4*b)*ArcTan[((-Sqrt[a] + I*Sqrt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2])*Sin[e]*Tan[(f*x)/2] + Cos[e]*(Sqrt[a] + Sq rt[a + b]*Sqrt[(Cos[e] - I*Sin[e])^2]*Tan[(f*x)/2]))/Sqrt[b]] - a*ArcTan[( Sqrt[a] - Sqrt[a + b]*Tan[(e + f*x)/2])/Sqrt[b]] - a*ArcTan[(Sqrt[a] + Sqr t[a + b]*Tan[(e + f*x)/2])/Sqrt[b]] - 4*Sqrt[a]*Sqrt[b]*Cos[e + f*x])*(a + 2*b + a*Cos[2*(e + f*x)]))/(8*a^(3/2)*Sqrt[b]*f*(b + a*Cos[e + f*x]^2))
Time = 0.22 (sec) , antiderivative size = 46, normalized size of antiderivative = 0.98, number of steps used = 5, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.190, Rules used = {3042, 4621, 262, 218}
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 {\sin (e+f x)}{a+b \sec ^2(e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin (e+f x)}{a+b \sec (e+f x)^2}dx\) |
\(\Big \downarrow \) 4621 |
\(\displaystyle -\frac {\int \frac {\cos ^2(e+f x)}{a \cos ^2(e+f x)+b}d\cos (e+f x)}{f}\) |
\(\Big \downarrow \) 262 |
\(\displaystyle -\frac {\frac {\cos (e+f x)}{a}-\frac {b \int \frac {1}{a \cos ^2(e+f x)+b}d\cos (e+f x)}{a}}{f}\) |
\(\Big \downarrow \) 218 |
\(\displaystyle -\frac {\frac {\cos (e+f x)}{a}-\frac {\sqrt {b} \arctan \left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {b}}\right )}{a^{3/2}}}{f}\) |
Input:
Int[Sin[e + f*x]/(a + b*Sec[e + f*x]^2),x]
Output:
-((-((Sqrt[b]*ArcTan[(Sqrt[a]*Cos[e + f*x])/Sqrt[b]])/a^(3/2)) + Cos[e + f *x]/a)/f)
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]/a)*ArcTan[x/R t[a/b, 2]], x] /; FreeQ[{a, b}, x] && PosQ[a/b]
Int[((c_.)*(x_))^(m_)*((a_) + (b_.)*(x_)^2)^(p_), x_Symbol] :> Simp[c*(c*x) ^(m - 1)*((a + b*x^2)^(p + 1)/(b*(m + 2*p + 1))), x] - Simp[a*c^2*((m - 1)/ (b*(m + 2*p + 1))) Int[(c*x)^(m - 2)*(a + b*x^2)^p, x], x] /; FreeQ[{a, b , c, p}, x] && GtQ[m, 2 - 1] && NeQ[m + 2*p + 1, 0] && IntBinomialQ[a, b, c , 2, m, p, x]
Int[((a_) + (b_.)*sec[(e_.) + (f_.)*(x_)]^(n_))^(p_.)*sin[(e_.) + (f_.)*(x_ )]^(m_.), x_Symbol] :> With[{ff = FreeFactors[Cos[e + f*x], x]}, Simp[-ff/f Subst[Int[(1 - ff^2*x^2)^((m - 1)/2)*((b + a*(ff*x)^n)^p/(ff*x)^(n*p)), x], x, Cos[e + f*x]/ff], x]] /; FreeQ[{a, b, e, f}, x] && IntegerQ[(m - 1)/ 2] && IntegerQ[n] && IntegerQ[p]
Time = 0.42 (sec) , antiderivative size = 44, normalized size of antiderivative = 0.94
method | result | size |
derivativedivides | \(\frac {-\frac {b \arctan \left (\frac {b \sec \left (f x +e \right )}{\sqrt {a b}}\right )}{a \sqrt {a b}}-\frac {1}{a \sec \left (f x +e \right )}}{f}\) | \(44\) |
default | \(\frac {-\frac {b \arctan \left (\frac {b \sec \left (f x +e \right )}{\sqrt {a b}}\right )}{a \sqrt {a b}}-\frac {1}{a \sec \left (f x +e \right )}}{f}\) | \(44\) |
risch | \(-\frac {{\mathrm e}^{i \left (f x +e \right )}}{2 a f}-\frac {{\mathrm e}^{-i \left (f x +e \right )}}{2 a f}-\frac {i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}-\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right )}{2 a^{2} f}+\frac {i \sqrt {a b}\, \ln \left ({\mathrm e}^{2 i \left (f x +e \right )}+\frac {2 i \sqrt {a b}\, {\mathrm e}^{i \left (f x +e \right )}}{a}+1\right )}{2 a^{2} f}\) | \(128\) |
Input:
int(sin(f*x+e)/(a+b*sec(f*x+e)^2),x,method=_RETURNVERBOSE)
Output:
1/f*(-b/a/(a*b)^(1/2)*arctan(b*sec(f*x+e)/(a*b)^(1/2))-1/a/sec(f*x+e))
Time = 0.09 (sec) , antiderivative size = 118, normalized size of antiderivative = 2.51 \[ \int \frac {\sin (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\left [\frac {\sqrt {-\frac {b}{a}} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, a \sqrt {-\frac {b}{a}} \cos \left (f x + e\right ) - b}{a \cos \left (f x + e\right )^{2} + b}\right ) - 2 \, \cos \left (f x + e\right )}{2 \, a f}, \frac {\sqrt {\frac {b}{a}} \arctan \left (\frac {a \sqrt {\frac {b}{a}} \cos \left (f x + e\right )}{b}\right ) - \cos \left (f x + e\right )}{a f}\right ] \] Input:
integrate(sin(f*x+e)/(a+b*sec(f*x+e)^2),x, algorithm="fricas")
Output:
[1/2*(sqrt(-b/a)*log(-(a*cos(f*x + e)^2 + 2*a*sqrt(-b/a)*cos(f*x + e) - b) /(a*cos(f*x + e)^2 + b)) - 2*cos(f*x + e))/(a*f), (sqrt(b/a)*arctan(a*sqrt (b/a)*cos(f*x + e)/b) - cos(f*x + e))/(a*f)]
\[ \int \frac {\sin (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\int \frac {\sin {\left (e + f x \right )}}{a + b \sec ^{2}{\left (e + f x \right )}}\, dx \] Input:
integrate(sin(f*x+e)/(a+b*sec(f*x+e)**2),x)
Output:
Integral(sin(e + f*x)/(a + b*sec(e + f*x)**2), x)
Time = 0.11 (sec) , antiderivative size = 40, normalized size of antiderivative = 0.85 \[ \int \frac {\sin (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\frac {b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a} - \frac {\cos \left (f x + e\right )}{a}}{f} \] Input:
integrate(sin(f*x+e)/(a+b*sec(f*x+e)^2),x, algorithm="maxima")
Output:
(b*arctan(a*cos(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a) - cos(f*x + e)/a)/f
Time = 0.14 (sec) , antiderivative size = 42, normalized size of antiderivative = 0.89 \[ \int \frac {\sin (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {b \arctan \left (\frac {a \cos \left (f x + e\right )}{\sqrt {a b}}\right )}{\sqrt {a b} a f} - \frac {\cos \left (f x + e\right )}{a f} \] Input:
integrate(sin(f*x+e)/(a+b*sec(f*x+e)^2),x, algorithm="giac")
Output:
b*arctan(a*cos(f*x + e)/sqrt(a*b))/(sqrt(a*b)*a*f) - cos(f*x + e)/(a*f)
Time = 12.40 (sec) , antiderivative size = 39, normalized size of antiderivative = 0.83 \[ \int \frac {\sin (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {\sqrt {b}\,\mathrm {atan}\left (\frac {\sqrt {a}\,\cos \left (e+f\,x\right )}{\sqrt {b}}\right )}{a^{3/2}\,f}-\frac {\cos \left (e+f\,x\right )}{a\,f} \] Input:
int(sin(e + f*x)/(a + b/cos(e + f*x)^2),x)
Output:
(b^(1/2)*atan((a^(1/2)*cos(e + f*x))/b^(1/2)))/(a^(3/2)*f) - cos(e + f*x)/ (a*f)
Time = 0.16 (sec) , antiderivative size = 76, normalized size of antiderivative = 1.62 \[ \int \frac {\sin (e+f x)}{a+b \sec ^2(e+f x)} \, dx=\frac {-\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a +b}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\sqrt {a}}{\sqrt {b}}\right )+\sqrt {b}\, \sqrt {a}\, \mathit {atan} \left (\frac {\sqrt {a +b}\, \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+\sqrt {a}}{\sqrt {b}}\right )-\cos \left (f x +e \right ) a}{a^{2} f} \] Input:
int(sin(f*x+e)/(a+b*sec(f*x+e)^2),x)
Output:
( - sqrt(b)*sqrt(a)*atan((sqrt(a + b)*tan((e + f*x)/2) - sqrt(a))/sqrt(b)) + sqrt(b)*sqrt(a)*atan((sqrt(a + b)*tan((e + f*x)/2) + sqrt(a))/sqrt(b)) - cos(e + f*x)*a)/(a**2*f)