Integrand size = 31, antiderivative size = 186 \[ \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx=\frac {2 b \left (a b c-2 a^2 d+b^2 d\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{3/2} (a+b)^{3/2} (b c-a d)^2 f}+\frac {2 d^2 \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{\sqrt {c-d} \sqrt {c+d} (b c-a d)^2 f}-\frac {b^2 \sin (e+f x)}{\left (a^2-b^2\right ) (b c-a d) f (b+a \cos (e+f x))} \] Output:
2*b*(-2*a^2*d+a*b*c+b^2*d)*arctanh((a-b)^(1/2)*tan(1/2*f*x+1/2*e)/(a+b)^(1 /2))/(a-b)^(3/2)/(a+b)^(3/2)/(-a*d+b*c)^2/f+2*d^2*arctanh((c-d)^(1/2)*tan( 1/2*f*x+1/2*e)/(c+d)^(1/2))/(c-d)^(1/2)/(c+d)^(1/2)/(-a*d+b*c)^2/f-b^2*sin (f*x+e)/(a^2-b^2)/(-a*d+b*c)/f/(b+a*cos(f*x+e))
Time = 1.46 (sec) , antiderivative size = 176, normalized size of antiderivative = 0.95 \[ \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx=\frac {\frac {2 b \left (a b c-2 a^2 d+b^2 d\right ) \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {2 \left (a^2-b^2\right ) d^2 \text {arctanh}\left (\frac {(-c+d) \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c^2-d^2}}\right )}{\sqrt {c^2-d^2}}+\frac {b^2 (b c-a d) \sin (e+f x)}{b+a \cos (e+f x)}}{(-a+b) (a+b) (b c-a d)^2 f} \] Input:
Integrate[Sec[e + f*x]/((a + b*Sec[e + f*x])^2*(c + d*Sec[e + f*x])),x]
Output:
((2*b*(a*b*c - 2*a^2*d + b^2*d)*ArcTanh[((-a + b)*Tan[(e + f*x)/2])/Sqrt[a ^2 - b^2]])/Sqrt[a^2 - b^2] + (2*(a^2 - b^2)*d^2*ArcTanh[((-c + d)*Tan[(e + f*x)/2])/Sqrt[c^2 - d^2]])/Sqrt[c^2 - d^2] + (b^2*(b*c - a*d)*Sin[e + f* x])/(b + a*Cos[e + f*x]))/((-a + b)*(a + b)*(b*c - a*d)^2*f)
Time = 0.95 (sec) , antiderivative size = 218, normalized size of antiderivative = 1.17, number of steps used = 11, number of rules used = 10, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.323, Rules used = {3042, 4476, 3042, 3535, 25, 3042, 3480, 3042, 3138, 221}
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 {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right )}{\left (a+b \csc \left (e+f x+\frac {\pi }{2}\right )\right )^2 \left (c+d \csc \left (e+f x+\frac {\pi }{2}\right )\right )}dx\) |
\(\Big \downarrow \) 4476 |
\(\displaystyle \int \frac {\cos ^2(e+f x)}{(a \cos (e+f x)+b)^2 (c \cos (e+f x)+d)}dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\sin \left (e+f x+\frac {\pi }{2}\right )^2}{\left (a \sin \left (e+f x+\frac {\pi }{2}\right )+b\right )^2 \left (c \sin \left (e+f x+\frac {\pi }{2}\right )+d\right )}dx\) |
\(\Big \downarrow \) 3535 |
\(\displaystyle -\frac {\int -\frac {a b d+\left (-d a^2+b c a+b^2 d\right ) \cos (e+f x)}{(b+a \cos (e+f x)) (d+c \cos (e+f x))}dx}{\left (a^2-b^2\right ) (b c-a d)}-\frac {b^2 \sin (e+f x)}{f \left (a^2-b^2\right ) (b c-a d) (a \cos (e+f x)+b)}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {\int \frac {a b d+\left (-d a^2+b c a+b^2 d\right ) \cos (e+f x)}{(b+a \cos (e+f x)) (d+c \cos (e+f x))}dx}{\left (a^2-b^2\right ) (b c-a d)}-\frac {b^2 \sin (e+f x)}{f \left (a^2-b^2\right ) (b c-a d) (a \cos (e+f x)+b)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int \frac {a b d+\left (-d a^2+b c a+b^2 d\right ) \sin \left (e+f x+\frac {\pi }{2}\right )}{\left (b+a \sin \left (e+f x+\frac {\pi }{2}\right )\right ) \left (d+c \sin \left (e+f x+\frac {\pi }{2}\right )\right )}dx}{\left (a^2-b^2\right ) (b c-a d)}-\frac {b^2 \sin (e+f x)}{f \left (a^2-b^2\right ) (b c-a d) (a \cos (e+f x)+b)}\) |
\(\Big \downarrow \) 3480 |
\(\displaystyle \frac {\frac {d^2 \left (a^2-b^2\right ) \int \frac {1}{d+c \cos (e+f x)}dx}{b c-a d}+\frac {b \left (-2 a^2 d+a b c+b^2 d\right ) \int \frac {1}{b+a \cos (e+f x)}dx}{b c-a d}}{\left (a^2-b^2\right ) (b c-a d)}-\frac {b^2 \sin (e+f x)}{f \left (a^2-b^2\right ) (b c-a d) (a \cos (e+f x)+b)}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {d^2 \left (a^2-b^2\right ) \int \frac {1}{d+c \sin \left (e+f x+\frac {\pi }{2}\right )}dx}{b c-a d}+\frac {b \left (-2 a^2 d+a b c+b^2 d\right ) \int \frac {1}{b+a \sin \left (e+f x+\frac {\pi }{2}\right )}dx}{b c-a d}}{\left (a^2-b^2\right ) (b c-a d)}-\frac {b^2 \sin (e+f x)}{f \left (a^2-b^2\right ) (b c-a d) (a \cos (e+f x)+b)}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {\frac {2 d^2 \left (a^2-b^2\right ) \int \frac {1}{-\left ((c-d) \tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+c+d}d\tan \left (\frac {1}{2} (e+f x)\right )}{f (b c-a d)}+\frac {2 b \left (-2 a^2 d+a b c+b^2 d\right ) \int \frac {1}{-\left ((a-b) \tan ^2\left (\frac {1}{2} (e+f x)\right )\right )+a+b}d\tan \left (\frac {1}{2} (e+f x)\right )}{f (b c-a d)}}{\left (a^2-b^2\right ) (b c-a d)}-\frac {b^2 \sin (e+f x)}{f \left (a^2-b^2\right ) (b c-a d) (a \cos (e+f x)+b)}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {\frac {2 d^2 \left (a^2-b^2\right ) \text {arctanh}\left (\frac {\sqrt {c-d} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {c+d}}\right )}{f \sqrt {c-d} \sqrt {c+d} (b c-a d)}+\frac {2 b \left (-2 a^2 d+a b c+b^2 d\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (e+f x)\right )}{\sqrt {a+b}}\right )}{f \sqrt {a-b} \sqrt {a+b} (b c-a d)}}{\left (a^2-b^2\right ) (b c-a d)}-\frac {b^2 \sin (e+f x)}{f \left (a^2-b^2\right ) (b c-a d) (a \cos (e+f x)+b)}\) |
Input:
Int[Sec[e + f*x]/((a + b*Sec[e + f*x])^2*(c + d*Sec[e + f*x])),x]
Output:
((2*b*(a*b*c - 2*a^2*d + b^2*d)*ArcTanh[(Sqrt[a - b]*Tan[(e + f*x)/2])/Sqr t[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*(b*c - a*d)*f) + (2*(a^2 - b^2)*d^2*Ar cTanh[(Sqrt[c - d]*Tan[(e + f*x)/2])/Sqrt[c + d]])/(Sqrt[c - d]*Sqrt[c + d ]*(b*c - a*d)*f))/((a^2 - b^2)*(b*c - a*d)) - (b^2*Sin[e + f*x])/((a^2 - b ^2)*(b*c - a*d)*f*(b + a*Cos[e + f*x]))
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x /Rt[-a/b, 2]], x] /; FreeQ[{a, b}, x] && NegQ[a/b]
Int[((a_) + (b_.)*sin[Pi/2 + (c_.) + (d_.)*(x_)])^(-1), x_Symbol] :> With[{ e = FreeFactors[Tan[(c + d*x)/2], x]}, Simp[2*(e/d) Subst[Int[1/(a + b + (a - b)*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_)])/(((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]
Int[((a_.) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)])^(n_)*((A_.) + (C_.)*sin[(e_.) + (f_.)*(x_)]^2), x_Symbol] :> Simp[(-(A*b^2 + a^2*C))*Cos[e + f*x]*(a + b*Sin[e + f*x])^(m + 1)*((c + d*S in[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*(m + 1)*(b*c - a*d)*(A + C) + d*(A*b^2 + a^2*C)*(m + n + 2) - (c*(A*b^2 + a^2*C) + b*(m + 1)*(b*c - a*d)*(A + C))*Sin[e + f*x] - d *(A*b^2 + a^2*C)*(m + n + 3)*Sin[e + f*x]^2, x], x], x] /; FreeQ[{a, b, c, d, e, f, A, C, n}, x] && NeQ[b*c - a*d, 0] && NeQ[a^2 - b^2, 0] && NeQ[c^2 - d^2, 0] && LtQ[m, -1] && ((EqQ[a, 0] && IntegerQ[m] && !IntegerQ[n]) || !(IntegerQ[2*n] && LtQ[n, -1] && ((IntegerQ[n] && !IntegerQ[m]) || EqQ[a, 0])))
Int[(csc[(e_.) + (f_.)*(x_)]*(g_.))^(p_.)*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(csc[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_), x_Symbol] :> Simp[1 /g^(m + n) Int[(g*Csc[e + f*x])^(m + n + p)*(b + a*Sin[e + f*x])^m*(d + c *Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, g, p}, x] && NeQ[b*c - a*d, 0] && IntegerQ[m] && IntegerQ[n]
Time = 0.93 (sec) , antiderivative size = 210, normalized size of antiderivative = 1.13
method | result | size |
derivativedivides | \(\frac {\frac {2 b \left (-\frac {b \left (a d -b c \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (a^{2}-b^{2}\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} b -a -b \right )}-\frac {\left (2 a^{2} d -a b c -d \,b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a +b \right ) \left (a -b \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a d -b c \right )^{2}}+\frac {2 d^{2} \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c -d \right ) \left (c +d \right )}}\right )}{\left (a d -b c \right )^{2} \sqrt {\left (c -d \right ) \left (c +d \right )}}}{f}\) | \(210\) |
default | \(\frac {\frac {2 b \left (-\frac {b \left (a d -b c \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\left (a^{2}-b^{2}\right ) \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} a -\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2} b -a -b \right )}-\frac {\left (2 a^{2} d -a b c -d \,b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a +b \right ) \left (a -b \right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a d -b c \right )^{2}}+\frac {2 d^{2} \operatorname {arctanh}\left (\frac {\left (c -d \right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{\sqrt {\left (c -d \right ) \left (c +d \right )}}\right )}{\left (a d -b c \right )^{2} \sqrt {\left (c -d \right ) \left (c +d \right )}}}{f}\) | \(210\) |
risch | \(\frac {2 i b^{2} \left (b \,{\mathrm e}^{i \left (f x +e \right )}+a \right )}{a \left (a^{2}-b^{2}\right ) \left (a d -b c \right ) f \left (a \,{\mathrm e}^{2 i \left (f x +e \right )}+2 b \,{\mathrm e}^{i \left (f x +e \right )}+a \right )}+\frac {d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i c^{2}-i d^{2}+d \sqrt {c^{2}-d^{2}}}{\sqrt {c^{2}-d^{2}}\, c}\right )}{\sqrt {c^{2}-d^{2}}\, \left (a d -b c \right )^{2} f}-\frac {d^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {-i c^{2}+i d^{2}+d \sqrt {c^{2}-d^{2}}}{c \sqrt {c^{2}-d^{2}}}\right )}{\sqrt {c^{2}-d^{2}}\, \left (a d -b c \right )^{2} f}+\frac {2 b \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{\sqrt {a^{2}-b^{2}}\, a}\right ) a^{2} d}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}-\frac {b^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{\sqrt {a^{2}-b^{2}}\, a}\right ) a c}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}-\frac {b^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}-\frac {i a^{2}-i b^{2}-\sqrt {a^{2}-b^{2}}\, b}{\sqrt {a^{2}-b^{2}}\, a}\right ) d}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}-\frac {2 b \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{\sqrt {a^{2}-b^{2}}\, a}\right ) a^{2} d}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}+\frac {b^{2} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{\sqrt {a^{2}-b^{2}}\, a}\right ) a c}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}+\frac {b^{3} \ln \left ({\mathrm e}^{i \left (f x +e \right )}+\frac {i a^{2}-i b^{2}+\sqrt {a^{2}-b^{2}}\, b}{\sqrt {a^{2}-b^{2}}\, a}\right ) d}{\sqrt {a^{2}-b^{2}}\, \left (a d -b c \right )^{2} \left (a +b \right ) \left (a -b \right ) f}\) | \(808\) |
Input:
int(sec(f*x+e)/(a+b*sec(f*x+e))^2/(c+d*sec(f*x+e)),x,method=_RETURNVERBOSE )
Output:
1/f*(2*b/(a*d-b*c)^2*(-b*(a*d-b*c)/(a^2-b^2)*tan(1/2*f*x+1/2*e)/(tan(1/2*f *x+1/2*e)^2*a-tan(1/2*f*x+1/2*e)^2*b-a-b)-(2*a^2*d-a*b*c-b^2*d)/(a+b)/(a-b )/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tan(1/2*f*x+1/2*e)/((a+b)*(a-b))^(1/2) ))+2*d^2/(a*d-b*c)^2/((c-d)*(c+d))^(1/2)*arctanh((c-d)*tan(1/2*f*x+1/2*e)/ ((c-d)*(c+d))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 655 vs. \(2 (168) = 336\).
Time = 58.93 (sec) , antiderivative size = 2852, normalized size of antiderivative = 15.33 \[ \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx=\text {Too large to display} \] Input:
integrate(sec(f*x+e)/(a+b*sec(f*x+e))^2/(c+d*sec(f*x+e)),x, algorithm="fri cas")
Output:
[-1/2*((a*b^3*c^3 - a*b^3*c*d^2 - (2*a^2*b^2 - b^4)*c^2*d + (2*a^2*b^2 - b ^4)*d^3 + (a^2*b^2*c^3 - a^2*b^2*c*d^2 - (2*a^3*b - a*b^3)*c^2*d + (2*a^3* b - a*b^3)*d^3)*cos(f*x + e))*sqrt(a^2 - b^2)*log((2*a*b*cos(f*x + e) - (a ^2 - 2*b^2)*cos(f*x + e)^2 - 2*sqrt(a^2 - b^2)*(b*cos(f*x + e) + a)*sin(f* x + e) + 2*a^2 - b^2)/(a^2*cos(f*x + e)^2 + 2*a*b*cos(f*x + e) + b^2)) - ( (a^5 - 2*a^3*b^2 + a*b^4)*d^2*cos(f*x + e) + (a^4*b - 2*a^2*b^3 + b^5)*d^2 )*sqrt(c^2 - d^2)*log((2*c*d*cos(f*x + e) - (c^2 - 2*d^2)*cos(f*x + e)^2 + 2*sqrt(c^2 - d^2)*(d*cos(f*x + e) + c)*sin(f*x + e) + 2*c^2 - d^2)/(c^2*c os(f*x + e)^2 + 2*c*d*cos(f*x + e) + d^2)) + 2*((a^2*b^3 - b^5)*c^3 - (a^3 *b^2 - a*b^4)*c^2*d - (a^2*b^3 - b^5)*c*d^2 + (a^3*b^2 - a*b^4)*d^3)*sin(f *x + e))/(((a^5*b^2 - 2*a^3*b^4 + a*b^6)*c^4 - 2*(a^6*b - 2*a^4*b^3 + a^2* b^5)*c^3*d + (a^7 - 3*a^5*b^2 + 3*a^3*b^4 - a*b^6)*c^2*d^2 + 2*(a^6*b - 2* a^4*b^3 + a^2*b^5)*c*d^3 - (a^7 - 2*a^5*b^2 + a^3*b^4)*d^4)*f*cos(f*x + e) + ((a^4*b^3 - 2*a^2*b^5 + b^7)*c^4 - 2*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*c^3* d + (a^6*b - 3*a^4*b^3 + 3*a^2*b^5 - b^7)*c^2*d^2 + 2*(a^5*b^2 - 2*a^3*b^4 + a*b^6)*c*d^3 - (a^6*b - 2*a^4*b^3 + a^2*b^5)*d^4)*f), 1/2*(2*((a^5 - 2* a^3*b^2 + a*b^4)*d^2*cos(f*x + e) + (a^4*b - 2*a^2*b^3 + b^5)*d^2)*sqrt(-c ^2 + d^2)*arctan(-sqrt(-c^2 + d^2)*(d*cos(f*x + e) + c)/((c^2 - d^2)*sin(f *x + e))) - (a*b^3*c^3 - a*b^3*c*d^2 - (2*a^2*b^2 - b^4)*c^2*d + (2*a^2*b^ 2 - b^4)*d^3 + (a^2*b^2*c^3 - a^2*b^2*c*d^2 - (2*a^3*b - a*b^3)*c^2*d +...
\[ \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx=\int \frac {\sec {\left (e + f x \right )}}{\left (a + b \sec {\left (e + f x \right )}\right )^{2} \left (c + d \sec {\left (e + f x \right )}\right )}\, dx \] Input:
integrate(sec(f*x+e)/(a+b*sec(f*x+e))**2/(c+d*sec(f*x+e)),x)
Output:
Integral(sec(e + f*x)/((a + b*sec(e + f*x))**2*(c + d*sec(e + f*x))), x)
Exception generated. \[ \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(sec(f*x+e)/(a+b*sec(f*x+e))^2/(c+d*sec(f*x+e)),x, algorithm="max ima")
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*c^2-4*d^2>0)', see `assume?` f or more de
Time = 0.23 (sec) , antiderivative size = 330, normalized size of antiderivative = 1.77 \[ \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx=\frac {2 \, {\left (\frac {{\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (-2 \, c + 2 \, d\right ) + \arctan \left (-\frac {c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - d \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-c^{2} + d^{2}}}\right )\right )} d^{2}}{{\left (b^{2} c^{2} - 2 \, a b c d + a^{2} d^{2}\right )} \sqrt {-c^{2} + d^{2}}} + \frac {b^{2} \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{{\left (a^{2} b c - b^{3} c - a^{3} d + a b^{2} d\right )} {\left (a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2} - a - b\right )}} - \frac {{\left (a b^{2} c - 2 \, a^{2} b d + b^{3} d\right )} {\left (\pi \left \lfloor \frac {f x + e}{2 \, \pi } + \frac {1}{2} \right \rfloor \mathrm {sgn}\left (2 \, a - 2 \, b\right ) + \arctan \left (\frac {a \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - b \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}{\sqrt {-a^{2} + b^{2}}}\right )\right )}}{{\left (a^{2} b^{2} c^{2} - b^{4} c^{2} - 2 \, a^{3} b c d + 2 \, a b^{3} c d + a^{4} d^{2} - a^{2} b^{2} d^{2}\right )} \sqrt {-a^{2} + b^{2}}}\right )}}{f} \] Input:
integrate(sec(f*x+e)/(a+b*sec(f*x+e))^2/(c+d*sec(f*x+e)),x, algorithm="gia c")
Output:
2*((pi*floor(1/2*(f*x + e)/pi + 1/2)*sgn(-2*c + 2*d) + arctan(-(c*tan(1/2* f*x + 1/2*e) - d*tan(1/2*f*x + 1/2*e))/sqrt(-c^2 + d^2)))*d^2/((b^2*c^2 - 2*a*b*c*d + a^2*d^2)*sqrt(-c^2 + d^2)) + b^2*tan(1/2*f*x + 1/2*e)/((a^2*b* c - b^3*c - a^3*d + a*b^2*d)*(a*tan(1/2*f*x + 1/2*e)^2 - b*tan(1/2*f*x + 1 /2*e)^2 - a - b)) - (a*b^2*c - 2*a^2*b*d + b^3*d)*(pi*floor(1/2*(f*x + e)/ pi + 1/2)*sgn(2*a - 2*b) + arctan((a*tan(1/2*f*x + 1/2*e) - b*tan(1/2*f*x + 1/2*e))/sqrt(-a^2 + b^2)))/((a^2*b^2*c^2 - b^4*c^2 - 2*a^3*b*c*d + 2*a*b ^3*c*d + a^4*d^2 - a^2*b^2*d^2)*sqrt(-a^2 + b^2)))/f
Time = 24.92 (sec) , antiderivative size = 20827, normalized size of antiderivative = 111.97 \[ \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx=\text {Too large to display} \] Input:
int(1/(cos(e + f*x)*(a + b/cos(e + f*x))^2*(c + d/cos(e + f*x))),x)
Output:
(d^2*atan(((d^2*(c^2 - d^2)^(1/2)*((32*tan(e/2 + (f*x)/2)*(a^6*d^5 + 2*b^6 *d^5 - 2*a*b^5*d^5 - 2*a^5*b*d^5 - a^6*c*d^4 - 4*b^6*c*d^4 - a^2*b^4*c^5 - 5*a^2*b^4*d^5 + 4*a^3*b^3*d^5 + 3*a^4*b^2*d^5 + 3*b^6*c^2*d^3 - b^6*c^3*d ^2 - 6*a*b^5*c^2*d^3 + 6*a*b^5*c^3*d^2 + 13*a^2*b^4*c*d^4 + 3*a^2*b^4*c^4* d - 8*a^3*b^3*c*d^4 + 4*a^3*b^3*c^4*d - 11*a^4*b^2*c*d^4 - 11*a^2*b^4*c^2* d^3 + a^2*b^4*c^3*d^2 + 12*a^3*b^3*c^2*d^3 - 12*a^3*b^3*c^3*d^2 + 12*a^4*b ^2*c^2*d^3 - 4*a^4*b^2*c^3*d^2 + 4*a*b^5*c*d^4 - 2*a*b^5*c^4*d + 2*a^5*b*c *d^4))/(a^5*d^2 - b^5*c^2 - a*b^4*c^2 + a^4*b*d^2 + a^2*b^3*c^2 + a^3*b^2* c^2 - a^2*b^3*d^2 - a^3*b^2*d^2 + 2*a*b^4*c*d - 2*a^4*b*c*d + 2*a^2*b^3*c* d - 2*a^3*b^2*c*d) + (d^2*(c^2 - d^2)^(1/2)*((32*(a*b^8*c^7 - a^9*d^7 + 2* a^8*b*d^7 + 2*a^9*c*d^6 + b^9*c^6*d - a^2*b^7*c^7 - a^3*b^6*c^7 + a^4*b^5* c^7 + a^4*b^5*d^7 - 3*a^6*b^3*d^7 + a^7*b^2*d^7 - a^9*c^2*d^5 + b^9*c^4*d^ 3 - 2*b^9*c^5*d^2 - 4*a*b^8*c^3*d^4 + 8*a*b^8*c^4*d^3 - 3*a*b^8*c^5*d^2 - 5*a^2*b^7*c^6*d - 4*a^3*b^6*c*d^6 + 7*a^3*b^6*c^6*d - 2*a^4*b^5*c*d^6 + 4* a^4*b^5*c^6*d + 13*a^5*b^4*c*d^6 - 5*a^5*b^4*c^6*d + a^6*b^3*c*d^6 - 11*a^ 7*b^2*c*d^6 - 8*a^8*b*c^2*d^5 + 5*a^8*b*c^3*d^4 + 6*a^2*b^7*c^2*d^5 - 12*a ^2*b^7*c^3*d^4 - a^2*b^7*c^4*d^3 + 13*a^2*b^7*c^5*d^2 + 8*a^3*b^6*c^2*d^5 + 14*a^3*b^6*c^3*d^4 - 31*a^3*b^6*c^4*d^3 + 7*a^3*b^6*c^5*d^2 - 21*a^4*b^5 *c^2*d^5 + 34*a^4*b^5*c^3*d^4 + 4*a^4*b^5*c^4*d^3 - 21*a^4*b^5*c^5*d^2 - 1 6*a^5*b^4*c^2*d^5 - 21*a^5*b^4*c^3*d^4 + 33*a^5*b^4*c^4*d^3 - 4*a^5*b^4...
Time = 0.21 (sec) , antiderivative size = 1678, normalized size of antiderivative = 9.02 \[ \int \frac {\sec (e+f x)}{(a+b \sec (e+f x))^2 (c+d \sec (e+f x))} \, dx =\text {Too large to display} \] Input:
int(sec(f*x+e)/(a+b*sec(f*x+e))^2/(c+d*sec(f*x+e)),x)
Output:
( - 4*sqrt( - a**2 + b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/ sqrt( - a**2 + b**2))*cos(e + f*x)*a**3*b*c**2*d + 4*sqrt( - a**2 + b**2)* atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt( - a**2 + b**2))*cos(e + f*x)*a**3*b*d**3 + 2*sqrt( - a**2 + b**2)*atan((tan((e + f*x)/2)*a - ta n((e + f*x)/2)*b)/sqrt( - a**2 + b**2))*cos(e + f*x)*a**2*b**2*c**3 - 2*sq rt( - a**2 + b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt( - a**2 + b**2))*cos(e + f*x)*a**2*b**2*c*d**2 + 2*sqrt( - a**2 + b**2)*atan( (tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt( - a**2 + b**2))*cos(e + f* x)*a*b**3*c**2*d - 2*sqrt( - a**2 + b**2)*atan((tan((e + f*x)/2)*a - tan(( e + f*x)/2)*b)/sqrt( - a**2 + b**2))*cos(e + f*x)*a*b**3*d**3 - 4*sqrt( - a**2 + b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt( - a**2 + b**2))*a**2*b**2*c**2*d + 4*sqrt( - a**2 + b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt( - a**2 + b**2))*a**2*b**2*d**3 + 2*sqrt( - a* *2 + b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt( - a**2 + b **2))*a*b**3*c**3 - 2*sqrt( - a**2 + b**2)*atan((tan((e + f*x)/2)*a - tan( (e + f*x)/2)*b)/sqrt( - a**2 + b**2))*a*b**3*c*d**2 + 2*sqrt( - a**2 + b** 2)*atan((tan((e + f*x)/2)*a - tan((e + f*x)/2)*b)/sqrt( - a**2 + b**2))*b* *4*c**2*d - 2*sqrt( - a**2 + b**2)*atan((tan((e + f*x)/2)*a - tan((e + f*x )/2)*b)/sqrt( - a**2 + b**2))*b**4*d**3 + 2*sqrt( - c**2 + d**2)*atan((tan ((e + f*x)/2)*c - tan((e + f*x)/2)*d)/sqrt( - c**2 + d**2))*cos(e + f*x...