\(\int \frac {x \sec ^2(c+d x)}{a+c \sec ^2(c+d x)+b \tan ^2(c+d x)} \, dx\) [163]
Optimal result
Integrand size = 34, antiderivative size = 267 \[
\int \frac {x \sec ^2(c+d x)}{a+c \sec ^2(c+d x)+b \tan ^2(c+d x)} \, dx=-\frac {i x \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 c-2 \sqrt {a+c} \sqrt {b+c}}\right )}{2 \sqrt {a+c} \sqrt {b+c} d}+\frac {i x \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 \left (c+\sqrt {a+c} \sqrt {b+c}\right )}\right )}{2 \sqrt {a+c} \sqrt {b+c} d}-\frac {\operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 c-2 \sqrt {a+c} \sqrt {b+c}}\right )}{4 \sqrt {a+c} \sqrt {b+c} d^2}+\frac {\operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 \left (c+\sqrt {a+c} \sqrt {b+c}\right )}\right )}{4 \sqrt {a+c} \sqrt {b+c} d^2}
\]
[Out]
-1/2*I*x*ln(1+(a-b)*exp(2*I*(d*x+c))/(a+b+2*c-2*(a+c)^(1/2)*(b+c)^(1/2)))/d/(a+c)^(1/2)/(b+c)^(1/2)+1/2*I*x*ln
(1+(a-b)*exp(2*I*(d*x+c))/(a+b+2*c+2*(a+c)^(1/2)*(b+c)^(1/2)))/d/(a+c)^(1/2)/(b+c)^(1/2)-1/4*polylog(2,-(a-b)*
exp(2*I*(d*x+c))/(a+b+2*c-2*(a+c)^(1/2)*(b+c)^(1/2)))/d^2/(a+c)^(1/2)/(b+c)^(1/2)+1/4*polylog(2,-(a-b)*exp(2*I
*(d*x+c))/(a+b+2*c+2*(a+c)^(1/2)*(b+c)^(1/2)))/d^2/(a+c)^(1/2)/(b+c)^(1/2)
Rubi [A] (verified)
Time = 0.82 (sec) , antiderivative size = 267, normalized size of antiderivative = 1.00, number of
steps used = 9, number of rules used = 6, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.176, Rules used = {4685, 3402, 2296, 2221, 2317,
2438} \[
\int \frac {x \sec ^2(c+d x)}{a+c \sec ^2(c+d x)+b \tan ^2(c+d x)} \, dx=-\frac {\operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 c-2 \sqrt {a+c} \sqrt {b+c}}\right )}{4 d^2 \sqrt {a+c} \sqrt {b+c}}+\frac {\operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 \left (c+\sqrt {a+c} \sqrt {b+c}\right )}\right )}{4 d^2 \sqrt {a+c} \sqrt {b+c}}-\frac {i x \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{-2 \sqrt {a+c} \sqrt {b+c}+a+b+2 c}\right )}{2 d \sqrt {a+c} \sqrt {b+c}}+\frac {i x \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{2 \left (\sqrt {a+c} \sqrt {b+c}+c\right )+a+b}\right )}{2 d \sqrt {a+c} \sqrt {b+c}}
\]
[In]
Int[(x*Sec[c + d*x]^2)/(a + c*Sec[c + d*x]^2 + b*Tan[c + d*x]^2),x]
[Out]
((-1/2*I)*x*Log[1 + ((a - b)*E^((2*I)*(c + d*x)))/(a + b + 2*c - 2*Sqrt[a + c]*Sqrt[b + c])])/(Sqrt[a + c]*Sqr
t[b + c]*d) + ((I/2)*x*Log[1 + ((a - b)*E^((2*I)*(c + d*x)))/(a + b + 2*(c + Sqrt[a + c]*Sqrt[b + c]))])/(Sqrt
[a + c]*Sqrt[b + c]*d) - PolyLog[2, -(((a - b)*E^((2*I)*(c + d*x)))/(a + b + 2*c - 2*Sqrt[a + c]*Sqrt[b + c]))
]/(4*Sqrt[a + c]*Sqrt[b + c]*d^2) + PolyLog[2, -(((a - b)*E^((2*I)*(c + d*x)))/(a + b + 2*(c + Sqrt[a + c]*Sqr
t[b + c])))]/(4*Sqrt[a + c]*Sqrt[b + c]*d^2)
Rule 2221
Int[(((F_)^((g_.)*((e_.) + (f_.)*(x_))))^(n_.)*((c_.) + (d_.)*(x_))^(m_.))/((a_) + (b_.)*((F_)^((g_.)*((e_.) +
(f_.)*(x_))))^(n_.)), x_Symbol] :> Simp[((c + d*x)^m/(b*f*g*n*Log[F]))*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x]
- Dist[d*(m/(b*f*g*n*Log[F])), Int[(c + d*x)^(m - 1)*Log[1 + b*((F^(g*(e + f*x)))^n/a)], x], x] /; FreeQ[{F,
a, b, c, d, e, f, g, n}, x] && IGtQ[m, 0]
Rule 2296
Int[((F_)^(u_)*((f_.) + (g_.)*(x_))^(m_.))/((a_.) + (b_.)*(F_)^(u_) + (c_.)*(F_)^(v_)), x_Symbol] :> With[{q =
Rt[b^2 - 4*a*c, 2]}, Dist[2*(c/q), Int[(f + g*x)^m*(F^u/(b - q + 2*c*F^u)), x], x] - Dist[2*(c/q), Int[(f + g
*x)^m*(F^u/(b + q + 2*c*F^u)), x], x]] /; FreeQ[{F, a, b, c, f, g}, x] && EqQ[v, 2*u] && LinearQ[u, x] && NeQ[
b^2 - 4*a*c, 0] && IGtQ[m, 0]
Rule 2317
Int[Log[(a_) + (b_.)*((F_)^((e_.)*((c_.) + (d_.)*(x_))))^(n_.)], x_Symbol] :> Dist[1/(d*e*n*Log[F]), Subst[Int
[Log[a + b*x]/x, x], x, (F^(e*(c + d*x)))^n], x] /; FreeQ[{F, a, b, c, d, e, n}, x] && GtQ[a, 0]
Rule 2438
Int[Log[(c_.)*((d_) + (e_.)*(x_)^(n_.))]/(x_), x_Symbol] :> Simp[-PolyLog[2, (-c)*e*x^n]/n, x] /; FreeQ[{c, d,
e, n}, x] && EqQ[c*d, 1]
Rule 3402
Int[((c_.) + (d_.)*(x_))^(m_.)/((a_) + (b_.)*sin[(e_.) + Pi*(k_.) + (f_.)*(x_)]), x_Symbol] :> Dist[2, Int[(c
+ d*x)^m*E^(I*Pi*(k - 1/2))*(E^(I*(e + f*x))/(b + 2*a*E^(I*Pi*(k - 1/2))*E^(I*(e + f*x)) - b*E^(2*I*k*Pi)*E^(2
*I*(e + f*x)))), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && IntegerQ[2*k] && NeQ[a^2 - b^2, 0] && IGtQ[m, 0]
Rule 4685
Int[(((f_.) + (g_.)*(x_))^(m_.)*Sec[(d_.) + (e_.)*(x_)]^2)/((b_.) + (a_.)*Sec[(d_.) + (e_.)*(x_)]^2 + (c_.)*Ta
n[(d_.) + (e_.)*(x_)]^2), x_Symbol] :> Dist[2, Int[(f + g*x)^m/(2*a + b + c + (b - c)*Cos[2*d + 2*e*x]), x], x
] /; FreeQ[{a, b, c, d, e, f, g}, x] && IGtQ[m, 0] && NeQ[a + b, 0] && NeQ[a + c, 0]
Rubi steps \begin{align*}
\text {integral}& = 2 \int \frac {x}{a+b+2 c+(a-b) \cos (2 c+2 d x)} \, dx \\ & = 4 \int \frac {e^{i (2 c+2 d x)} x}{a-b+2 (a+b+2 c) e^{i (2 c+2 d x)}+(a-b) e^{2 i (2 c+2 d x)}} \, dx \\ & = \frac {(2 (a-b)) \int \frac {e^{i (2 c+2 d x)} x}{-4 \sqrt {a+c} \sqrt {b+c}+2 (a+b+2 c)+2 (a-b) e^{i (2 c+2 d x)}} \, dx}{\sqrt {a+c} \sqrt {b+c}}-\frac {(2 (a-b)) \int \frac {e^{i (2 c+2 d x)} x}{4 \sqrt {a+c} \sqrt {b+c}+2 (a+b+2 c)+2 (a-b) e^{i (2 c+2 d x)}} \, dx}{\sqrt {a+c} \sqrt {b+c}} \\ & = -\frac {i x \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 c-2 \sqrt {a+c} \sqrt {b+c}}\right )}{2 \sqrt {a+c} \sqrt {b+c} d}+\frac {i x \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 \left (c+\sqrt {a+c} \sqrt {b+c}\right )}\right )}{2 \sqrt {a+c} \sqrt {b+c} d}+\frac {i \int \log \left (1+\frac {2 (a-b) e^{i (2 c+2 d x)}}{-4 \sqrt {a+c} \sqrt {b+c}+2 (a+b+2 c)}\right ) \, dx}{2 \sqrt {a+c} \sqrt {b+c} d}-\frac {i \int \log \left (1+\frac {2 (a-b) e^{i (2 c+2 d x)}}{4 \sqrt {a+c} \sqrt {b+c}+2 (a+b+2 c)}\right ) \, dx}{2 \sqrt {a+c} \sqrt {b+c} d} \\ & = -\frac {i x \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 c-2 \sqrt {a+c} \sqrt {b+c}}\right )}{2 \sqrt {a+c} \sqrt {b+c} d}+\frac {i x \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 \left (c+\sqrt {a+c} \sqrt {b+c}\right )}\right )}{2 \sqrt {a+c} \sqrt {b+c} d}+\frac {\text {Subst}\left (\int \frac {\log \left (1+\frac {2 (a-b) x}{-4 \sqrt {a+c} \sqrt {b+c}+2 (a+b+2 c)}\right )}{x} \, dx,x,e^{i (2 c+2 d x)}\right )}{4 \sqrt {a+c} \sqrt {b+c} d^2}-\frac {\text {Subst}\left (\int \frac {\log \left (1+\frac {2 (a-b) x}{4 \sqrt {a+c} \sqrt {b+c}+2 (a+b+2 c)}\right )}{x} \, dx,x,e^{i (2 c+2 d x)}\right )}{4 \sqrt {a+c} \sqrt {b+c} d^2} \\ & = -\frac {i x \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 c-2 \sqrt {a+c} \sqrt {b+c}}\right )}{2 \sqrt {a+c} \sqrt {b+c} d}+\frac {i x \log \left (1+\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 \left (c+\sqrt {a+c} \sqrt {b+c}\right )}\right )}{2 \sqrt {a+c} \sqrt {b+c} d}-\frac {\operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 c-2 \sqrt {a+c} \sqrt {b+c}}\right )}{4 \sqrt {a+c} \sqrt {b+c} d^2}+\frac {\operatorname {PolyLog}\left (2,-\frac {(a-b) e^{2 i (c+d x)}}{a+b+2 \left (c+\sqrt {a+c} \sqrt {b+c}\right )}\right )}{4 \sqrt {a+c} \sqrt {b+c} d^2} \\
\end{align*}
Mathematica [B] (warning: unable to verify)
Both result and optimal contain complex but leaf count is larger than twice the leaf count of
optimal. \(751\) vs. \(2(267)=534\).
Time = 4.10 (sec) , antiderivative size = 751, normalized size of antiderivative = 2.81
\[
\int \frac {x \sec ^2(c+d x)}{a+c \sec ^2(c+d x)+b \tan ^2(c+d x)} \, dx=\frac {x \left (4 \sqrt {-b-c} c \arctan \left (\frac {\sqrt {b+c} \tan (c+d x)}{\sqrt {a+c}}\right )-i \sqrt {b+c} \log (1+i \tan (c+d x)) \log \left (\frac {i \left (\sqrt {a+c}-\sqrt {-b-c} \tan (c+d x)\right )}{\sqrt {-b-c}+i \sqrt {a+c}}\right )+i \sqrt {b+c} \log (1-i \tan (c+d x)) \log \left (\frac {i \left (-\sqrt {a+c}+\sqrt {-b-c} \tan (c+d x)\right )}{\sqrt {-b-c}-i \sqrt {a+c}}\right )+i \sqrt {b+c} \log (1+i \tan (c+d x)) \log \left (-\frac {i \left (\sqrt {a+c}+\sqrt {-b-c} \tan (c+d x)\right )}{\sqrt {-b-c}-i \sqrt {a+c}}\right )-i \sqrt {b+c} \log (1-i \tan (c+d x)) \log \left (\frac {i \left (\sqrt {a+c}+\sqrt {-b-c} \tan (c+d x)\right )}{\sqrt {-b-c}+i \sqrt {a+c}}\right )+i \sqrt {b+c} \operatorname {PolyLog}\left (2,\frac {\sqrt {-b-c} (1-i \tan (c+d x))}{\sqrt {-b-c}-i \sqrt {a+c}}\right )-i \sqrt {b+c} \operatorname {PolyLog}\left (2,\frac {\sqrt {-b-c} (1-i \tan (c+d x))}{\sqrt {-b-c}+i \sqrt {a+c}}\right )+i \sqrt {b+c} \operatorname {PolyLog}\left (2,\frac {\sqrt {-b-c} (1+i \tan (c+d x))}{\sqrt {-b-c}-i \sqrt {a+c}}\right )-i \sqrt {b+c} \operatorname {PolyLog}\left (2,\frac {\sqrt {-b-c} (1+i \tan (c+d x))}{\sqrt {-b-c}+i \sqrt {a+c}}\right )\right ) \left (\sqrt {a+c}-\sqrt {-b-c} \tan (c+d x)\right ) \left (\sqrt {a+c}+\sqrt {-b-c} \tan (c+d x)\right )}{2 \sqrt {a+c} \sqrt {-(b+c)^2} d (2 c-i \log (1-i \tan (c+d x))+i \log (1+i \tan (c+d x))) \left (a+c \sec ^2(c+d x)+b \tan ^2(c+d x)\right )}
\]
[In]
Integrate[(x*Sec[c + d*x]^2)/(a + c*Sec[c + d*x]^2 + b*Tan[c + d*x]^2),x]
[Out]
(x*(4*Sqrt[-b - c]*c*ArcTan[(Sqrt[b + c]*Tan[c + d*x])/Sqrt[a + c]] - I*Sqrt[b + c]*Log[1 + I*Tan[c + d*x]]*Lo
g[(I*(Sqrt[a + c] - Sqrt[-b - c]*Tan[c + d*x]))/(Sqrt[-b - c] + I*Sqrt[a + c])] + I*Sqrt[b + c]*Log[1 - I*Tan[
c + d*x]]*Log[(I*(-Sqrt[a + c] + Sqrt[-b - c]*Tan[c + d*x]))/(Sqrt[-b - c] - I*Sqrt[a + c])] + I*Sqrt[b + c]*L
og[1 + I*Tan[c + d*x]]*Log[((-I)*(Sqrt[a + c] + Sqrt[-b - c]*Tan[c + d*x]))/(Sqrt[-b - c] - I*Sqrt[a + c])] -
I*Sqrt[b + c]*Log[1 - I*Tan[c + d*x]]*Log[(I*(Sqrt[a + c] + Sqrt[-b - c]*Tan[c + d*x]))/(Sqrt[-b - c] + I*Sqrt
[a + c])] + I*Sqrt[b + c]*PolyLog[2, (Sqrt[-b - c]*(1 - I*Tan[c + d*x]))/(Sqrt[-b - c] - I*Sqrt[a + c])] - I*S
qrt[b + c]*PolyLog[2, (Sqrt[-b - c]*(1 - I*Tan[c + d*x]))/(Sqrt[-b - c] + I*Sqrt[a + c])] + I*Sqrt[b + c]*Poly
Log[2, (Sqrt[-b - c]*(1 + I*Tan[c + d*x]))/(Sqrt[-b - c] - I*Sqrt[a + c])] - I*Sqrt[b + c]*PolyLog[2, (Sqrt[-b
- c]*(1 + I*Tan[c + d*x]))/(Sqrt[-b - c] + I*Sqrt[a + c])])*(Sqrt[a + c] - Sqrt[-b - c]*Tan[c + d*x])*(Sqrt[a
+ c] + Sqrt[-b - c]*Tan[c + d*x]))/(2*Sqrt[a + c]*Sqrt[-(b + c)^2]*d*(2*c - I*Log[1 - I*Tan[c + d*x]] + I*Log
[1 + I*Tan[c + d*x]])*(a + c*Sec[c + d*x]^2 + b*Tan[c + d*x]^2))
Maple [B] (verified)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 1669 vs. \(2 (217 ) = 434\).
Time = 2.66 (sec) , antiderivative size = 1670, normalized size of antiderivative =
6.25
| | |
method | result | size |
| | |
risch |
\(\text {Expression too large to display}\) |
\(1670\) |
| | |
|
|
|
[In]
int(x*sec(d*x+c)^2/(a+c*sec(d*x+c)^2+b*tan(d*x+c)^2),x,method=_RETURNVERBOSE)
[Out]
-1/2/((a+c)*(b+c))^(1/2)*x^2-1/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)*x^2-1/d^2/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a
+c)*(b+c))^(1/2)*c^3-2/d/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)*c*x-1/d/((a+c)*(b+c))^(1/2)*c*x-1/2/(-2*((a+c)*(b+c)
)^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*a*x^2-1/2/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*x^2*b-1/(-
2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*c*x^2-1/d/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1
/2)*a*c*x-1/d/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*c*x*b-1/2*I/d/(-2*((a+c)*(b+c))^(1/2)-a-b-2
*c)/((a+c)*(b+c))^(1/2)*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c))*a*x-1/2*I/d/(-2*((a+c)*(
b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c))*b*x-I/d
/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*((a+c)*(b+c))^(1/2)-a-b-
2*c))*c*x-1/2*I/d^2/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*((a+c
)*(b+c))^(1/2)-a-b-2*c))*a*c-1/2*I/d^2/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*ln(1-(a-b)*exp(2*I
*(d*x+c))/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c))*b*c-1/2/d^2/((a+c)*(b+c))^(1/2)*c^2-1/4/d^2/((a+c)*(b+c))^(1/2)*po
lylog(2,(a-b)*exp(2*I*(d*x+c))/(2*((a+c)*(b+c))^(1/2)-a-b-2*c))-1/d^2/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)*c^2-1/2
/d^2/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)*polylog(2,(a-b)*exp(2*I*(d*x+c))/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c))-2/d/(
-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*c^2*x-1/2/d^2/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c
))^(1/2)*a*c^2-1/2/d^2/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*c^2*b-1/4/d^2/(-2*((a+c)*(b+c))^(1
/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*polylog(2,(a-b)*exp(2*I*(d*x+c))/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c))*a-1/4/d^2/
(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*polylog(2,(a-b)*exp(2*I*(d*x+c))/(-2*((a+c)*(b+c))^(1/2)-
a-b-2*c))*b-1/2/d^2/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*polylog(2,(a-b)*exp(2*I*(d*x+c))/(-2*
((a+c)*(b+c))^(1/2)-a-b-2*c))*c-I/d^2*c/(a*b+a*c+b*c+c^2)^(1/2)*arctanh(1/4*(2*(a-b)*exp(2*I*(d*x+c))+2*a+2*b+
4*c)/(a*b+a*c+b*c+c^2)^(1/2))-1/2*I/d/((a+c)*(b+c))^(1/2)*ln(1-(a-b)*exp(2*I*(d*x+c))/(2*((a+c)*(b+c))^(1/2)-a
-b-2*c))*x-I/d/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c))*
x-I/d^2/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c)*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c))*c-1/2*I
/d^2/((a+c)*(b+c))^(1/2)*ln(1-(a-b)*exp(2*I*(d*x+c))/(2*((a+c)*(b+c))^(1/2)-a-b-2*c))*c-I/d^2/(-2*((a+c)*(b+c)
)^(1/2)-a-b-2*c)/((a+c)*(b+c))^(1/2)*ln(1-(a-b)*exp(2*I*(d*x+c))/(-2*((a+c)*(b+c))^(1/2)-a-b-2*c))*c^2
Fricas [B] (verification not implemented)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 4100 vs. \(2 (213) = 426\).
Time = 4.60 (sec) , antiderivative size = 4100, normalized size of antiderivative = 15.36
\[
\int \frac {x \sec ^2(c+d x)}{a+c \sec ^2(c+d x)+b \tan ^2(c+d x)} \, dx=\text {Too large to display}
\]
[In]
integrate(x*sec(d*x+c)^2/(a+c*sec(d*x+c)^2+b*tan(d*x+c)^2),x, algorithm="fricas")
[Out]
-1/4*(I*(a - b)*c*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log(2*sqrt(-(2*(a - b)*sqrt((a*b + (a + b)
*c + c^2)/(a^2 - 2*a*b + b^2)) + a + b + 2*c)/(a - b)) + 2*cos(d*x + c) + 2*I*sin(d*x + c)) - I*(a - b)*c*sqrt
((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log(2*sqrt(-(2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b
+ b^2)) + a + b + 2*c)/(a - b)) + 2*cos(d*x + c) - 2*I*sin(d*x + c)) - I*(a - b)*c*sqrt((a*b + (a + b)*c + c^
2)/(a^2 - 2*a*b + b^2))*log(2*sqrt(-(2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) + a + b + 2*c
)/(a - b)) - 2*cos(d*x + c) + 2*I*sin(d*x + c)) + I*(a - b)*c*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)
)*log(2*sqrt(-(2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) + a + b + 2*c)/(a - b)) - 2*cos(d*x
+ c) - 2*I*sin(d*x + c)) - I*(a - b)*c*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log(2*sqrt((2*(a - b
)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) - a - b - 2*c)/(a - b)) + 2*cos(d*x + c) + 2*I*sin(d*x + c
)) + I*(a - b)*c*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log(2*sqrt((2*(a - b)*sqrt((a*b + (a + b)*c
+ c^2)/(a^2 - 2*a*b + b^2)) - a - b - 2*c)/(a - b)) + 2*cos(d*x + c) - 2*I*sin(d*x + c)) + I*(a - b)*c*sqrt((
a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log(2*sqrt((2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b +
b^2)) - a - b - 2*c)/(a - b)) - 2*cos(d*x + c) + 2*I*sin(d*x + c)) - I*(a - b)*c*sqrt((a*b + (a + b)*c + c^2)/
(a^2 - 2*a*b + b^2))*log(2*sqrt((2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) - a - b - 2*c)/(a
- b)) - 2*cos(d*x + c) - 2*I*sin(d*x + c)) - (a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*dilog(
-(((a + b + 2*c)*cos(d*x + c) + (I*a + I*b + 2*I*c)*sin(d*x + c) - 2*((a - b)*cos(d*x + c) + (I*a - I*b)*sin(d
*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt(-(2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2
- 2*a*b + b^2)) + a + b + 2*c)/(a - b)) + a - b)/(a - b) + 1) - (a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2
*a*b + b^2))*dilog((((a + b + 2*c)*cos(d*x + c) - (I*a + I*b + 2*I*c)*sin(d*x + c) - 2*((a - b)*cos(d*x + c) -
(I*a - I*b)*sin(d*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt(-(2*(a - b)*sqrt((a*b + (a
+ b)*c + c^2)/(a^2 - 2*a*b + b^2)) + a + b + 2*c)/(a - b)) - a + b)/(a - b) + 1) - (a - b)*sqrt((a*b + (a + b)
*c + c^2)/(a^2 - 2*a*b + b^2))*dilog(-(((a + b + 2*c)*cos(d*x + c) + (-I*a - I*b - 2*I*c)*sin(d*x + c) - 2*((a
- b)*cos(d*x + c) + (-I*a + I*b)*sin(d*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt(-(2*(a
- b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) + a + b + 2*c)/(a - b)) + a - b)/(a - b) + 1) - (a - b
)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*dilog((((a + b + 2*c)*cos(d*x + c) - (-I*a - I*b - 2*I*c)*
sin(d*x + c) - 2*((a - b)*cos(d*x + c) - (-I*a + I*b)*sin(d*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b
+ b^2)))*sqrt(-(2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) + a + b + 2*c)/(a - b)) - a + b)/(
a - b) + 1) + (a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*dilog(-(((a + b + 2*c)*cos(d*x + c) +
(I*a + I*b + 2*I*c)*sin(d*x + c) + 2*((a - b)*cos(d*x + c) - (-I*a + I*b)*sin(d*x + c))*sqrt((a*b + (a + b)*c
+ c^2)/(a^2 - 2*a*b + b^2)))*sqrt((2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) - a - b - 2*c)/
(a - b)) + a - b)/(a - b) + 1) + (a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*dilog((((a + b + 2*
c)*cos(d*x + c) - (I*a + I*b + 2*I*c)*sin(d*x + c) + 2*((a - b)*cos(d*x + c) + (-I*a + I*b)*sin(d*x + c))*sqrt
((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt((2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2
)) - a - b - 2*c)/(a - b)) - a + b)/(a - b) + 1) + (a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*d
ilog(-(((a + b + 2*c)*cos(d*x + c) + (-I*a - I*b - 2*I*c)*sin(d*x + c) + 2*((a - b)*cos(d*x + c) - (I*a - I*b)
*sin(d*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt((2*(a - b)*sqrt((a*b + (a + b)*c + c^2)
/(a^2 - 2*a*b + b^2)) - a - b - 2*c)/(a - b)) + a - b)/(a - b) + 1) + (a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^
2 - 2*a*b + b^2))*dilog((((a + b + 2*c)*cos(d*x + c) - (-I*a - I*b - 2*I*c)*sin(d*x + c) + 2*((a - b)*cos(d*x
+ c) + (I*a - I*b)*sin(d*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt((2*(a - b)*sqrt((a*b
+ (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) - a - b - 2*c)/(a - b)) - a + b)/(a - b) + 1) - (I*(a - b)*d*x + I*(a
- b)*c)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log((((a + b + 2*c)*cos(d*x + c) + (I*a + I*b + 2*I*
c)*sin(d*x + c) - 2*((a - b)*cos(d*x + c) + (I*a - I*b)*sin(d*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*
b + b^2)))*sqrt(-(2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) + a + b + 2*c)/(a - b)) + a - b)
/(a - b)) - (-I*(a - b)*d*x - I*(a - b)*c)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log(-(((a + b + 2
*c)*cos(d*x + c) - (I*a + I*b + 2*I*c)*sin(d*x + c) - 2*((a - b)*cos(d*x + c) - (I*a - I*b)*sin(d*x + c))*sqrt
((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt(-(2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^
2)) + a + b + 2*c)/(a - b)) - a + b)/(a - b)) - (-I*(a - b)*d*x - I*(a - b)*c)*sqrt((a*b + (a + b)*c + c^2)/(a
^2 - 2*a*b + b^2))*log((((a + b + 2*c)*cos(d*x + c) + (-I*a - I*b - 2*I*c)*sin(d*x + c) - 2*((a - b)*cos(d*x +
c) + (-I*a + I*b)*sin(d*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt(-(2*(a - b)*sqrt((a*b
+ (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) + a + b + 2*c)/(a - b)) + a - b)/(a - b)) - (I*(a - b)*d*x + I*(a - b
)*c)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log(-(((a + b + 2*c)*cos(d*x + c) - (-I*a - I*b - 2*I*c
)*sin(d*x + c) - 2*((a - b)*cos(d*x + c) - (-I*a + I*b)*sin(d*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*
b + b^2)))*sqrt(-(2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) + a + b + 2*c)/(a - b)) - a + b)
/(a - b)) - (-I*(a - b)*d*x - I*(a - b)*c)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log((((a + b + 2*
c)*cos(d*x + c) + (I*a + I*b + 2*I*c)*sin(d*x + c) + 2*((a - b)*cos(d*x + c) - (-I*a + I*b)*sin(d*x + c))*sqrt
((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt((2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2
)) - a - b - 2*c)/(a - b)) + a - b)/(a - b)) - (I*(a - b)*d*x + I*(a - b)*c)*sqrt((a*b + (a + b)*c + c^2)/(a^2
- 2*a*b + b^2))*log(-(((a + b + 2*c)*cos(d*x + c) - (I*a + I*b + 2*I*c)*sin(d*x + c) + 2*((a - b)*cos(d*x + c
) + (-I*a + I*b)*sin(d*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt((2*(a - b)*sqrt((a*b +
(a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) - a - b - 2*c)/(a - b)) - a + b)/(a - b)) - (I*(a - b)*d*x + I*(a - b)*c
)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log((((a + b + 2*c)*cos(d*x + c) + (-I*a - I*b - 2*I*c)*si
n(d*x + c) + 2*((a - b)*cos(d*x + c) - (I*a - I*b)*sin(d*x + c))*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b
^2)))*sqrt((2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) - a - b - 2*c)/(a - b)) + a - b)/(a -
b)) - (-I*(a - b)*d*x - I*(a - b)*c)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2))*log(-(((a + b + 2*c)*co
s(d*x + c) - (-I*a - I*b - 2*I*c)*sin(d*x + c) + 2*((a - b)*cos(d*x + c) + (I*a - I*b)*sin(d*x + c))*sqrt((a*b
+ (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)))*sqrt((2*(a - b)*sqrt((a*b + (a + b)*c + c^2)/(a^2 - 2*a*b + b^2)) -
a - b - 2*c)/(a - b)) - a + b)/(a - b)))/((a*b + (a + b)*c + c^2)*d^2)
Sympy [F]
\[
\int \frac {x \sec ^2(c+d x)}{a+c \sec ^2(c+d x)+b \tan ^2(c+d x)} \, dx=\int \frac {x \sec ^{2}{\left (c + d x \right )}}{a + b \tan ^{2}{\left (c + d x \right )} + c \sec ^{2}{\left (c + d x \right )}}\, dx
\]
[In]
integrate(x*sec(d*x+c)**2/(a+c*sec(d*x+c)**2+b*tan(d*x+c)**2),x)
[Out]
Integral(x*sec(c + d*x)**2/(a + b*tan(c + d*x)**2 + c*sec(c + d*x)**2), x)
Maxima [F]
\[
\int \frac {x \sec ^2(c+d x)}{a+c \sec ^2(c+d x)+b \tan ^2(c+d x)} \, dx=\int { \frac {x \sec \left (d x + c\right )^{2}}{c \sec \left (d x + c\right )^{2} + b \tan \left (d x + c\right )^{2} + a} \,d x }
\]
[In]
integrate(x*sec(d*x+c)^2/(a+c*sec(d*x+c)^2+b*tan(d*x+c)^2),x, algorithm="maxima")
[Out]
integrate(x*sec(d*x + c)^2/(c*sec(d*x + c)^2 + b*tan(d*x + c)^2 + a), x)
Giac [F]
\[
\int \frac {x \sec ^2(c+d x)}{a+c \sec ^2(c+d x)+b \tan ^2(c+d x)} \, dx=\int { \frac {x \sec \left (d x + c\right )^{2}}{c \sec \left (d x + c\right )^{2} + b \tan \left (d x + c\right )^{2} + a} \,d x }
\]
[In]
integrate(x*sec(d*x+c)^2/(a+c*sec(d*x+c)^2+b*tan(d*x+c)^2),x, algorithm="giac")
[Out]
integrate(x*sec(d*x + c)^2/(c*sec(d*x + c)^2 + b*tan(d*x + c)^2 + a), x)
Mupad [F(-1)]
Timed out. \[
\int \frac {x \sec ^2(c+d x)}{a+c \sec ^2(c+d x)+b \tan ^2(c+d x)} \, dx=\int \frac {x}{{\cos \left (c+d\,x\right )}^2\,\left (a+\frac {c}{{\cos \left (c+d\,x\right )}^2}+b\,{\mathrm {tan}\left (c+d\,x\right )}^2\right )} \,d x
\]
[In]
int(x/(cos(c + d*x)^2*(a + c/cos(c + d*x)^2 + b*tan(c + d*x)^2)),x)
[Out]
int(x/(cos(c + d*x)^2*(a + c/cos(c + d*x)^2 + b*tan(c + d*x)^2)), x)