Integrand size = 31, antiderivative size = 263 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=-\frac {\left (4 a^2 A b+A b^3-a^3 B-4 a b^2 B\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{(a-b)^{7/2} (a+b)^{7/2} d}+\frac {a (A b-a B) \tan (c+d x)}{3 b \left (a^2-b^2\right ) d (a+b \sec (c+d x))^3}+\frac {\left (2 a^2 A b+3 A b^3+a^3 B-6 a b^2 B\right ) \tan (c+d x)}{6 b \left (a^2-b^2\right )^2 d (a+b \sec (c+d x))^2}+\frac {\left (2 a^3 A b+13 a A b^3+a^4 B-10 a^2 b^2 B-6 b^4 B\right ) \tan (c+d x)}{6 b \left (a^2-b^2\right )^3 d (a+b \sec (c+d x))} \] Output:
-(4*A*a^2*b+A*b^3-B*a^3-4*B*a*b^2)*arctanh((a-b)^(1/2)*tan(1/2*d*x+1/2*c)/ (a+b)^(1/2))/(a-b)^(7/2)/(a+b)^(7/2)/d+1/3*a*(A*b-B*a)*tan(d*x+c)/b/(a^2-b ^2)/d/(a+b*sec(d*x+c))^3+1/6*(2*A*a^2*b+3*A*b^3+B*a^3-6*B*a*b^2)*tan(d*x+c )/b/(a^2-b^2)^2/d/(a+b*sec(d*x+c))^2+1/6*(2*A*a^3*b+13*A*a*b^3+B*a^4-10*B* a^2*b^2-6*B*b^4)*tan(d*x+c)/b/(a^2-b^2)^3/d/(a+b*sec(d*x+c))
Time = 1.32 (sec) , antiderivative size = 252, normalized size of antiderivative = 0.96 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\frac {\frac {24 \left (-4 a^2 A b-A b^3+a^3 B+4 a b^2 B\right ) \text {arctanh}\left (\frac {(-a+b) \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a^2-b^2}}\right )}{\sqrt {a^2-b^2}}+\frac {2 \left (-6 a^5 A-14 a^3 A b^2-25 a A b^4+11 a^4 b B+22 a^2 b^3 B+12 b^5 B-6 \left (2 a^4 A b+9 a^2 A b^3-A b^5+a^5 B-9 a^3 b^2 B-2 a b^4 B\right ) \cos (c+d x)+a \left (-6 a^4 A-10 a^2 A b^2+A b^4+13 a^3 b B+2 a b^3 B\right ) \cos (2 (c+d x))\right ) \sin (c+d x)}{(b+a \cos (c+d x))^3}}{24 \left (-a^2+b^2\right )^3 d} \] Input:
Integrate[(Sec[c + d*x]^2*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^4,x]
Output:
((24*(-4*a^2*A*b - A*b^3 + a^3*B + 4*a*b^2*B)*ArcTanh[((-a + b)*Tan[(c + d *x)/2])/Sqrt[a^2 - b^2]])/Sqrt[a^2 - b^2] + (2*(-6*a^5*A - 14*a^3*A*b^2 - 25*a*A*b^4 + 11*a^4*b*B + 22*a^2*b^3*B + 12*b^5*B - 6*(2*a^4*A*b + 9*a^2*A *b^3 - A*b^5 + a^5*B - 9*a^3*b^2*B - 2*a*b^4*B)*Cos[c + d*x] + a*(-6*a^4*A - 10*a^2*A*b^2 + A*b^4 + 13*a^3*b*B + 2*a*b^3*B)*Cos[2*(c + d*x)])*Sin[c + d*x])/(b + a*Cos[c + d*x])^3)/(24*(-a^2 + b^2)^3*d)
Time = 1.29 (sec) , antiderivative size = 302, normalized size of antiderivative = 1.15, number of steps used = 15, number of rules used = 14, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.452, Rules used = {3042, 4497, 25, 3042, 4491, 25, 3042, 4491, 27, 3042, 4318, 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 ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )^2 \left (A+B \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^4}dx\) |
\(\Big \downarrow \) 4497 |
\(\displaystyle \frac {\int -\frac {\sec (c+d x) \left (3 b (A b-a B)-\left (B a^2+2 A b a-3 b^2 B\right ) \sec (c+d x)\right )}{(a+b \sec (c+d x))^3}dx}{3 b \left (a^2-b^2\right )}+\frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\int \frac {\sec (c+d x) \left (3 b (A b-a B)-\left (B a^2+2 A b a-3 b^2 B\right ) \sec (c+d x)\right )}{(a+b \sec (c+d x))^3}dx}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (3 b (A b-a B)+\left (-B a^2-2 A b a+3 b^2 B\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^3}dx}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4491 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {-\frac {\int -\frac {\sec (c+d x) \left (2 b \left (-2 B a^2+5 A b a-3 b^2 B\right )-\left (B a^3+2 A b a^2-6 b^2 B a+3 A b^3\right ) \sec (c+d x)\right )}{(a+b \sec (c+d x))^2}dx}{2 \left (a^2-b^2\right )}-\frac {\left (a^3 B+2 a^2 A b-6 a b^2 B+3 A b^3\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\frac {\int \frac {\sec (c+d x) \left (2 b \left (-2 B a^2+5 A b a-3 b^2 B\right )-\left (B a^3+2 A b a^2-6 b^2 B a+3 A b^3\right ) \sec (c+d x)\right )}{(a+b \sec (c+d x))^2}dx}{2 \left (a^2-b^2\right )}-\frac {\left (a^3 B+2 a^2 A b-6 a b^2 B+3 A b^3\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\frac {\int \frac {\csc \left (c+d x+\frac {\pi }{2}\right ) \left (2 b \left (-2 B a^2+5 A b a-3 b^2 B\right )+\left (-B a^3-2 A b a^2+6 b^2 B a-3 A b^3\right ) \csc \left (c+d x+\frac {\pi }{2}\right )\right )}{\left (a+b \csc \left (c+d x+\frac {\pi }{2}\right )\right )^2}dx}{2 \left (a^2-b^2\right )}-\frac {\left (a^3 B+2 a^2 A b-6 a b^2 B+3 A b^3\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4491 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\frac {-\frac {\int -\frac {3 b \left (-B a^3+4 A b a^2-4 b^2 B a+A b^3\right ) \sec (c+d x)}{a+b \sec (c+d x)}dx}{a^2-b^2}-\frac {\left (a^4 B+2 a^3 A b-10 a^2 b^2 B+13 a A b^3-6 b^4 B\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {\left (a^3 B+2 a^2 A b-6 a b^2 B+3 A b^3\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 27 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\frac {\frac {3 b \left (a^3 (-B)+4 a^2 A b-4 a b^2 B+A b^3\right ) \int \frac {\sec (c+d x)}{a+b \sec (c+d x)}dx}{a^2-b^2}-\frac {\left (a^4 B+2 a^3 A b-10 a^2 b^2 B+13 a A b^3-6 b^4 B\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {\left (a^3 B+2 a^2 A b-6 a b^2 B+3 A b^3\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\frac {\frac {3 b \left (a^3 (-B)+4 a^2 A b-4 a b^2 B+A b^3\right ) \int \frac {\csc \left (c+d x+\frac {\pi }{2}\right )}{a+b \csc \left (c+d x+\frac {\pi }{2}\right )}dx}{a^2-b^2}-\frac {\left (a^4 B+2 a^3 A b-10 a^2 b^2 B+13 a A b^3-6 b^4 B\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {\left (a^3 B+2 a^2 A b-6 a b^2 B+3 A b^3\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 4318 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\frac {\frac {3 \left (a^3 (-B)+4 a^2 A b-4 a b^2 B+A b^3\right ) \int \frac {1}{\frac {a \cos (c+d x)}{b}+1}dx}{a^2-b^2}-\frac {\left (a^4 B+2 a^3 A b-10 a^2 b^2 B+13 a A b^3-6 b^4 B\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {\left (a^3 B+2 a^2 A b-6 a b^2 B+3 A b^3\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\frac {\frac {3 \left (a^3 (-B)+4 a^2 A b-4 a b^2 B+A b^3\right ) \int \frac {1}{\frac {a \sin \left (c+d x+\frac {\pi }{2}\right )}{b}+1}dx}{a^2-b^2}-\frac {\left (a^4 B+2 a^3 A b-10 a^2 b^2 B+13 a A b^3-6 b^4 B\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {\left (a^3 B+2 a^2 A b-6 a b^2 B+3 A b^3\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 3138 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\frac {\frac {6 \left (a^3 (-B)+4 a^2 A b-4 a b^2 B+A b^3\right ) \int \frac {1}{\left (1-\frac {a}{b}\right ) \tan ^2\left (\frac {1}{2} (c+d x)\right )+\frac {a+b}{b}}d\tan \left (\frac {1}{2} (c+d x)\right )}{d \left (a^2-b^2\right )}-\frac {\left (a^4 B+2 a^3 A b-10 a^2 b^2 B+13 a A b^3-6 b^4 B\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {\left (a^3 B+2 a^2 A b-6 a b^2 B+3 A b^3\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}\) |
\(\Big \downarrow \) 221 |
\(\displaystyle \frac {a (A b-a B) \tan (c+d x)}{3 b d \left (a^2-b^2\right ) (a+b \sec (c+d x))^3}-\frac {\frac {\frac {6 b \left (a^3 (-B)+4 a^2 A b-4 a b^2 B+A b^3\right ) \text {arctanh}\left (\frac {\sqrt {a-b} \tan \left (\frac {1}{2} (c+d x)\right )}{\sqrt {a+b}}\right )}{d \sqrt {a-b} \sqrt {a+b} \left (a^2-b^2\right )}-\frac {\left (a^4 B+2 a^3 A b-10 a^2 b^2 B+13 a A b^3-6 b^4 B\right ) \tan (c+d x)}{d \left (a^2-b^2\right ) (a+b \sec (c+d x))}}{2 \left (a^2-b^2\right )}-\frac {\left (a^3 B+2 a^2 A b-6 a b^2 B+3 A b^3\right ) \tan (c+d x)}{2 d \left (a^2-b^2\right ) (a+b \sec (c+d x))^2}}{3 b \left (a^2-b^2\right )}\) |
Input:
Int[(Sec[c + d*x]^2*(A + B*Sec[c + d*x]))/(a + b*Sec[c + d*x])^4,x]
Output:
(a*(A*b - a*B)*Tan[c + d*x])/(3*b*(a^2 - b^2)*d*(a + b*Sec[c + d*x])^3) - (-1/2*((2*a^2*A*b + 3*A*b^3 + a^3*B - 6*a*b^2*B)*Tan[c + d*x])/((a^2 - b^2 )*d*(a + b*Sec[c + d*x])^2) + ((6*b*(4*a^2*A*b + A*b^3 - a^3*B - 4*a*b^2*B )*ArcTanh[(Sqrt[a - b]*Tan[(c + d*x)/2])/Sqrt[a + b]])/(Sqrt[a - b]*Sqrt[a + b]*(a^2 - b^2)*d) - ((2*a^3*A*b + 13*a*A*b^3 + a^4*B - 10*a^2*b^2*B - 6 *b^4*B)*Tan[c + d*x])/((a^2 - b^2)*d*(a + b*Sec[c + d*x])))/(2*(a^2 - b^2) ))/(3*b*(a^2 - b^2))
Int[(a_)*(Fx_), x_Symbol] :> Simp[a Int[Fx, x], x] /; FreeQ[a, x] && !Ma tchQ[Fx, (b_)*(Gx_) /; FreeQ[b, 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[csc[(e_.) + (f_.)*(x_)]/(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_)), x_Symbo l] :> Simp[1/b Int[1/(1 + (a/b)*Sin[e + f*x]), x], x] /; FreeQ[{a, b, e, f}, x] && NeQ[a^2 - b^2, 0]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[(-(A*b - a*B))*Cot[e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(f*(m + 1)*(a^2 - b^2))), x] + Simp[1 /((m + 1)*(a^2 - b^2)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1)*Simp [(a*A - b*B)*(m + 1) - (A*b - a*B)*(m + 2)*Csc[e + f*x], x], x], x] /; Free Q[{a, b, A, B, e, f}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && LtQ[m , -1]
Int[csc[(e_.) + (f_.)*(x_)]^2*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*( csc[(e_.) + (f_.)*(x_)]*(B_.) + (A_)), x_Symbol] :> Simp[a*(A*b - a*B)*Cot[ e + f*x]*((a + b*Csc[e + f*x])^(m + 1)/(b*f*(m + 1)*(a^2 - b^2))), x] - Sim p[1/(b*(m + 1)*(a^2 - b^2)) Int[Csc[e + f*x]*(a + b*Csc[e + f*x])^(m + 1) *Simp[b*(A*b - a*B)*(m + 1) - (a*A*b*(m + 2) - B*(a^2 + b^2*(m + 1)))*Csc[e + f*x], x], x], x] /; FreeQ[{a, b, e, f, A, B}, x] && NeQ[A*b - a*B, 0] && NeQ[a^2 - b^2, 0] && LtQ[m, -1]
Time = 0.68 (sec) , antiderivative size = 388, normalized size of antiderivative = 1.48
method | result | size |
derivativedivides | \(\frac {\frac {-\frac {\left (2 a^{3} A +2 A \,a^{2} b +6 A a \,b^{2}+A \,b^{3}-B \,a^{3}-6 B \,a^{2} b -2 B a \,b^{2}-2 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{\left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {4 \left (3 a^{3} A +7 A a \,b^{2}-7 B \,a^{2} b -3 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a^{2}-2 a b +b^{2}\right )}-\frac {\left (2 a^{3} A -2 A \,a^{2} b +6 A a \,b^{2}-A \,b^{3}+B \,a^{3}-6 B \,a^{2} b +2 B a \,b^{2}-2 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{3}}-\frac {\left (4 A \,a^{2} b +A \,b^{3}-B \,a^{3}-4 B a \,b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) | \(388\) |
default | \(\frac {\frac {-\frac {\left (2 a^{3} A +2 A \,a^{2} b +6 A a \,b^{2}+A \,b^{3}-B \,a^{3}-6 B \,a^{2} b -2 B a \,b^{2}-2 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5}}{\left (a -b \right ) \left (a^{3}+3 a^{2} b +3 a \,b^{2}+b^{3}\right )}+\frac {4 \left (3 a^{3} A +7 A a \,b^{2}-7 B \,a^{2} b -3 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{3 \left (a^{2}+2 a b +b^{2}\right ) \left (a^{2}-2 a b +b^{2}\right )}-\frac {\left (2 a^{3} A -2 A \,a^{2} b +6 A a \,b^{2}-A \,b^{3}+B \,a^{3}-6 B \,a^{2} b +2 B a \,b^{2}-2 B \,b^{3}\right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\left (a +b \right ) \left (a^{3}-3 a^{2} b +3 a \,b^{2}-b^{3}\right )}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} b -a -b \right )^{3}}-\frac {\left (4 A \,a^{2} b +A \,b^{3}-B \,a^{3}-4 B a \,b^{2}\right ) \operatorname {arctanh}\left (\frac {\left (a -b \right ) \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{\sqrt {\left (a +b \right ) \left (a -b \right )}}\right )}{\left (a^{6}-3 a^{4} b^{2}+3 a^{2} b^{4}-b^{6}\right ) \sqrt {\left (a +b \right ) \left (a -b \right )}}}{d}\) | \(388\) |
risch | \(\text {Expression too large to display}\) | \(1274\) |
Input:
int(sec(d*x+c)^2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x,method=_RETURNVERBO SE)
Output:
1/d*(2*(-1/2*(2*A*a^3+2*A*a^2*b+6*A*a*b^2+A*b^3-B*a^3-6*B*a^2*b-2*B*a*b^2- 2*B*b^3)/(a-b)/(a^3+3*a^2*b+3*a*b^2+b^3)*tan(1/2*d*x+1/2*c)^5+2/3*(3*A*a^3 +7*A*a*b^2-7*B*a^2*b-3*B*b^3)/(a^2+2*a*b+b^2)/(a^2-2*a*b+b^2)*tan(1/2*d*x+ 1/2*c)^3-1/2*(2*A*a^3-2*A*a^2*b+6*A*a*b^2-A*b^3+B*a^3-6*B*a^2*b+2*B*a*b^2- 2*B*b^3)/(a+b)/(a^3-3*a^2*b+3*a*b^2-b^3)*tan(1/2*d*x+1/2*c))/(tan(1/2*d*x+ 1/2*c)^2*a-tan(1/2*d*x+1/2*c)^2*b-a-b)^3-(4*A*a^2*b+A*b^3-B*a^3-4*B*a*b^2) /(a^6-3*a^4*b^2+3*a^2*b^4-b^6)/((a+b)*(a-b))^(1/2)*arctanh((a-b)*tan(1/2*d *x+1/2*c)/((a+b)*(a-b))^(1/2)))
Leaf count of result is larger than twice the leaf count of optimal. 592 vs. \(2 (247) = 494\).
Time = 0.16 (sec) , antiderivative size = 1242, normalized size of antiderivative = 4.72 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\text {Too large to display} \] Input:
integrate(sec(d*x+c)^2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x, algorithm="f ricas")
Output:
[1/12*(3*(B*a^3*b^3 - 4*A*a^2*b^4 + 4*B*a*b^5 - A*b^6 + (B*a^6 - 4*A*a^5*b + 4*B*a^4*b^2 - A*a^3*b^3)*cos(d*x + c)^3 + 3*(B*a^5*b - 4*A*a^4*b^2 + 4* B*a^3*b^3 - A*a^2*b^4)*cos(d*x + c)^2 + 3*(B*a^4*b^2 - 4*A*a^3*b^3 + 4*B*a ^2*b^4 - A*a*b^5)*cos(d*x + c))*sqrt(a^2 - b^2)*log((2*a*b*cos(d*x + c) - (a^2 - 2*b^2)*cos(d*x + c)^2 + 2*sqrt(a^2 - b^2)*(b*cos(d*x + c) + a)*sin( d*x + c) + 2*a^2 - b^2)/(a^2*cos(d*x + c)^2 + 2*a*b*cos(d*x + c) + b^2)) + 2*(B*a^6*b + 2*A*a^5*b^2 - 11*B*a^4*b^3 + 11*A*a^3*b^4 + 4*B*a^2*b^5 - 13 *A*a*b^6 + 6*B*b^7 + (6*A*a^7 - 13*B*a^6*b + 4*A*a^5*b^2 + 11*B*a^4*b^3 - 11*A*a^3*b^4 + 2*B*a^2*b^5 + A*a*b^6)*cos(d*x + c)^2 + 3*(B*a^7 + 2*A*a^6* b - 10*B*a^5*b^2 + 7*A*a^4*b^3 + 7*B*a^3*b^4 - 10*A*a^2*b^5 + 2*B*a*b^6 + A*b^7)*cos(d*x + c))*sin(d*x + c))/((a^11 - 4*a^9*b^2 + 6*a^7*b^4 - 4*a^5* b^6 + a^3*b^8)*d*cos(d*x + c)^3 + 3*(a^10*b - 4*a^8*b^3 + 6*a^6*b^5 - 4*a^ 4*b^7 + a^2*b^9)*d*cos(d*x + c)^2 + 3*(a^9*b^2 - 4*a^7*b^4 + 6*a^5*b^6 - 4 *a^3*b^8 + a*b^10)*d*cos(d*x + c) + (a^8*b^3 - 4*a^6*b^5 + 6*a^4*b^7 - 4*a ^2*b^9 + b^11)*d), 1/6*(3*(B*a^3*b^3 - 4*A*a^2*b^4 + 4*B*a*b^5 - A*b^6 + ( B*a^6 - 4*A*a^5*b + 4*B*a^4*b^2 - A*a^3*b^3)*cos(d*x + c)^3 + 3*(B*a^5*b - 4*A*a^4*b^2 + 4*B*a^3*b^3 - A*a^2*b^4)*cos(d*x + c)^2 + 3*(B*a^4*b^2 - 4* A*a^3*b^3 + 4*B*a^2*b^4 - A*a*b^5)*cos(d*x + c))*sqrt(-a^2 + b^2)*arctan(- sqrt(-a^2 + b^2)*(b*cos(d*x + c) + a)/((a^2 - b^2)*sin(d*x + c))) + (B*a^6 *b + 2*A*a^5*b^2 - 11*B*a^4*b^3 + 11*A*a^3*b^4 + 4*B*a^2*b^5 - 13*A*a*b...
\[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\int \frac {\left (A + B \sec {\left (c + d x \right )}\right ) \sec ^{2}{\left (c + d x \right )}}{\left (a + b \sec {\left (c + d x \right )}\right )^{4}}\, dx \] Input:
integrate(sec(d*x+c)**2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))**4,x)
Output:
Integral((A + B*sec(c + d*x))*sec(c + d*x)**2/(a + b*sec(c + d*x))**4, x)
Exception generated. \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\text {Exception raised: ValueError} \] Input:
integrate(sec(d*x+c)^2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x, algorithm="m axima")
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*a^2-4*b^2>0)', see `assume?` f or more de
Leaf count of result is larger than twice the leaf count of optimal. 726 vs. \(2 (247) = 494\).
Time = 0.23 (sec) , antiderivative size = 726, normalized size of antiderivative = 2.76 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx =\text {Too large to display} \] Input:
integrate(sec(d*x+c)^2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x, algorithm="g iac")
Output:
1/3*(3*(B*a^3 - 4*A*a^2*b + 4*B*a*b^2 - A*b^3)*(pi*floor(1/2*(d*x + c)/pi + 1/2)*sgn(-2*a + 2*b) + arctan(-(a*tan(1/2*d*x + 1/2*c) - b*tan(1/2*d*x + 1/2*c))/sqrt(-a^2 + b^2)))/((a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*sqrt(-a^2 + b^2)) - (6*A*a^5*tan(1/2*d*x + 1/2*c)^5 - 3*B*a^5*tan(1/2*d*x + 1/2*c)^ 5 - 6*A*a^4*b*tan(1/2*d*x + 1/2*c)^5 - 12*B*a^4*b*tan(1/2*d*x + 1/2*c)^5 + 12*A*a^3*b^2*tan(1/2*d*x + 1/2*c)^5 + 27*B*a^3*b^2*tan(1/2*d*x + 1/2*c)^5 - 27*A*a^2*b^3*tan(1/2*d*x + 1/2*c)^5 - 12*B*a^2*b^3*tan(1/2*d*x + 1/2*c) ^5 + 12*A*a*b^4*tan(1/2*d*x + 1/2*c)^5 + 6*B*a*b^4*tan(1/2*d*x + 1/2*c)^5 + 3*A*b^5*tan(1/2*d*x + 1/2*c)^5 - 6*B*b^5*tan(1/2*d*x + 1/2*c)^5 - 12*A*a ^5*tan(1/2*d*x + 1/2*c)^3 + 28*B*a^4*b*tan(1/2*d*x + 1/2*c)^3 - 16*A*a^3*b ^2*tan(1/2*d*x + 1/2*c)^3 - 16*B*a^2*b^3*tan(1/2*d*x + 1/2*c)^3 + 28*A*a*b ^4*tan(1/2*d*x + 1/2*c)^3 - 12*B*b^5*tan(1/2*d*x + 1/2*c)^3 + 6*A*a^5*tan( 1/2*d*x + 1/2*c) + 3*B*a^5*tan(1/2*d*x + 1/2*c) + 6*A*a^4*b*tan(1/2*d*x + 1/2*c) - 12*B*a^4*b*tan(1/2*d*x + 1/2*c) + 12*A*a^3*b^2*tan(1/2*d*x + 1/2* c) - 27*B*a^3*b^2*tan(1/2*d*x + 1/2*c) + 27*A*a^2*b^3*tan(1/2*d*x + 1/2*c) - 12*B*a^2*b^3*tan(1/2*d*x + 1/2*c) + 12*A*a*b^4*tan(1/2*d*x + 1/2*c) - 6 *B*a*b^4*tan(1/2*d*x + 1/2*c) - 3*A*b^5*tan(1/2*d*x + 1/2*c) - 6*B*b^5*tan (1/2*d*x + 1/2*c))/((a^6 - 3*a^4*b^2 + 3*a^2*b^4 - b^6)*(a*tan(1/2*d*x + 1 /2*c)^2 - b*tan(1/2*d*x + 1/2*c)^2 - a - b)^3))/d
Time = 16.55 (sec) , antiderivative size = 451, normalized size of antiderivative = 1.71 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\frac {\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,A\,a^3-A\,b^3+B\,a^3-2\,B\,b^3+6\,A\,a\,b^2-2\,A\,a^2\,b+2\,B\,a\,b^2-6\,B\,a^2\,b\right )}{\left (a+b\right )\,\left (a^3-3\,a^2\,b+3\,a\,b^2-b^3\right )}-\frac {4\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (3\,A\,a^3-7\,B\,a^2\,b+7\,A\,a\,b^2-3\,B\,b^3\right )}{3\,{\left (a+b\right )}^2\,\left (a^2-2\,a\,b+b^2\right )}+\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (2\,A\,a^3+A\,b^3-B\,a^3-2\,B\,b^3+6\,A\,a\,b^2+2\,A\,a^2\,b-2\,B\,a\,b^2-6\,B\,a^2\,b\right )}{{\left (a+b\right )}^3\,\left (a-b\right )}}{d\,\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,\left (-3\,a^3-3\,a^2\,b+3\,a\,b^2+3\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (-3\,a^3+3\,a^2\,b+3\,a\,b^2-3\,b^3\right )+3\,a\,b^2+3\,a^2\,b+a^3+b^3-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (a^3-3\,a^2\,b+3\,a\,b^2-b^3\right )\right )}-\frac {\mathrm {atanh}\left (\frac {\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\,\left (2\,a-2\,b\right )\,\left (a^3-3\,a^2\,b+3\,a\,b^2-b^3\right )}{2\,\sqrt {a+b}\,{\left (a-b\right )}^{7/2}}\right )\,\left (-B\,a^3+4\,A\,a^2\,b-4\,B\,a\,b^2+A\,b^3\right )}{d\,{\left (a+b\right )}^{7/2}\,{\left (a-b\right )}^{7/2}} \] Input:
int((A + B/cos(c + d*x))/(cos(c + d*x)^2*(a + b/cos(c + d*x))^4),x)
Output:
((tan(c/2 + (d*x)/2)*(2*A*a^3 - A*b^3 + B*a^3 - 2*B*b^3 + 6*A*a*b^2 - 2*A* a^2*b + 2*B*a*b^2 - 6*B*a^2*b))/((a + b)*(3*a*b^2 - 3*a^2*b + a^3 - b^3)) - (4*tan(c/2 + (d*x)/2)^3*(3*A*a^3 - 3*B*b^3 + 7*A*a*b^2 - 7*B*a^2*b))/(3* (a + b)^2*(a^2 - 2*a*b + b^2)) + (tan(c/2 + (d*x)/2)^5*(2*A*a^3 + A*b^3 - B*a^3 - 2*B*b^3 + 6*A*a*b^2 + 2*A*a^2*b - 2*B*a*b^2 - 6*B*a^2*b))/((a + b) ^3*(a - b)))/(d*(tan(c/2 + (d*x)/2)^2*(3*a*b^2 - 3*a^2*b - 3*a^3 + 3*b^3) - tan(c/2 + (d*x)/2)^4*(3*a*b^2 + 3*a^2*b - 3*a^3 - 3*b^3) + 3*a*b^2 + 3*a ^2*b + a^3 + b^3 - tan(c/2 + (d*x)/2)^6*(3*a*b^2 - 3*a^2*b + a^3 - b^3))) - (atanh((tan(c/2 + (d*x)/2)*(2*a - 2*b)*(3*a*b^2 - 3*a^2*b + a^3 - b^3))/ (2*(a + b)^(1/2)*(a - b)^(7/2)))*(A*b^3 - B*a^3 + 4*A*a^2*b - 4*B*a*b^2))/ (d*(a + b)^(7/2)*(a - b)^(7/2))
Time = 0.16 (sec) , antiderivative size = 467, normalized size of antiderivative = 1.78 \[ \int \frac {\sec ^2(c+d x) (A+B \sec (c+d x))}{(a+b \sec (c+d x))^4} \, dx=\frac {-12 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{\sqrt {-a^{2}+b^{2}}}\right ) \cos \left (d x +c \right ) a^{2} b^{2}+6 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{\sqrt {-a^{2}+b^{2}}}\right ) \sin \left (d x +c \right )^{2} a^{3} b -6 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{\sqrt {-a^{2}+b^{2}}}\right ) a^{3} b -6 \sqrt {-a^{2}+b^{2}}\, \mathit {atan} \left (\frac {\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a -\tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b}{\sqrt {-a^{2}+b^{2}}}\right ) a \,b^{3}+2 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{5}-\cos \left (d x +c \right ) \sin \left (d x +c \right ) a^{3} b^{2}-\cos \left (d x +c \right ) \sin \left (d x +c \right ) a \,b^{4}+\sin \left (d x +c \right ) a^{4} b +\sin \left (d x +c \right ) a^{2} b^{3}-2 \sin \left (d x +c \right ) b^{5}}{2 d \left (2 \cos \left (d x +c \right ) a^{7} b -6 \cos \left (d x +c \right ) a^{5} b^{3}+6 \cos \left (d x +c \right ) a^{3} b^{5}-2 \cos \left (d x +c \right ) a \,b^{7}-\sin \left (d x +c \right )^{2} a^{8}+3 \sin \left (d x +c \right )^{2} a^{6} b^{2}-3 \sin \left (d x +c \right )^{2} a^{4} b^{4}+\sin \left (d x +c \right )^{2} a^{2} b^{6}+a^{8}-2 a^{6} b^{2}+2 a^{2} b^{6}-b^{8}\right )} \] Input:
int(sec(d*x+c)^2*(A+B*sec(d*x+c))/(a+b*sec(d*x+c))^4,x)
Output:
( - 12*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b) /sqrt( - a**2 + b**2))*cos(c + d*x)*a**2*b**2 + 6*sqrt( - a**2 + b**2)*ata n((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*sin(c + d*x)**2*a**3*b - 6*sqrt( - a**2 + b**2)*atan((tan((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*a**3*b - 6*sqrt( - a**2 + b**2)*atan((t an((c + d*x)/2)*a - tan((c + d*x)/2)*b)/sqrt( - a**2 + b**2))*a*b**3 + 2*c os(c + d*x)*sin(c + d*x)*a**5 - cos(c + d*x)*sin(c + d*x)*a**3*b**2 - cos( c + d*x)*sin(c + d*x)*a*b**4 + sin(c + d*x)*a**4*b + sin(c + d*x)*a**2*b** 3 - 2*sin(c + d*x)*b**5)/(2*d*(2*cos(c + d*x)*a**7*b - 6*cos(c + d*x)*a**5 *b**3 + 6*cos(c + d*x)*a**3*b**5 - 2*cos(c + d*x)*a*b**7 - sin(c + d*x)**2 *a**8 + 3*sin(c + d*x)**2*a**6*b**2 - 3*sin(c + d*x)**2*a**4*b**4 + sin(c + d*x)**2*a**2*b**6 + a**8 - 2*a**6*b**2 + 2*a**2*b**6 - b**8))