\(\int \sec (a+b x) \sec (2 (a+b x)) \, dx\) [65]
Optimal result
Integrand size = 15, antiderivative size = 35 \[
\int \sec (a+b x) \sec (2 (a+b x)) \, dx=-\frac {\text {arctanh}(\sin (a+b x))}{b}+\frac {\sqrt {2} \text {arctanh}\left (\sqrt {2} \sin (a+b x)\right )}{b}
\]
[Out]
-arctanh(sin(b*x+a))/b+arctanh(sin(b*x+a)*2^(1/2))*2^(1/2)/b
Rubi [A] (verified)
Time = 0.04 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00, number of
steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4449, 1107, 213}
\[
\int \sec (a+b x) \sec (2 (a+b x)) \, dx=\frac {\sqrt {2} \text {arctanh}\left (\sqrt {2} \sin (a+b x)\right )}{b}-\frac {\text {arctanh}(\sin (a+b x))}{b}
\]
[In]
Int[Sec[a + b*x]*Sec[2*(a + b*x)],x]
[Out]
-(ArcTanh[Sin[a + b*x]]/b) + (Sqrt[2]*ArcTanh[Sqrt[2]*Sin[a + b*x]])/b
Rule 213
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[b, 2])^(-1))*ArcTanh[Rt[b, 2]*(x/Rt[-a, 2])]
, x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (LtQ[a, 0] || GtQ[b, 0])
Rule 1107
Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Dist[c/q, Int[1/(b/
2 - q/2 + c*x^2), x], x] - Dist[c/q, Int[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*
a*c, 0] && PosQ[b^2 - 4*a*c]
Rule 4449
Int[(u_)*(F_)[(c_.)*((a_.) + (b_.)*(x_))]^(n_), x_Symbol] :> With[{d = FreeFactors[Sin[c*(a + b*x)], x]}, Dist
[d/(b*c), Subst[Int[SubstFor[(1 - d^2*x^2)^((n - 1)/2), Sin[c*(a + b*x)]/d, u, x], x], x, Sin[c*(a + b*x)]/d],
x] /; FunctionOfQ[Sin[c*(a + b*x)]/d, u, x]] /; FreeQ[{a, b, c}, x] && IntegerQ[(n - 1)/2] && NonsumQ[u] && (
EqQ[F, Cos] || EqQ[F, cos])
Rubi steps \begin{align*}
\text {integral}& = \frac {\text {Subst}\left (\int \frac {1}{1-3 x^2+2 x^4} \, dx,x,\sin (a+b x)\right )}{b} \\ & = \frac {2 \text {Subst}\left (\int \frac {1}{-2+2 x^2} \, dx,x,\sin (a+b x)\right )}{b}-\frac {2 \text {Subst}\left (\int \frac {1}{-1+2 x^2} \, dx,x,\sin (a+b x)\right )}{b} \\ & = -\frac {\text {arctanh}(\sin (a+b x))}{b}+\frac {\sqrt {2} \text {arctanh}\left (\sqrt {2} \sin (a+b x)\right )}{b} \\
\end{align*}
Mathematica [A] (verified)
Time = 0.00 (sec) , antiderivative size = 35, normalized size of antiderivative = 1.00
\[
\int \sec (a+b x) \sec (2 (a+b x)) \, dx=-\frac {\text {arctanh}(\sin (a+b x))}{b}+\frac {\sqrt {2} \text {arctanh}\left (\sqrt {2} \sin (a+b x)\right )}{b}
\]
[In]
Integrate[Sec[a + b*x]*Sec[2*(a + b*x)],x]
[Out]
-(ArcTanh[Sin[a + b*x]]/b) + (Sqrt[2]*ArcTanh[Sqrt[2]*Sin[a + b*x]])/b
Maple [A] (verified)
Time = 0.87 (sec) , antiderivative size = 43, normalized size of antiderivative = 1.23
| | |
method | result | size |
| | |
default |
\(\frac {-\frac {\ln \left (\sin \left (x b +a \right )+1\right )}{2}+\frac {\ln \left (\sin \left (x b +a \right )-1\right )}{2}+\sqrt {2}\, \operatorname {arctanh}\left (\sin \left (x b +a \right ) \sqrt {2}\right )}{b}\) |
\(43\) |
risch |
\(\frac {\ln \left ({\mathrm e}^{i \left (x b +a \right )}-i\right )}{b}-\frac {\ln \left (i+{\mathrm e}^{i \left (x b +a \right )}\right )}{b}+\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+i \sqrt {2}\, {\mathrm e}^{i \left (x b +a \right )}-1\right )}{2 b}-\frac {\sqrt {2}\, \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}-i \sqrt {2}\, {\mathrm e}^{i \left (x b +a \right )}-1\right )}{2 b}\) |
\(107\) |
| | |
|
|
|
[In]
int(sec(b*x+a)*sec(2*b*x+2*a),x,method=_RETURNVERBOSE)
[Out]
1/b*(-1/2*ln(sin(b*x+a)+1)+1/2*ln(sin(b*x+a)-1)+2^(1/2)*arctanh(sin(b*x+a)*2^(1/2)))
Fricas [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 72 vs. \(2 (31) = 62\).
Time = 0.26 (sec) , antiderivative size = 72, normalized size of antiderivative = 2.06
\[
\int \sec (a+b x) \sec (2 (a+b x)) \, dx=\frac {\sqrt {2} \log \left (-\frac {2 \, \cos \left (b x + a\right )^{2} - 2 \, \sqrt {2} \sin \left (b x + a\right ) - 3}{2 \, \cos \left (b x + a\right )^{2} - 1}\right ) - \log \left (\sin \left (b x + a\right ) + 1\right ) + \log \left (-\sin \left (b x + a\right ) + 1\right )}{2 \, b}
\]
[In]
integrate(sec(b*x+a)*sec(2*b*x+2*a),x, algorithm="fricas")
[Out]
1/2*(sqrt(2)*log(-(2*cos(b*x + a)^2 - 2*sqrt(2)*sin(b*x + a) - 3)/(2*cos(b*x + a)^2 - 1)) - log(sin(b*x + a) +
1) + log(-sin(b*x + a) + 1))/b
Sympy [F]
\[
\int \sec (a+b x) \sec (2 (a+b x)) \, dx=\int \sec {\left (a + b x \right )} \sec {\left (2 a + 2 b x \right )}\, dx
\]
[In]
integrate(sec(b*x+a)*sec(2*b*x+2*a),x)
[Out]
Integral(sec(a + b*x)*sec(2*a + 2*b*x), x)
Maxima [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 6257 vs. \(2 (31) = 62\).
Time = 84.36 (sec) , antiderivative size = 6257, normalized size of antiderivative = 178.77
\[
\int \sec (a+b x) \sec (2 (a+b x)) \, dx=\text {Too large to display}
\]
[In]
integrate(sec(b*x+a)*sec(2*b*x+2*a),x, algorithm="maxima")
[Out]
-1/8*(2*(sqrt(2)*cos(3*a)*cos(3/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(a)*cos(1/4*arctan2(sin(4*a), cos(
4*a))) + sqrt(2)*sin(3*a)*sin(3/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*sin(a)*sin(1/4*arctan2(sin(4*a), cos(
4*a))))*arctan2(sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a)))*sin(b*x) + sqrt(2)*cos(b*x)*sin(1/4*arctan2(sin(4
*a), cos(4*a))) + cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(2*b*x) + cos(2*b*x)*sin(1/2*arctan2(sin(4*a), cos(4
*a))), sqrt(2)*cos(b*x)*cos(1/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*sin(b*x)*sin(1/4*arctan2(sin(4*a), cos(
4*a))) + cos(2*b*x)*cos(1/2*arctan2(sin(4*a), cos(4*a))) - sin(2*b*x)*sin(1/2*arctan2(sin(4*a), cos(4*a))) + 1
) - 2*(sqrt(2)*cos(3*a)*cos(3/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(a)*cos(1/4*arctan2(sin(4*a), cos(4*
a))) + sqrt(2)*sin(3*a)*sin(3/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*sin(a)*sin(1/4*arctan2(sin(4*a), cos(4*
a))))*arctan2(-sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a)))*sin(b*x) - sqrt(2)*cos(b*x)*sin(1/4*arctan2(sin(4*
a), cos(4*a))) + cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(2*b*x) + cos(2*b*x)*sin(1/2*arctan2(sin(4*a), cos(4*
a))), -sqrt(2)*cos(b*x)*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(b*x)*sin(1/4*arctan2(sin(4*a), cos(
4*a))) + cos(2*b*x)*cos(1/2*arctan2(sin(4*a), cos(4*a))) - sin(2*b*x)*sin(1/2*arctan2(sin(4*a), cos(4*a))) + 1
) - 2*((sqrt(2)*cos(3*a)*cos(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(3*a)*sin(1/2*arctan2(sin(4*a), cos
(4*a))) + sqrt(2)*cos(a))*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a))) + (sqrt(2)*cos(1/2*arctan2(sin(4*a), c
os(4*a)))*sin(3*a) - sqrt(2)*cos(3*a)*sin(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(a))*sin(1/2*pi + 1/4*
arctan2(sin(4*a), cos(4*a))))*arctan2(-2*((sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/2*pi + 1/4*arcta
n2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(
4*a))))*cos(b*x) + cos(1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a))) - (sqrt(
2)*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*cos(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/2*pi + 1
/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))))*sin(b*x) - cos(1/2*pi + 1/4*arctan2(sin(
4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))/(2*(cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*ar
ctan2(sin(4*a), cos(4*a)))^2)*cos(b*x)^2 + 2*(cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a
), cos(4*a)))^2)*sin(b*x)^2 + cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))^2 + 2*(sqrt(2)*cos(1/2*pi + 1/4*ar
ctan2(sin(4*a), cos(4*a)))*cos(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))
*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(
sin(4*a), cos(4*a))) + sqrt(2)*sin(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(
b*x) + 2*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*cos(1/4*arctan2(sin(4*a), cos(4*a))) + cos(1/4*arctan2(
sin(4*a), cos(4*a)))^2 + sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))^2 + 2*(sqrt(2)*cos(1/2*arctan2(sin(4*a)
, cos(4*a)))*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*
a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4
*a), cos(4*a))) + sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(b*x)
+ 2*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))) + sin(1/4*arctan2(sin(4
*a), cos(4*a)))^2), (2*(cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*cos(b
*x)^2 + 2*(cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*sin(b*x)^2 - cos(1
/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))^2 + 2*(sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*cos(1/4*arctan2(s
in(4*a), cos(4*a))) + sqrt(2)*sin(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(b
*x) + cos(1/4*arctan2(sin(4*a), cos(4*a)))^2 - sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))^2 - 2*(sqrt(2)*co
s(1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*arctan2(sin(4*a), co
s(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(b*x) + sin(1/4*arctan2(sin(4*a), cos(4*a)))^2)/(2*(cos(1/2*
arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*cos(b*x)^2 + 2*(cos(1/2*arctan2(sin(4
*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*sin(b*x)^2 + cos(1/2*pi + 1/4*arctan2(sin(4*a), co
s(4*a)))^2 + 2*(sqrt(2)*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*cos(1/2*arctan2(sin(4*a), cos(4*a))) + s
qrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/2*pi + 1/4*ar
ctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/2*arctan2(sin(4*a), cos(4*a)))
*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(b*x) + 2*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*cos(1/4*arct
an2(sin(4*a), cos(4*a))) + cos(1/4*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a
)))^2 + 2*(sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2
)*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/4*arctan2
(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(
1/4*arctan2(sin(4*a), cos(4*a))))*sin(b*x) + 2*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(s
in(4*a), cos(4*a))) + sin(1/4*arctan2(sin(4*a), cos(4*a)))^2)) - 2*((sqrt(2)*cos(3*a)*cos(1/2*arctan2(sin(4*a)
, cos(4*a))) + sqrt(2)*sin(3*a)*sin(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*cos(a))*cos(1/2*pi + 1/4*arctan
2(sin(4*a), cos(4*a))) + (sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(3*a) - sqrt(2)*cos(3*a)*sin(1/2*arc
tan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(a))*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a))))*arctan2(-2*((sqrt(2
)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*pi + 1/
4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))))*cos(b*x) - cos(1/4*arctan2(sin(4*a), cos(
4*a)))*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a))) - (sqrt(2)*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*
cos(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(s
in(4*a), cos(4*a))))*sin(b*x) + cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*
a))))/(2*(cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*cos(b*x)^2 + 2*(cos
(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*sin(b*x)^2 + cos(1/2*pi + 1/4*ar
ctan2(sin(4*a), cos(4*a)))^2 + 2*(sqrt(2)*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*cos(1/2*arctan2(sin(4*
a), cos(4*a))) - sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*s
in(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*sin(1/2*arctan2(si
n(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(b*x) - 2*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4
*a)))*cos(1/4*arctan2(sin(4*a), cos(4*a))) + cos(1/4*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*pi + 1/4*arctan2
(sin(4*a), cos(4*a)))^2 + 2*(sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/2*pi + 1/4*arctan2(sin(4*a), c
os(4*a))) - sqrt(2)*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(
2)*cos(1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*arctan2(sin(4*a
), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(b*x) - 2*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))
*sin(1/4*arctan2(sin(4*a), cos(4*a))) + sin(1/4*arctan2(sin(4*a), cos(4*a)))^2), (2*(cos(1/2*arctan2(sin(4*a),
cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*cos(b*x)^2 + 2*(cos(1/2*arctan2(sin(4*a), cos(4*a)))^2
+ sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*sin(b*x)^2 - cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))^2 - 2*(s
qrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/2*arctan2(sin
(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(b*x) + cos(1/4*arctan2(sin(4*a), cos(4*a)))^2 - si
n(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))^2 + 2*(sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan
2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*si
n(b*x) + sin(1/4*arctan2(sin(4*a), cos(4*a)))^2)/(2*(cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(
sin(4*a), cos(4*a)))^2)*cos(b*x)^2 + 2*(cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos
(4*a)))^2)*sin(b*x)^2 + cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))^2 + 2*(sqrt(2)*cos(1/2*pi + 1/4*arctan2(
sin(4*a), cos(4*a)))*cos(1/2*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*cos(1
/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*
a), cos(4*a))) - sqrt(2)*sin(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(b*x) -
2*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*cos(1/4*arctan2(sin(4*a), cos(4*a))) + cos(1/4*arctan2(sin(4*
a), cos(4*a)))^2 + sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))^2 + 2*(sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(
4*a)))*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*s
in(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(sin(4*a), c
os(4*a))) - sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(b*x) - 2*si
n(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))) + sin(1/4*arctan2(sin(4*a), c
os(4*a)))^2)) + (sqrt(2)*cos(3/4*arctan2(sin(4*a), cos(4*a)))*sin(3*a) - sqrt(2)*cos(1/4*arctan2(sin(4*a), cos
(4*a)))*sin(a) - sqrt(2)*cos(3*a)*sin(3/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*cos(a)*sin(1/4*arctan2(sin(4*
a), cos(4*a))))*log((cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*cos(2*b*
x)^2 + 2*(cos(1/4*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/4*arctan2(sin(4*a), cos(4*a)))^2)*cos(b*x)^2 + (cos(1
/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*sin(2*b*x)^2 + 2*(cos(1/4*arctan2(
sin(4*a), cos(4*a)))^2 + sin(1/4*arctan2(sin(4*a), cos(4*a)))^2)*sin(b*x)^2 + 2*sqrt(2)*cos(b*x)*cos(1/4*arcta
n2(sin(4*a), cos(4*a))) - 2*sqrt(2)*sin(b*x)*sin(1/4*arctan2(sin(4*a), cos(4*a))) + 2*((sqrt(2)*cos(1/2*arctan
2(sin(4*a), cos(4*a)))*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/2*arctan2(sin(4*a), cos(4*a)))*sin
(1/4*arctan2(sin(4*a), cos(4*a))))*cos(b*x) + (sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a)))*sin(1/2*arctan2(si
n(4*a), cos(4*a))) - sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(b*
x) + cos(1/2*arctan2(sin(4*a), cos(4*a))))*cos(2*b*x) - 2*((sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a)))*sin(1
/2*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4
*a))))*cos(b*x) - (sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)
*sin(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(b*x) + sin(1/2*arctan2(sin(4*a
), cos(4*a))))*sin(2*b*x) + 1) - (sqrt(2)*cos(3/4*arctan2(sin(4*a), cos(4*a)))*sin(3*a) - sqrt(2)*cos(1/4*arct
an2(sin(4*a), cos(4*a)))*sin(a) - sqrt(2)*cos(3*a)*sin(3/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*cos(a)*sin(1
/4*arctan2(sin(4*a), cos(4*a))))*log((cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4
*a)))^2)*cos(2*b*x)^2 + 2*(cos(1/4*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/4*arctan2(sin(4*a), cos(4*a)))^2)*co
s(b*x)^2 + (cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*sin(2*b*x)^2 + 2*
(cos(1/4*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/4*arctan2(sin(4*a), cos(4*a)))^2)*sin(b*x)^2 - 2*sqrt(2)*cos(b
*x)*cos(1/4*arctan2(sin(4*a), cos(4*a))) + 2*sqrt(2)*sin(b*x)*sin(1/4*arctan2(sin(4*a), cos(4*a))) - 2*((sqrt(
2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/2*arctan2(sin(4*a
), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(b*x) + (sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a)))*s
in(1/2*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), c
os(4*a))))*sin(b*x) - cos(1/2*arctan2(sin(4*a), cos(4*a))))*cos(2*b*x) + 2*((sqrt(2)*cos(1/4*arctan2(sin(4*a),
cos(4*a)))*sin(1/2*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan
2(sin(4*a), cos(4*a))))*cos(b*x) - (sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*cos(1/4*arctan2(sin(4*a), cos
(4*a))) + sqrt(2)*sin(1/2*arctan2(sin(4*a), cos(4*a)))*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(b*x) - sin(1/
2*arctan2(sin(4*a), cos(4*a))))*sin(2*b*x) + 1) - ((sqrt(2)*cos(1/2*arctan2(sin(4*a), cos(4*a)))*sin(3*a) - sq
rt(2)*cos(3*a)*sin(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(a))*cos(1/2*pi + 1/4*arctan2(sin(4*a), cos(4
*a))) - (sqrt(2)*cos(3*a)*cos(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(3*a)*sin(1/2*arctan2(sin(4*a), co
s(4*a))) + sqrt(2)*cos(a))*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a))))*log(((cos(1/2*arctan2(sin(4*a), cos(
4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*cos(b*x)^2 + (cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(
1/2*arctan2(sin(4*a), cos(4*a)))^2)*sin(b*x)^2 + ((sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(
1/4*arctan2(sin(4*a), cos(4*a))))*cos(1/2*arctan2(sin(4*a), cos(4*a))) - (sqrt(2)*cos(1/4*arctan2(sin(4*a), co
s(4*a))) - sqrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(1/2*arctan2(sin(4*a), cos(4*a))))*cos(b*x) + cos(
1/4*arctan2(sin(4*a), cos(4*a)))^2 - ((sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*sin(1/4*arctan2(
sin(4*a), cos(4*a))))*cos(1/2*arctan2(sin(4*a), cos(4*a))) + (sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) + s
qrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(1/2*arctan2(sin(4*a), cos(4*a))))*sin(b*x) + sin(1/4*arctan2(
sin(4*a), cos(4*a)))^2)/((cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*cos
(b*x)^2 + (cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*sin(b*x)^2 + ((sqr
t(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(1/2*arctan2(sin(
4*a), cos(4*a))) + (sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))
))*sin(1/2*arctan2(sin(4*a), cos(4*a))))*cos(b*x) + cos(1/4*arctan2(sin(4*a), cos(4*a)))^2 + ((sqrt(2)*cos(1/4
*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(1/2*arctan2(sin(4*a), cos(4*
a))) - (sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(1/2*a
rctan2(sin(4*a), cos(4*a))))*sin(b*x) + sin(1/4*arctan2(sin(4*a), cos(4*a)))^2)) - ((sqrt(2)*cos(1/2*arctan2(s
in(4*a), cos(4*a)))*sin(3*a) - sqrt(2)*cos(3*a)*sin(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(a))*cos(1/2
*pi + 1/4*arctan2(sin(4*a), cos(4*a))) - (sqrt(2)*cos(3*a)*cos(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(
3*a)*sin(1/2*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*cos(a))*sin(1/2*pi + 1/4*arctan2(sin(4*a), cos(4*a))))*log
(((cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*cos(b*x)^2 + (cos(1/2*arct
an2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a), cos(4*a)))^2)*sin(b*x)^2 - ((sqrt(2)*cos(1/4*arctan2(si
n(4*a), cos(4*a))) - sqrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(1/2*arctan2(sin(4*a), cos(4*a))) + (sqr
t(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(1/2*arctan2(sin(
4*a), cos(4*a))))*cos(b*x) + cos(1/4*arctan2(sin(4*a), cos(4*a)))^2 - ((sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(
4*a))) + sqrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))))*cos(1/2*arctan2(sin(4*a), cos(4*a))) - (sqrt(2)*cos(1/4
*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))))*sin(1/2*arctan2(sin(4*a), cos(4*
a))))*sin(b*x) + sin(1/4*arctan2(sin(4*a), cos(4*a)))^2)/((cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*ar
ctan2(sin(4*a), cos(4*a)))^2)*cos(b*x)^2 + (cos(1/2*arctan2(sin(4*a), cos(4*a)))^2 + sin(1/2*arctan2(sin(4*a),
cos(4*a)))^2)*sin(b*x)^2 - ((sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/4*arctan2(sin(4*a),
cos(4*a))))*cos(1/2*arctan2(sin(4*a), cos(4*a))) - (sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*si
n(1/4*arctan2(sin(4*a), cos(4*a))))*sin(1/2*arctan2(sin(4*a), cos(4*a))))*cos(b*x) + cos(1/4*arctan2(sin(4*a),
cos(4*a)))^2 + ((sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) - sqrt(2)*sin(1/4*arctan2(sin(4*a), cos(4*a))))
*cos(1/2*arctan2(sin(4*a), cos(4*a))) + (sqrt(2)*cos(1/4*arctan2(sin(4*a), cos(4*a))) + sqrt(2)*sin(1/4*arctan
2(sin(4*a), cos(4*a))))*sin(1/2*arctan2(sin(4*a), cos(4*a))))*sin(b*x) + sin(1/4*arctan2(sin(4*a), cos(4*a)))^
2)) - 4*log((cos(b*x + 2*a)^2 + cos(a)^2 - 2*cos(a)*sin(b*x + 2*a) + sin(b*x + 2*a)^2 + 2*cos(b*x + 2*a)*sin(a
) + sin(a)^2)/(cos(b*x + 2*a)^2 + cos(a)^2 + 2*cos(a)*sin(b*x + 2*a) + sin(b*x + 2*a)^2 - 2*cos(b*x + 2*a)*sin
(a) + sin(a)^2)))/b
Giac [B] (verification not implemented)
Leaf count of result is larger than twice the leaf count of optimal. 66 vs. \(2 (31) = 62\).
Time = 0.28 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.89
\[
\int \sec (a+b x) \sec (2 (a+b x)) \, dx=-\frac {\sqrt {2} \log \left (\frac {{\left | -2 \, \sqrt {2} + 4 \, \sin \left (b x + a\right ) \right |}}{{\left | 2 \, \sqrt {2} + 4 \, \sin \left (b x + a\right ) \right |}}\right ) + \log \left (\sin \left (b x + a\right ) + 1\right ) - \log \left (-\sin \left (b x + a\right ) + 1\right )}{2 \, b}
\]
[In]
integrate(sec(b*x+a)*sec(2*b*x+2*a),x, algorithm="giac")
[Out]
-1/2*(sqrt(2)*log(abs(-2*sqrt(2) + 4*sin(b*x + a))/abs(2*sqrt(2) + 4*sin(b*x + a))) + log(sin(b*x + a) + 1) -
log(-sin(b*x + a) + 1))/b
Mupad [B] (verification not implemented)
Time = 0.00 (sec) , antiderivative size = 29, normalized size of antiderivative = 0.83
\[
\int \sec (a+b x) \sec (2 (a+b x)) \, dx=-\frac {\mathrm {atanh}\left (\sin \left (a+b\,x\right )\right )-\sqrt {2}\,\mathrm {atanh}\left (\sqrt {2}\,\sin \left (a+b\,x\right )\right )}{b}
\]
[In]
int(1/(cos(a + b*x)*cos(2*a + 2*b*x)),x)
[Out]
-(atanh(sin(a + b*x)) - 2^(1/2)*atanh(2^(1/2)*sin(a + b*x)))/b