Integrand size = 11, antiderivative size = 156 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^4} \, dx=\frac {x}{b^4}-\frac {a \left (2 a^2-3 b^2\right ) \arctan \left (\frac {b+a \tan \left (\frac {x}{2}\right )}{\sqrt {a^2-b^2}}\right )}{b^4 \left (a^2-b^2\right )^{3/2}}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}+\frac {a \cos ^3(x)}{2 b \left (a^2-b^2\right ) (a+b \sin (x))^2}+\frac {\cos (x) \left (2 \left (a^2-b^2\right )+a b \sin (x)\right )}{2 b^3 \left (a^2-b^2\right ) (a+b \sin (x))} \]
x/b^4-a*(2*a^2-3*b^2)*arctan((b+a*tan(1/2*x))/(a^2-b^2)^(1/2))/b^4/(a^2-b^ 2)^(3/2)-1/3*cos(x)^3/b/(a+b*sin(x))^3+1/2*a*cos(x)^3/b/(a^2-b^2)/(a+b*sin (x))^2+1/2*cos(x)*(2*a^2-2*b^2+a*b*sin(x))/b^3/(a^2-b^2)/(a+b*sin(x))
Leaf count is larger than twice the leaf count of optimal. \(2661\) vs. \(2(156)=312\).
Time = 6.85 (sec) , antiderivative size = 2661, normalized size of antiderivative = 17.06 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^4} \, dx=\text {Result too large to show} \]
(Sec[x]*(a + b*Sin[x])^4*(-1/3*(b*(-(b/(a - b)) - (b*Sin[x])/(a - b))^(5/2 )*(b/(a + b) - (b*Sin[x])/(a + b))^(5/2))/(((a*b)/(a - b) - b^2/(a - b))*( (a*b)/(a + b) + b^2/(a + b))*(a + b*Sin[x])^3) - ((a*b^3*(-(b/(a - b)) - ( b*Sin[x])/(a - b))^(5/2)*(b/(a + b) - (b*Sin[x])/(a + b))^(5/2))/(2*(a^2 - b^2)*((a*b)/(a - b) - b^2/(a - b))*((a*b)/(a + b) + b^2/(a + b))*(a + b*S in[x])^2) - (-((((-3*a^2*b^5)/((a - b)^2*(a + b)^2) + (2*b^5*(3*a^2 - 2*b^ 2))/((a - b)^2*(a + b)^2))*(-(b/(a - b)) - (b*Sin[x])/(a - b))^(5/2)*(b/(a + b) - (b*Sin[x])/(a + b))^(5/2))/(((a*b)/(a - b) - b^2/(a - b))*((a*b)/( a + b) + b^2/(a + b))*(a + b*Sin[x]))) - ((16*Sqrt[2]*b^6*(3*a^2 - 4*b^2)* (-(b/(a - b)) - (b*Sin[x])/(a - b))^(5/2)*Sqrt[b/(a + b) - (b*Sin[x])/(a + b)]*(1 + ((a - b)*(-(b/(a - b)) - (b*Sin[x])/(a - b)))/(2*b))^(5/2)*((5*( 1/(2*(1 + ((a - b)*(-(b/(a - b)) - (b*Sin[x])/(a - b)))/(2*b))^2) + (1 + ( (a - b)*(-(b/(a - b)) - (b*Sin[x])/(a - b)))/(2*b))^(-1)))/8 - (15*b^3*((( a - b)*(-(b/(a - b)) - (b*Sin[x])/(a - b)))/b - ((a - b)^2*(-(b/(a - b)) - (b*Sin[x])/(a - b))^2)/(3*b^2) - (Sqrt[2]*Sqrt[a - b]*ArcSinh[(Sqrt[a - b ]*Sqrt[-(b/(a - b)) - (b*Sin[x])/(a - b)])/(Sqrt[2]*Sqrt[b])]*Sqrt[-(b/(a - b)) - (b*Sin[x])/(a - b)])/(Sqrt[b]*Sqrt[1 + ((a - b)*(-(b/(a - b)) - (b *Sin[x])/(a - b)))/(2*b)])))/(32*(a - b)^3*(-(b/(a - b)) - (b*Sin[x])/(a - b))^3*(1 + ((a - b)*(-(b/(a - b)) - (b*Sin[x])/(a - b)))/(2*b))^2)))/(5*( a - b)^2*(a + b)^4*Sqrt[((a + b)*(b/(a + b) - (b*Sin[x])/(a + b)))/b]) ...
Time = 0.83 (sec) , antiderivative size = 182, normalized size of antiderivative = 1.17, number of steps used = 16, number of rules used = 15, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 1.364, Rules used = {3042, 4891, 3042, 3172, 3042, 3343, 3042, 3342, 25, 3042, 3214, 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 \sec (x)+b \tan (x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {1}{(a \sec (x)+b \tan (x))^4}dx\) |
\(\Big \downarrow \) 4891 |
\(\displaystyle \int \frac {\cos ^4(x)}{(a+b \sin (x))^4}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\cos (x)^4}{(a+b \sin (x))^4}dx\) |
\(\Big \downarrow \) 3172 |
\(\displaystyle -\frac {\int \frac {\cos ^2(x) \sin (x)}{(a+b \sin (x))^3}dx}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {\int \frac {\cos (x)^2 \sin (x)}{(a+b \sin (x))^3}dx}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 3343 |
\(\displaystyle -\frac {-\frac {\int \frac {\cos ^2(x) (2 b+a \sin (x))}{(a+b \sin (x))^2}dx}{2 \left (a^2-b^2\right )}-\frac {a \cos ^3(x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))^2}}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {\int \frac {\cos (x)^2 (2 b+a \sin (x))}{(a+b \sin (x))^2}dx}{2 \left (a^2-b^2\right )}-\frac {a \cos ^3(x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))^2}}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 3342 |
\(\displaystyle -\frac {-\frac {\frac {\cos (x) \left (2 \left (a^2-b^2\right )+a b \sin (x)\right )}{b^2 (a+b \sin (x))}-\frac {\int -\frac {a b+2 \left (a^2-b^2\right ) \sin (x)}{a+b \sin (x)}dx}{b^2}}{2 \left (a^2-b^2\right )}-\frac {a \cos ^3(x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))^2}}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle -\frac {-\frac {\frac {\int \frac {a b+2 \left (a^2-b^2\right ) \sin (x)}{a+b \sin (x)}dx}{b^2}+\frac {\cos (x) \left (2 \left (a^2-b^2\right )+a b \sin (x)\right )}{b^2 (a+b \sin (x))}}{2 \left (a^2-b^2\right )}-\frac {a \cos ^3(x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))^2}}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {\frac {\int \frac {a b+2 \left (a^2-b^2\right ) \sin (x)}{a+b \sin (x)}dx}{b^2}+\frac {\cos (x) \left (2 \left (a^2-b^2\right )+a b \sin (x)\right )}{b^2 (a+b \sin (x))}}{2 \left (a^2-b^2\right )}-\frac {a \cos ^3(x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))^2}}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 3214 |
\(\displaystyle -\frac {-\frac {\frac {\frac {2 x \left (a^2-b^2\right )}{b}-\frac {a \left (2 a^2-3 b^2\right ) \int \frac {1}{a+b \sin (x)}dx}{b}}{b^2}+\frac {\cos (x) \left (2 \left (a^2-b^2\right )+a b \sin (x)\right )}{b^2 (a+b \sin (x))}}{2 \left (a^2-b^2\right )}-\frac {a \cos ^3(x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))^2}}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {-\frac {\frac {\frac {2 x \left (a^2-b^2\right )}{b}-\frac {a \left (2 a^2-3 b^2\right ) \int \frac {1}{a+b \sin (x)}dx}{b}}{b^2}+\frac {\cos (x) \left (2 \left (a^2-b^2\right )+a b \sin (x)\right )}{b^2 (a+b \sin (x))}}{2 \left (a^2-b^2\right )}-\frac {a \cos ^3(x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))^2}}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 3139 |
\(\displaystyle -\frac {-\frac {\frac {\frac {2 x \left (a^2-b^2\right )}{b}-\frac {2 a \left (2 a^2-3 b^2\right ) \int \frac {1}{a \tan ^2\left (\frac {x}{2}\right )+2 b \tan \left (\frac {x}{2}\right )+a}d\tan \left (\frac {x}{2}\right )}{b}}{b^2}+\frac {\cos (x) \left (2 \left (a^2-b^2\right )+a b \sin (x)\right )}{b^2 (a+b \sin (x))}}{2 \left (a^2-b^2\right )}-\frac {a \cos ^3(x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))^2}}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 1083 |
\(\displaystyle -\frac {-\frac {\frac {\frac {4 a \left (2 a^2-3 b^2\right ) \int \frac {1}{-\left (2 b+2 a \tan \left (\frac {x}{2}\right )\right )^2-4 \left (a^2-b^2\right )}d\left (2 b+2 a \tan \left (\frac {x}{2}\right )\right )}{b}+\frac {2 x \left (a^2-b^2\right )}{b}}{b^2}+\frac {\cos (x) \left (2 \left (a^2-b^2\right )+a b \sin (x)\right )}{b^2 (a+b \sin (x))}}{2 \left (a^2-b^2\right )}-\frac {a \cos ^3(x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))^2}}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
\(\Big \downarrow \) 217 |
\(\displaystyle -\frac {-\frac {\frac {\frac {2 x \left (a^2-b^2\right )}{b}-\frac {2 a \left (2 a^2-3 b^2\right ) \arctan \left (\frac {2 a \tan \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^2-b^2}}\right )}{b \sqrt {a^2-b^2}}}{b^2}+\frac {\cos (x) \left (2 \left (a^2-b^2\right )+a b \sin (x)\right )}{b^2 (a+b \sin (x))}}{2 \left (a^2-b^2\right )}-\frac {a \cos ^3(x)}{2 \left (a^2-b^2\right ) (a+b \sin (x))^2}}{b}-\frac {\cos ^3(x)}{3 b (a+b \sin (x))^3}\) |
-1/3*Cos[x]^3/(b*(a + b*Sin[x])^3) - (-1/2*(a*Cos[x]^3)/((a^2 - b^2)*(a + b*Sin[x])^2) - (((2*(a^2 - b^2)*x)/b - (2*a*(2*a^2 - 3*b^2)*ArcTan[(2*b + 2*a*Tan[x/2])/(2*Sqrt[a^2 - b^2])])/(b*Sqrt[a^2 - b^2]))/b^2 + (Cos[x]*(2* (a^2 - b^2) + a*b*Sin[x]))/(b^2*(a + b*Sin[x])))/(2*(a^2 - b^2)))/b
3.3.71.3.1 Defintions of rubi rules used
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[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_), x_Symbol] :> Simp[g*(g*Cos[e + f*x])^(p - 1)*((a + b*Sin[e + f*x ])^(m + 1)/(b*f*(m + 1))), x] + Simp[g^2*((p - 1)/(b*(m + 1))) Int[(g*Cos [e + f*x])^(p - 2)*(a + b*Sin[e + f*x])^(m + 1)*Sin[e + f*x], x], x] /; Fre eQ[{a, b, e, f, g}, x] && NeQ[a^2 - b^2, 0] && LtQ[m, -1] && GtQ[p, 1] && I ntegersQ[2*m, 2*p]
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[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[g*(g*C os[e + f*x])^(p - 1)*(a + b*Sin[e + f*x])^(m + 1)*((b*c*(m + p + 1) - a*d*p + b*d*(m + 1)*Sin[e + f*x])/(b^2*f*(m + 1)*(m + p + 1))), x] + Simp[g^2*(( p - 1)/(b^2*(m + 1)*(m + p + 1))) Int[(g*Cos[e + f*x])^(p - 2)*(a + b*Sin [e + f*x])^(m + 1)*Simp[b*d*(m + 1) + (b*c*(m + p + 1) - a*d*p)*Sin[e + f*x ], x], x], x] /; FreeQ[{a, b, c, d, e, f, g}, x] && NeQ[a^2 - b^2, 0] && Lt Q[m, -1] && GtQ[p, 1] && NeQ[m + p + 1, 0] && IntegerQ[2*m]
Int[(cos[(e_.) + (f_.)*(x_)]*(g_.))^(p_)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x _)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> Simp[(-(b*c - a*d))*(g*Cos[e + f*x])^(p + 1)*((a + b*Sin[e + f*x])^(m + 1)/(f*g*(a^2 - b^2)*(m + 1))), x] + Simp[1/((a^2 - b^2)*(m + 1)) Int[(g*Cos[e + f*x])^p *(a + b*Sin[e + f*x])^(m + 1)*Simp[(a*c - b*d)*(m + 1) - (b*c - a*d)*(m + p + 2)*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ [a^2 - b^2, 0] && LtQ[m, -1] && IntegerQ[2*m]
Int[(u_.)*((b_.)*sec[(c_.) + (d_.)*(x_)]^(n_.) + (a_.)*tan[(c_.) + (d_.)*(x _)]^(n_.))^(p_), x_Symbol] :> Int[ActivateTrig[u]*Sec[c + d*x]^(n*p)*(b + a *Sin[c + d*x]^n)^p, x] /; FreeQ[{a, b, c, d}, x] && IntegersQ[n, p]
Leaf count of result is larger than twice the leaf count of optimal. \(357\) vs. \(2(143)=286\).
Time = 28.20 (sec) , antiderivative size = 358, normalized size of antiderivative = 2.29
method | result | size |
default | \(\frac {2 \arctan \left (\tan \left (\frac {x}{2}\right )\right )}{b^{4}}-\frac {2 \left (\frac {-\frac {b^{2} \left (a^{4}-2 a^{2} b^{2}+2 b^{4}\right ) \tan \left (\frac {x}{2}\right )^{5}}{2 a \left (a^{2}-b^{2}\right )}-\frac {b \left (2 a^{6}+3 a^{4} b^{2}-4 a^{2} b^{4}+4 b^{6}\right ) \tan \left (\frac {x}{2}\right )^{4}}{2 \left (a^{2}-b^{2}\right ) a^{2}}-\frac {b^{2} \left (18 a^{6}-3 a^{4} b^{2}-4 a^{2} b^{4}+4 b^{6}\right ) \tan \left (\frac {x}{2}\right )^{3}}{3 a^{3} \left (a^{2}-b^{2}\right )}-\frac {b \left (2 a^{6}+8 a^{4} b^{2}-7 a^{2} b^{4}+2 b^{6}\right ) \tan \left (\frac {x}{2}\right )^{2}}{\left (a^{2}-b^{2}\right ) a^{2}}-\frac {b^{2} \left (11 a^{4}-8 a^{2} b^{2}+2 b^{4}\right ) \tan \left (\frac {x}{2}\right )}{2 a \left (a^{2}-b^{2}\right )}-\frac {\left (6 a^{4}-5 a^{2} b^{2}+2 b^{4}\right ) b}{6 \left (a^{2}-b^{2}\right )}}{\left (\tan \left (\frac {x}{2}\right )^{2} a +2 b \tan \left (\frac {x}{2}\right )+a \right )^{3}}+\frac {a \left (2 a^{2}-3 b^{2}\right ) \arctan \left (\frac {2 a \tan \left (\frac {x}{2}\right )+2 b}{2 \sqrt {a^{2}-b^{2}}}\right )}{2 \left (a^{2}-b^{2}\right )^{\frac {3}{2}}}\right )}{b^{4}}\) | \(358\) |
risch | \(\frac {x}{b^{4}}-\frac {i \left (-54 i b \,a^{4} {\mathrm e}^{4 i x}+27 i b^{3} a^{2} {\mathrm e}^{4 i x}+12 i b^{5} {\mathrm e}^{4 i x}-18 b^{2} a^{3} {\mathrm e}^{5 i x}+15 b^{4} a \,{\mathrm e}^{5 i x}+78 i a^{4} b \,{\mathrm e}^{2 i x}-36 i a^{2} b^{3} {\mathrm e}^{2 i x}-12 i b^{5} {\mathrm e}^{2 i x}+44 a^{5} {\mathrm e}^{3 i x}+34 a^{3} b^{2} {\mathrm e}^{3 i x}-48 a \,b^{4} {\mathrm e}^{3 i x}-11 i a^{2} b^{3}+8 i b^{5}-48 a^{3} b^{2} {\mathrm e}^{i x}+33 a \,b^{4} {\mathrm e}^{i x}\right )}{3 \left (-i b \,{\mathrm e}^{2 i x}+i b +2 a \,{\mathrm e}^{i x}\right )^{3} \left (a^{2}-b^{2}\right ) b^{4}}-\frac {a^{3} \ln \left ({\mathrm e}^{i x}+\frac {i a \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) b^{4}}+\frac {3 a \ln \left ({\mathrm e}^{i x}+\frac {i a \sqrt {-a^{2}+b^{2}}+a^{2}-b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right )}{2 \sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) b^{2}}+\frac {a^{3} \ln \left ({\mathrm e}^{i x}+\frac {i a \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right )}{\sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) b^{4}}-\frac {3 a \ln \left ({\mathrm e}^{i x}+\frac {i a \sqrt {-a^{2}+b^{2}}-a^{2}+b^{2}}{\sqrt {-a^{2}+b^{2}}\, b}\right )}{2 \sqrt {-a^{2}+b^{2}}\, \left (a +b \right ) \left (a -b \right ) b^{2}}\) | \(523\) |
2/b^4*arctan(tan(1/2*x))-2/b^4*((-1/2*b^2*(a^4-2*a^2*b^2+2*b^4)/a/(a^2-b^2 )*tan(1/2*x)^5-1/2*b*(2*a^6+3*a^4*b^2-4*a^2*b^4+4*b^6)/(a^2-b^2)/a^2*tan(1 /2*x)^4-1/3/a^3*b^2*(18*a^6-3*a^4*b^2-4*a^2*b^4+4*b^6)/(a^2-b^2)*tan(1/2*x )^3-b*(2*a^6+8*a^4*b^2-7*a^2*b^4+2*b^6)/(a^2-b^2)/a^2*tan(1/2*x)^2-1/2*b^2 *(11*a^4-8*a^2*b^2+2*b^4)/a/(a^2-b^2)*tan(1/2*x)-1/6*(6*a^4-5*a^2*b^2+2*b^ 4)*b/(a^2-b^2))/(tan(1/2*x)^2*a+2*b*tan(1/2*x)+a)^3+1/2*a*(2*a^2-3*b^2)/(a ^2-b^2)^(3/2)*arctan(1/2*(2*a*tan(1/2*x)+2*b)/(a^2-b^2)^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 433 vs. \(2 (143) = 286\).
Time = 0.32 (sec) , antiderivative size = 931, normalized size of antiderivative = 5.97 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^4} \, dx=\text {Too large to display} \]
[-1/12*(36*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*x*cos(x)^2 + 2*(11*a^4*b^3 - 19*a ^2*b^5 + 8*b^7)*cos(x)^3 + 3*(2*a^6 + 3*a^4*b^2 - 9*a^2*b^4 - 3*(2*a^4*b^2 - 3*a^2*b^4)*cos(x)^2 + (6*a^5*b - 7*a^3*b^3 - 3*a*b^5 - (2*a^3*b^3 - 3*a *b^5)*cos(x)^2)*sin(x))*sqrt(-a^2 + b^2)*log(-((2*a^2 - b^2)*cos(x)^2 - 2* a*b*sin(x) - a^2 - b^2 - 2*(a*cos(x)*sin(x) + b*cos(x))*sqrt(-a^2 + b^2))/ (b^2*cos(x)^2 - 2*a*b*sin(x) - a^2 - b^2)) - 12*(a^7 + a^5*b^2 - 5*a^3*b^4 + 3*a*b^6)*x - 12*(a^6*b - 2*a^2*b^5 + b^7)*cos(x) + 6*(2*(a^4*b^3 - 2*a^ 2*b^5 + b^7)*x*cos(x)^2 - 2*(3*a^6*b - 5*a^4*b^3 + a^2*b^5 + b^7)*x - (5*a ^5*b^2 - 8*a^3*b^4 + 3*a*b^6)*cos(x))*sin(x))/(a^7*b^4 + a^5*b^6 - 5*a^3*b ^8 + 3*a*b^10 - 3*(a^5*b^6 - 2*a^3*b^8 + a*b^10)*cos(x)^2 + (3*a^6*b^5 - 5 *a^4*b^7 + a^2*b^9 + b^11 - (a^4*b^7 - 2*a^2*b^9 + b^11)*cos(x)^2)*sin(x)) , -1/6*(18*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*x*cos(x)^2 + (11*a^4*b^3 - 19*a^2 *b^5 + 8*b^7)*cos(x)^3 - 3*(2*a^6 + 3*a^4*b^2 - 9*a^2*b^4 - 3*(2*a^4*b^2 - 3*a^2*b^4)*cos(x)^2 + (6*a^5*b - 7*a^3*b^3 - 3*a*b^5 - (2*a^3*b^3 - 3*a*b ^5)*cos(x)^2)*sin(x))*sqrt(a^2 - b^2)*arctan(-(a*sin(x) + b)/(sqrt(a^2 - b ^2)*cos(x))) - 6*(a^7 + a^5*b^2 - 5*a^3*b^4 + 3*a*b^6)*x - 6*(a^6*b - 2*a^ 2*b^5 + b^7)*cos(x) + 3*(2*(a^4*b^3 - 2*a^2*b^5 + b^7)*x*cos(x)^2 - 2*(3*a ^6*b - 5*a^4*b^3 + a^2*b^5 + b^7)*x - (5*a^5*b^2 - 8*a^3*b^4 + 3*a*b^6)*co s(x))*sin(x))/(a^7*b^4 + a^5*b^6 - 5*a^3*b^8 + 3*a*b^10 - 3*(a^5*b^6 - 2*a ^3*b^8 + a*b^10)*cos(x)^2 + (3*a^6*b^5 - 5*a^4*b^7 + a^2*b^9 + b^11 - (...
\[ \int \frac {1}{(a \sec (x)+b \tan (x))^4} \, dx=\int \frac {1}{\left (a \sec {\left (x \right )} + b \tan {\left (x \right )}\right )^{4}}\, dx \]
Exception generated. \[ \int \frac {1}{(a \sec (x)+b \tan (x))^4} \, dx=\text {Exception raised: ValueError} \]
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
Leaf count of result is larger than twice the leaf count of optimal. 369 vs. \(2 (143) = 286\).
Time = 0.28 (sec) , antiderivative size = 369, normalized size of antiderivative = 2.37 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^4} \, dx=-\frac {{\left (2 \, a^{3} - 3 \, a b^{2}\right )} {\left (\pi \left \lfloor \frac {x}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (a\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, x\right ) + b}{\sqrt {a^{2} - b^{2}}}\right )\right )}}{{\left (a^{2} b^{4} - b^{6}\right )} \sqrt {a^{2} - b^{2}}} + \frac {3 \, a^{6} b \tan \left (\frac {1}{2} \, x\right )^{5} - 6 \, a^{4} b^{3} \tan \left (\frac {1}{2} \, x\right )^{5} + 6 \, a^{2} b^{5} \tan \left (\frac {1}{2} \, x\right )^{5} + 6 \, a^{7} \tan \left (\frac {1}{2} \, x\right )^{4} + 9 \, a^{5} b^{2} \tan \left (\frac {1}{2} \, x\right )^{4} - 12 \, a^{3} b^{4} \tan \left (\frac {1}{2} \, x\right )^{4} + 12 \, a b^{6} \tan \left (\frac {1}{2} \, x\right )^{4} + 36 \, a^{6} b \tan \left (\frac {1}{2} \, x\right )^{3} - 6 \, a^{4} b^{3} \tan \left (\frac {1}{2} \, x\right )^{3} - 8 \, a^{2} b^{5} \tan \left (\frac {1}{2} \, x\right )^{3} + 8 \, b^{7} \tan \left (\frac {1}{2} \, x\right )^{3} + 12 \, a^{7} \tan \left (\frac {1}{2} \, x\right )^{2} + 48 \, a^{5} b^{2} \tan \left (\frac {1}{2} \, x\right )^{2} - 42 \, a^{3} b^{4} \tan \left (\frac {1}{2} \, x\right )^{2} + 12 \, a b^{6} \tan \left (\frac {1}{2} \, x\right )^{2} + 33 \, a^{6} b \tan \left (\frac {1}{2} \, x\right ) - 24 \, a^{4} b^{3} \tan \left (\frac {1}{2} \, x\right ) + 6 \, a^{2} b^{5} \tan \left (\frac {1}{2} \, x\right ) + 6 \, a^{7} - 5 \, a^{5} b^{2} + 2 \, a^{3} b^{4}}{3 \, {\left (a^{5} b^{3} - a^{3} b^{5}\right )} {\left (a \tan \left (\frac {1}{2} \, x\right )^{2} + 2 \, b \tan \left (\frac {1}{2} \, x\right ) + a\right )}^{3}} + \frac {x}{b^{4}} \]
-(2*a^3 - 3*a*b^2)*(pi*floor(1/2*x/pi + 1/2)*sgn(a) + arctan((a*tan(1/2*x) + b)/sqrt(a^2 - b^2)))/((a^2*b^4 - b^6)*sqrt(a^2 - b^2)) + 1/3*(3*a^6*b*t an(1/2*x)^5 - 6*a^4*b^3*tan(1/2*x)^5 + 6*a^2*b^5*tan(1/2*x)^5 + 6*a^7*tan( 1/2*x)^4 + 9*a^5*b^2*tan(1/2*x)^4 - 12*a^3*b^4*tan(1/2*x)^4 + 12*a*b^6*tan (1/2*x)^4 + 36*a^6*b*tan(1/2*x)^3 - 6*a^4*b^3*tan(1/2*x)^3 - 8*a^2*b^5*tan (1/2*x)^3 + 8*b^7*tan(1/2*x)^3 + 12*a^7*tan(1/2*x)^2 + 48*a^5*b^2*tan(1/2* x)^2 - 42*a^3*b^4*tan(1/2*x)^2 + 12*a*b^6*tan(1/2*x)^2 + 33*a^6*b*tan(1/2* x) - 24*a^4*b^3*tan(1/2*x) + 6*a^2*b^5*tan(1/2*x) + 6*a^7 - 5*a^5*b^2 + 2* a^3*b^4)/((a^5*b^3 - a^3*b^5)*(a*tan(1/2*x)^2 + 2*b*tan(1/2*x) + a)^3) + x /b^4
Time = 33.16 (sec) , antiderivative size = 2782, normalized size of antiderivative = 17.83 \[ \int \frac {1}{(a \sec (x)+b \tan (x))^4} \, dx=\text {Too large to display} \]
((6*a^4 + 2*b^4 - 5*a^2*b^2)/(3*b^3*(a^2 - b^2)) + (tan(x/2)*(11*a^4 + 2*b ^4 - 8*a^2*b^2))/(a*b^2*(a^2 - b^2)) + (tan(x/2)^5*(a^4 + 2*b^4 - 2*a^2*b^ 2))/(a*b^2*(a^2 - b^2)) + (tan(x/2)^4*(2*a^6 + 4*b^6 - 4*a^2*b^4 + 3*a^4*b ^2))/(a^2*b^3*(a^2 - b^2)) + (2*tan(x/2)^2*(2*a^6 + 2*b^6 - 7*a^2*b^4 + 8* a^4*b^2))/(a^2*b^3*(a^2 - b^2)) + (2*tan(x/2)^3*(3*a^2 + 2*b^2)*(6*a^4 + 2 *b^4 - 5*a^2*b^2))/(3*a^3*b^2*(a^2 - b^2)))/(tan(x/2)^2*(12*a*b^2 + 3*a^3) + tan(x/2)^4*(12*a*b^2 + 3*a^3) + tan(x/2)^3*(12*a^2*b + 8*b^3) + a^3 + a ^3*tan(x/2)^6 + 6*a^2*b*tan(x/2)^5 + 6*a^2*b*tan(x/2)) + (2*atan((48*a^3*b ^3*tan(x/2))/((176*a^3*b^15)/(b^12 - 2*a^2*b^10 + a^4*b^8) - (160*a^5*b^13 )/(b^12 - 2*a^2*b^10 + a^4*b^8) + (48*a^7*b^11)/(b^12 - 2*a^2*b^10 + a^4*b ^8) - (64*a*b^17)/(b^12 - 2*a^2*b^10 + a^4*b^8)) - (64*a*b^5*tan(x/2))/((1 76*a^3*b^15)/(b^12 - 2*a^2*b^10 + a^4*b^8) - (160*a^5*b^13)/(b^12 - 2*a^2* b^10 + a^4*b^8) + (48*a^7*b^11)/(b^12 - 2*a^2*b^10 + a^4*b^8) - (64*a*b^17 )/(b^12 - 2*a^2*b^10 + a^4*b^8))))/b^4 + (a*atan(((a*(2*a^2 - 3*b^2)*(-(a + b)^3*(a - b)^3)^(1/2)*((8*(4*a^2*b^7 - 8*a^4*b^5 + 4*a^6*b^3))/(b^12 - 2 *a^2*b^10 + a^4*b^8) + (8*tan(x/2)*(8*a*b^9 - 29*a^3*b^7 + 28*a^5*b^5 - 8* a^7*b^3))/(b^13 - 2*a^2*b^11 + a^4*b^9) - (a*(2*a^2 - 3*b^2)*(-(a + b)^3*( a - b)^3)^(1/2)*((8*(4*a*b^12 - 6*a^3*b^10 + 2*a^5*b^8))/(b^12 - 2*a^2*b^1 0 + a^4*b^8) + (8*tan(x/2)*(12*a^2*b^12 - 20*a^4*b^10 + 8*a^6*b^8))/(b^13 - 2*a^2*b^11 + a^4*b^9) - (a*((8*(4*a^2*b^15 - 8*a^4*b^13 + 4*a^6*b^11)...