\(\int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx\) [118]

Optimal result
Mathematica [A] (verified)
Rubi [A] (verified)
Maple [A] (verified)
Fricas [A] (verification not implemented)
Sympy [F]
Maxima [B] (verification not implemented)
Giac [A] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 88 \[ \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=-\frac {\left (a^2+b^2\right ) \log (\cos (c+d x))}{b^3 d}+\frac {\left (a^2+b^2\right ) \log (a \cos (c+d x)+b \sin (c+d x))}{b^3 d}+\frac {\sec ^2(c+d x)}{2 b d}-\frac {a \tan (c+d x)}{b^2 d} \] Output:

-(a^2+b^2)*ln(cos(d*x+c))/b^3/d+(a^2+b^2)*ln(a*cos(d*x+c)+b*sin(d*x+c))/b^ 
3/d+1/2*sec(d*x+c)^2/b/d-a*tan(d*x+c)/b^2/d
 

Mathematica [A] (verified)

Time = 0.11 (sec) , antiderivative size = 52, normalized size of antiderivative = 0.59 \[ \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {\left (a^2+b^2\right ) \log (a+b \tan (c+d x))-a b \tan (c+d x)+\frac {1}{2} b^2 \tan ^2(c+d x)}{b^3 d} \] Input:

Integrate[Sec[c + d*x]^3/(a*Cos[c + d*x] + b*Sin[c + d*x]),x]
 

Output:

((a^2 + b^2)*Log[a + b*Tan[c + d*x]] - a*b*Tan[c + d*x] + (b^2*Tan[c + d*x 
]^2)/2)/(b^3*d)
 

Rubi [A] (verified)

Time = 0.58 (sec) , antiderivative size = 86, normalized size of antiderivative = 0.98, number of steps used = 10, number of rules used = 9, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.321, Rules used = {3042, 3583, 3042, 3581, 3042, 3612, 3956, 4254, 24}

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 ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx\)

\(\Big \downarrow \) 3042

\(\displaystyle \int \frac {1}{\cos (c+d x)^3 (a \cos (c+d x)+b \sin (c+d x))}dx\)

\(\Big \downarrow \) 3583

\(\displaystyle \frac {\left (a^2+b^2\right ) \int \frac {\sec (c+d x)}{a \cos (c+d x)+b \sin (c+d x)}dx}{b^2}-\frac {a \int \sec ^2(c+d x)dx}{b^2}+\frac {\sec ^2(c+d x)}{2 b d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\left (a^2+b^2\right ) \int \frac {1}{\cos (c+d x) (a \cos (c+d x)+b \sin (c+d x))}dx}{b^2}-\frac {a \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{b^2}+\frac {\sec ^2(c+d x)}{2 b d}\)

\(\Big \downarrow \) 3581

\(\displaystyle \frac {\left (a^2+b^2\right ) \left (\frac {\int \frac {b \cos (c+d x)-a \sin (c+d x)}{a \cos (c+d x)+b \sin (c+d x)}dx}{b}+\frac {\int \tan (c+d x)dx}{b}\right )}{b^2}-\frac {a \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{b^2}+\frac {\sec ^2(c+d x)}{2 b d}\)

\(\Big \downarrow \) 3042

\(\displaystyle \frac {\left (a^2+b^2\right ) \left (\frac {\int \frac {b \cos (c+d x)-a \sin (c+d x)}{a \cos (c+d x)+b \sin (c+d x)}dx}{b}+\frac {\int \tan (c+d x)dx}{b}\right )}{b^2}-\frac {a \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{b^2}+\frac {\sec ^2(c+d x)}{2 b d}\)

\(\Big \downarrow \) 3612

\(\displaystyle \frac {\left (a^2+b^2\right ) \left (\frac {\int \tan (c+d x)dx}{b}+\frac {\log (a \cos (c+d x)+b \sin (c+d x))}{b d}\right )}{b^2}-\frac {a \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{b^2}+\frac {\sec ^2(c+d x)}{2 b d}\)

\(\Big \downarrow \) 3956

\(\displaystyle -\frac {a \int \csc \left (c+d x+\frac {\pi }{2}\right )^2dx}{b^2}+\frac {\left (a^2+b^2\right ) \left (\frac {\log (a \cos (c+d x)+b \sin (c+d x))}{b d}-\frac {\log (\cos (c+d x))}{b d}\right )}{b^2}+\frac {\sec ^2(c+d x)}{2 b d}\)

\(\Big \downarrow \) 4254

\(\displaystyle \frac {a \int 1d(-\tan (c+d x))}{b^2 d}+\frac {\left (a^2+b^2\right ) \left (\frac {\log (a \cos (c+d x)+b \sin (c+d x))}{b d}-\frac {\log (\cos (c+d x))}{b d}\right )}{b^2}+\frac {\sec ^2(c+d x)}{2 b d}\)

\(\Big \downarrow \) 24

\(\displaystyle \frac {\left (a^2+b^2\right ) \left (\frac {\log (a \cos (c+d x)+b \sin (c+d x))}{b d}-\frac {\log (\cos (c+d x))}{b d}\right )}{b^2}-\frac {a \tan (c+d x)}{b^2 d}+\frac {\sec ^2(c+d x)}{2 b d}\)

Input:

Int[Sec[c + d*x]^3/(a*Cos[c + d*x] + b*Sin[c + d*x]),x]
 

Output:

((a^2 + b^2)*(-(Log[Cos[c + d*x]]/(b*d)) + Log[a*Cos[c + d*x] + b*Sin[c + 
d*x]]/(b*d)))/b^2 + Sec[c + d*x]^2/(2*b*d) - (a*Tan[c + d*x])/(b^2*d)
 

Defintions of rubi rules used

rule 24
Int[a_, x_Symbol] :> Simp[a*x, x] /; FreeQ[a, x]
 

rule 3042
Int[u_, x_Symbol] :> Int[DeactivateTrig[u, x], x] /; FunctionOfTrigOfLinear 
Q[u, x]
 

rule 3581
Int[1/(cos[(c_.) + (d_.)*(x_)]*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[( 
c_.) + (d_.)*(x_)])), x_Symbol] :> Simp[1/b   Int[Tan[c + d*x], x], x] + Si 
mp[1/b   Int[(b*Cos[c + d*x] - a*Sin[c + d*x])/(a*Cos[c + d*x] + b*Sin[c + 
d*x]), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0]
 

rule 3583
Int[cos[(c_.) + (d_.)*(x_)]^(m_)/(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin 
[(c_.) + (d_.)*(x_)]), x_Symbol] :> Simp[-Cos[c + d*x]^(m + 1)/(b*d*(m + 1) 
), x] + (-Simp[a/b^2   Int[Cos[c + d*x]^(m + 1), x], x] + Simp[(a^2 + b^2)/ 
b^2   Int[Cos[c + d*x]^(m + 2)/(a*Cos[c + d*x] + b*Sin[c + d*x]), x], x]) / 
; FreeQ[{a, b, c, d}, x] && NeQ[a^2 + b^2, 0] && LtQ[m, -1]
 

rule 3612
Int[((A_.) + cos[(d_.) + (e_.)*(x_)]*(B_.) + (C_.)*sin[(d_.) + (e_.)*(x_)]) 
/((a_.) + cos[(d_.) + (e_.)*(x_)]*(b_.) + (c_.)*sin[(d_.) + (e_.)*(x_)]), x 
_Symbol] :> Simp[(b*B + c*C)*(x/(b^2 + c^2)), x] + Simp[(c*B - b*C)*(Log[a 
+ b*Cos[d + e*x] + c*Sin[d + e*x]]/(e*(b^2 + c^2))), x] /; FreeQ[{a, b, c, 
d, e, A, B, C}, x] && NeQ[b^2 + c^2, 0] && EqQ[A*(b^2 + c^2) - a*(b*B + c*C 
), 0]
 

rule 3956
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d 
*x], x]]/d, x] /; FreeQ[{c, d}, x]
 

rule 4254
Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> Simp[-d^(-1)   Subst[Int[Exp 
andIntegrand[(1 + x^2)^(n/2 - 1), x], x], x, Cot[c + d*x]], x] /; FreeQ[{c, 
 d}, x] && IGtQ[n/2, 0]
 
Maple [A] (verified)

Time = 0.49 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.60

method result size
derivativedivides \(\frac {-\frac {-\frac {\tan \left (d x +c \right )^{2} b}{2}+a \tan \left (d x +c \right )}{b^{2}}+\frac {\left (a^{2}+b^{2}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3}}}{d}\) \(53\)
default \(\frac {-\frac {-\frac {\tan \left (d x +c \right )^{2} b}{2}+a \tan \left (d x +c \right )}{b^{2}}+\frac {\left (a^{2}+b^{2}\right ) \ln \left (a +b \tan \left (d x +c \right )\right )}{b^{3}}}{d}\) \(53\)
parallelrisch \(\frac {2 \left (a^{2}+b^{2}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )-2 \left (a^{2}+b^{2}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )-2 \left (a^{2}+b^{2}\right ) \left (1+\cos \left (2 d x +2 c \right )\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )-2 a b \sin \left (2 d x +2 c \right )-b^{2} \cos \left (2 d x +2 c \right )+b^{2}}{2 b^{3} d \left (1+\cos \left (2 d x +2 c \right )\right )}\) \(167\)
risch \(\frac {-2 i a \,{\mathrm e}^{2 i \left (d x +c \right )}+2 b \,{\mathrm e}^{2 i \left (d x +c \right )}-2 i a}{b^{2} d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{2}}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right ) a^{2}}{b^{3} d}-\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )}{b d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right ) a^{2}}{b^{3} d}+\frac {\ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-\frac {i b +a}{i b -a}\right )}{b d}\) \(170\)
norman \(\frac {-\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{b^{2} d}+\frac {2 a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}{b^{2} d}+\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}}{b d}}{\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{2}}+\frac {\left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 b \tan \left (\frac {d x}{2}+\frac {c}{2}\right )-a \right )}{b^{3} d}-\frac {\left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right )}{b^{3} d}-\frac {\left (a^{2}+b^{2}\right ) \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )}{b^{3} d}\) \(174\)

Input:

int(sec(d*x+c)^3/(a*cos(d*x+c)+b*sin(d*x+c)),x,method=_RETURNVERBOSE)
 

Output:

1/d*(-1/b^2*(-1/2*tan(d*x+c)^2*b+a*tan(d*x+c))+(a^2+b^2)/b^3*ln(a+b*tan(d* 
x+c)))
 

Fricas [A] (verification not implemented)

Time = 0.09 (sec) , antiderivative size = 117, normalized size of antiderivative = 1.33 \[ \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {{\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + {\left (a^{2} - b^{2}\right )} \cos \left (d x + c\right )^{2} + b^{2}\right ) - {\left (a^{2} + b^{2}\right )} \cos \left (d x + c\right )^{2} \log \left (\cos \left (d x + c\right )^{2}\right ) - 2 \, a b \cos \left (d x + c\right ) \sin \left (d x + c\right ) + b^{2}}{2 \, b^{3} d \cos \left (d x + c\right )^{2}} \] Input:

integrate(sec(d*x+c)^3/(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="fricas")
 

Output:

1/2*((a^2 + b^2)*cos(d*x + c)^2*log(2*a*b*cos(d*x + c)*sin(d*x + c) + (a^2 
 - b^2)*cos(d*x + c)^2 + b^2) - (a^2 + b^2)*cos(d*x + c)^2*log(cos(d*x + c 
)^2) - 2*a*b*cos(d*x + c)*sin(d*x + c) + b^2)/(b^3*d*cos(d*x + c)^2)
 

Sympy [F]

\[ \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\int \frac {\sec ^{3}{\left (c + d x \right )}}{a \cos {\left (c + d x \right )} + b \sin {\left (c + d x \right )}}\, dx \] Input:

integrate(sec(d*x+c)**3/(a*cos(d*x+c)+b*sin(d*x+c)),x)
 

Output:

Integral(sec(c + d*x)**3/(a*cos(c + d*x) + b*sin(c + d*x)), x)
 

Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 238 vs. \(2 (86) = 172\).

Time = 0.03 (sec) , antiderivative size = 238, normalized size of antiderivative = 2.70 \[ \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=-\frac {\frac {2 \, {\left (\frac {a \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac {b \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac {a \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}}\right )}}{b^{2} - \frac {2 \, b^{2} \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac {b^{2} \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}}} - \frac {{\left (a^{2} + b^{2}\right )} \log \left (-a - \frac {2 \, b \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + \frac {a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}}\right )}{b^{3}} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} + 1\right )}{b^{3}} + \frac {{\left (a^{2} + b^{2}\right )} \log \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - 1\right )}{b^{3}}}{d} \] Input:

integrate(sec(d*x+c)^3/(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="maxima")
 

Output:

-(2*(a*sin(d*x + c)/(cos(d*x + c) + 1) - b*sin(d*x + c)^2/(cos(d*x + c) + 
1)^2 - a*sin(d*x + c)^3/(cos(d*x + c) + 1)^3)/(b^2 - 2*b^2*sin(d*x + c)^2/ 
(cos(d*x + c) + 1)^2 + b^2*sin(d*x + c)^4/(cos(d*x + c) + 1)^4) - (a^2 + b 
^2)*log(-a - 2*b*sin(d*x + c)/(cos(d*x + c) + 1) + a*sin(d*x + c)^2/(cos(d 
*x + c) + 1)^2)/b^3 + (a^2 + b^2)*log(sin(d*x + c)/(cos(d*x + c) + 1) + 1) 
/b^3 + (a^2 + b^2)*log(sin(d*x + c)/(cos(d*x + c) + 1) - 1)/b^3)/d
 

Giac [A] (verification not implemented)

Time = 0.15 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.61 \[ \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {\frac {b \tan \left (d x + c\right )^{2} - 2 \, a \tan \left (d x + c\right )}{b^{2}} + \frac {2 \, {\left (a^{2} + b^{2}\right )} \log \left ({\left | b \tan \left (d x + c\right ) + a \right |}\right )}{b^{3}}}{2 \, d} \] Input:

integrate(sec(d*x+c)^3/(a*cos(d*x+c)+b*sin(d*x+c)),x, algorithm="giac")
 

Output:

1/2*((b*tan(d*x + c)^2 - 2*a*tan(d*x + c))/b^2 + 2*(a^2 + b^2)*log(abs(b*t 
an(d*x + c) + a))/b^3)/d
 

Mupad [B] (verification not implemented)

Time = 17.32 (sec) , antiderivative size = 300, normalized size of antiderivative = 3.41 \[ \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {2\,b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3-2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{d\,\left (b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-2\,b^3\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^3\right )}-\frac {a^2\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,2{}\mathrm {i}+b^2\,\mathrm {atan}\left (\frac {b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2\,1{}\mathrm {i}-b^2\,1{}\mathrm {i}+2{}\mathrm {i}\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{-2\,a^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+2\,a^2+2\,a\,b\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-b^2\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+b^2}\right )\,2{}\mathrm {i}}{b^3\,d} \] Input:

int(1/(cos(c + d*x)^3*(a*cos(c + d*x) + b*sin(c + d*x))),x)
 

Output:

(2*b^2*tan(c/2 + (d*x)/2)^2 + 2*a*b*tan(c/2 + (d*x)/2)^3 - 2*a*b*tan(c/2 + 
 (d*x)/2))/(d*(b^3*tan(c/2 + (d*x)/2)^4 - 2*b^3*tan(c/2 + (d*x)/2)^2 + b^3 
)) - (a^2*atan((b^2*tan(c/2 + (d*x)/2)^2*1i - b^2*1i + a*b*tan(c/2 + (d*x) 
/2)*2i)/(2*a^2 - b^2*tan(c/2 + (d*x)/2)^2 - 2*a^2*tan(c/2 + (d*x)/2)^2 + b 
^2 + 2*a*b*tan(c/2 + (d*x)/2)))*2i + b^2*atan((b^2*tan(c/2 + (d*x)/2)^2*1i 
 - b^2*1i + a*b*tan(c/2 + (d*x)/2)*2i)/(2*a^2 - b^2*tan(c/2 + (d*x)/2)^2 - 
 2*a^2*tan(c/2 + (d*x)/2)^2 + b^2 + 2*a*b*tan(c/2 + (d*x)/2)))*2i)/(b^3*d)
 

Reduce [B] (verification not implemented)

Time = 0.17 (sec) , antiderivative size = 378, normalized size of antiderivative = 4.30 \[ \int \frac {\sec ^3(c+d x)}{a \cos (c+d x)+b \sin (c+d x)} \, dx=\frac {2 \cos \left (d x +c \right ) \sin \left (d x +c \right ) a b -2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} a^{2}-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) \sin \left (d x +c \right )^{2} b^{2}+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) a^{2}+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )-1\right ) b^{2}-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} a^{2}-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) \sin \left (d x +c \right )^{2} b^{2}+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) a^{2}+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right ) b^{2}+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b -a \right ) \sin \left (d x +c \right )^{2} a^{2}+2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b -a \right ) \sin \left (d x +c \right )^{2} b^{2}-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b -a \right ) a^{2}-2 \,\mathrm {log}\left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a -2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) b -a \right ) b^{2}+\sin \left (d x +c \right )^{2} b^{2}-2 b^{2}}{2 b^{3} d \left (\sin \left (d x +c \right )^{2}-1\right )} \] Input:

int(sec(d*x+c)^3/(a*cos(d*x+c)+b*sin(d*x+c)),x)
 

Output:

(2*cos(c + d*x)*sin(c + d*x)*a*b - 2*log(tan((c + d*x)/2) - 1)*sin(c + d*x 
)**2*a**2 - 2*log(tan((c + d*x)/2) - 1)*sin(c + d*x)**2*b**2 + 2*log(tan(( 
c + d*x)/2) - 1)*a**2 + 2*log(tan((c + d*x)/2) - 1)*b**2 - 2*log(tan((c + 
d*x)/2) + 1)*sin(c + d*x)**2*a**2 - 2*log(tan((c + d*x)/2) + 1)*sin(c + d* 
x)**2*b**2 + 2*log(tan((c + d*x)/2) + 1)*a**2 + 2*log(tan((c + d*x)/2) + 1 
)*b**2 + 2*log(tan((c + d*x)/2)**2*a - 2*tan((c + d*x)/2)*b - a)*sin(c + d 
*x)**2*a**2 + 2*log(tan((c + d*x)/2)**2*a - 2*tan((c + d*x)/2)*b - a)*sin( 
c + d*x)**2*b**2 - 2*log(tan((c + d*x)/2)**2*a - 2*tan((c + d*x)/2)*b - a) 
*a**2 - 2*log(tan((c + d*x)/2)**2*a - 2*tan((c + d*x)/2)*b - a)*b**2 + sin 
(c + d*x)**2*b**2 - 2*b**2)/(2*b**3*d*(sin(c + d*x)**2 - 1))