Integrand size = 30, antiderivative size = 42 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))}{c-c \sec (e+f x)} \, dx=-\frac {a \text {arctanh}(\sin (e+f x))}{c f}-\frac {2 a \tan (e+f x)}{f (c-c \sec (e+f x))} \] Output:
-a*arctanh(sin(f*x+e))/c/f-2*a*tan(f*x+e)/f/(c-c*sec(f*x+e))
Time = 0.13 (sec) , antiderivative size = 77, normalized size of antiderivative = 1.83 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))}{c-c \sec (e+f x)} \, dx=-\frac {a \left (-\frac {2 \cot \left (\frac {1}{2} (e+f x)\right )}{f}-\frac {\log \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right )}{f}+\frac {\log \left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right )}{f}\right )}{c} \] Input:
Integrate[(Sec[e + f*x]*(a + a*Sec[e + f*x]))/(c - c*Sec[e + f*x]),x]
Output:
-((a*((-2*Cot[(e + f*x)/2])/f - Log[Cos[(e + f*x)/2] - Sin[(e + f*x)/2]]/f + Log[Cos[(e + f*x)/2] + Sin[(e + f*x)/2]]/f))/c)
Time = 0.29 (sec) , antiderivative size = 42, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.133, Rules used = {3042, 4445, 3042, 4257}
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 \sec (e+f x)+a)}{c-c \sec (e+f x)} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {\csc \left (e+f x+\frac {\pi }{2}\right ) \left (a \csc \left (e+f x+\frac {\pi }{2}\right )+a\right )}{c-c \csc \left (e+f x+\frac {\pi }{2}\right )}dx\) |
\(\Big \downarrow \) 4445 |
\(\displaystyle -\frac {a \int \sec (e+f x)dx}{c}-\frac {2 a \tan (e+f x)}{f (c-c \sec (e+f x))}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle -\frac {a \int \csc \left (e+f x+\frac {\pi }{2}\right )dx}{c}-\frac {2 a \tan (e+f x)}{f (c-c \sec (e+f x))}\) |
\(\Big \downarrow \) 4257 |
\(\displaystyle -\frac {a \text {arctanh}(\sin (e+f x))}{c f}-\frac {2 a \tan (e+f x)}{f (c-c \sec (e+f x))}\) |
Input:
Int[(Sec[e + f*x]*(a + a*Sec[e + f*x]))/(c - c*Sec[e + f*x]),x]
Output:
-((a*ArcTanh[Sin[e + f*x]])/(c*f)) - (2*a*Tan[e + f*x])/(f*(c - c*Sec[e + f*x]))
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]*(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(m_)*(cs c[(e_.) + (f_.)*(x_)]*(d_.) + (c_))^(n_.), x_Symbol] :> Simp[2*a*c*Cot[e + f*x]*(a + b*Csc[e + f*x])^m*((c + d*Csc[e + f*x])^(n - 1)/(b*f*(2*m + 1))), x] - Simp[d*((2*n - 1)/(b*(2*m + 1))) Int[Csc[e + f*x]*(a + b*Csc[e + f* x])^(m + 1)*(c + d*Csc[e + f*x])^(n - 1), x], x] /; FreeQ[{a, b, c, d, e, f }, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 - b^2, 0] && IGtQ[n, 0] && LtQ[m, -2^ (-1)] && IntegerQ[2*m]
Time = 0.12 (sec) , antiderivative size = 47, normalized size of antiderivative = 1.12
method | result | size |
parallelrisch | \(\frac {a \left (\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )-\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )+2 \cot \left (\frac {f x}{2}+\frac {e}{2}\right )\right )}{c f}\) | \(47\) |
derivativedivides | \(\frac {2 a \left (-\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}+\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}+\frac {1}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}\right )}{f c}\) | \(50\) |
default | \(\frac {2 a \left (-\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{2}+\frac {\ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{2}+\frac {1}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )}\right )}{f c}\) | \(50\) |
risch | \(\frac {4 i a}{f c \left ({\mathrm e}^{i \left (f x +e \right )}-1\right )}+\frac {a \ln \left ({\mathrm e}^{i \left (f x +e \right )}-i\right )}{c f}-\frac {a \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{c f}\) | \(68\) |
norman | \(\frac {-\frac {2 a}{c f}+\frac {2 a \tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}}{c f}}{\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}-1\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}+\frac {a \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right )}{c f}-\frac {a \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{c f}\) | \(100\) |
Input:
int(sec(f*x+e)*(a+a*sec(f*x+e))/(c-c*sec(f*x+e)),x,method=_RETURNVERBOSE)
Output:
1/c/f*a*(ln(tan(1/2*f*x+1/2*e)-1)-ln(tan(1/2*f*x+1/2*e)+1)+2*cot(1/2*f*x+1 /2*e))
Time = 0.08 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.57 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))}{c-c \sec (e+f x)} \, dx=-\frac {a \log \left (\sin \left (f x + e\right ) + 1\right ) \sin \left (f x + e\right ) - a \log \left (-\sin \left (f x + e\right ) + 1\right ) \sin \left (f x + e\right ) - 4 \, a \cos \left (f x + e\right ) - 4 \, a}{2 \, c f \sin \left (f x + e\right )} \] Input:
integrate(sec(f*x+e)*(a+a*sec(f*x+e))/(c-c*sec(f*x+e)),x, algorithm="frica s")
Output:
-1/2*(a*log(sin(f*x + e) + 1)*sin(f*x + e) - a*log(-sin(f*x + e) + 1)*sin( f*x + e) - 4*a*cos(f*x + e) - 4*a)/(c*f*sin(f*x + e))
\[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))}{c-c \sec (e+f x)} \, dx=- \frac {a \left (\int \frac {\sec {\left (e + f x \right )}}{\sec {\left (e + f x \right )} - 1}\, dx + \int \frac {\sec ^{2}{\left (e + f x \right )}}{\sec {\left (e + f x \right )} - 1}\, dx\right )}{c} \] Input:
integrate(sec(f*x+e)*(a+a*sec(f*x+e))/(c-c*sec(f*x+e)),x)
Output:
-a*(Integral(sec(e + f*x)/(sec(e + f*x) - 1), x) + Integral(sec(e + f*x)** 2/(sec(e + f*x) - 1), x))/c
Leaf count of result is larger than twice the leaf count of optimal. 101 vs. \(2 (43) = 86\).
Time = 0.03 (sec) , antiderivative size = 101, normalized size of antiderivative = 2.40 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))}{c-c \sec (e+f x)} \, dx=-\frac {a {\left (\frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} + 1\right )}{c} - \frac {\log \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1} - 1\right )}{c} - \frac {\cos \left (f x + e\right ) + 1}{c \sin \left (f x + e\right )}\right )} - \frac {a {\left (\cos \left (f x + e\right ) + 1\right )}}{c \sin \left (f x + e\right )}}{f} \] Input:
integrate(sec(f*x+e)*(a+a*sec(f*x+e))/(c-c*sec(f*x+e)),x, algorithm="maxim a")
Output:
-(a*(log(sin(f*x + e)/(cos(f*x + e) + 1) + 1)/c - log(sin(f*x + e)/(cos(f* x + e) + 1) - 1)/c - (cos(f*x + e) + 1)/(c*sin(f*x + e))) - a*(cos(f*x + e ) + 1)/(c*sin(f*x + e)))/f
Time = 0.14 (sec) , antiderivative size = 60, normalized size of antiderivative = 1.43 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))}{c-c \sec (e+f x)} \, dx=-\frac {\frac {a \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) + 1 \right |}\right )}{c} - \frac {a \log \left ({\left | \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right ) - 1 \right |}\right )}{c} - \frac {2 \, a}{c \tan \left (\frac {1}{2} \, f x + \frac {1}{2} \, e\right )}}{f} \] Input:
integrate(sec(f*x+e)*(a+a*sec(f*x+e))/(c-c*sec(f*x+e)),x, algorithm="giac" )
Output:
-(a*log(abs(tan(1/2*f*x + 1/2*e) + 1))/c - a*log(abs(tan(1/2*f*x + 1/2*e) - 1))/c - 2*a/(c*tan(1/2*f*x + 1/2*e)))/f
Time = 10.71 (sec) , antiderivative size = 31, normalized size of antiderivative = 0.74 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))}{c-c \sec (e+f x)} \, dx=-\frac {2\,a\,\left (\mathrm {atanh}\left (\mathrm {tan}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )-\mathrm {cot}\left (\frac {e}{2}+\frac {f\,x}{2}\right )\right )}{c\,f} \] Input:
int((a + a/cos(e + f*x))/(cos(e + f*x)*(c - c/cos(e + f*x))),x)
Output:
-(2*a*(atanh(tan(e/2 + (f*x)/2)) - cot(e/2 + (f*x)/2)))/(c*f)
Time = 0.17 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.57 \[ \int \frac {\sec (e+f x) (a+a \sec (e+f x))}{c-c \sec (e+f x)} \, dx=\frac {a \left (\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )-1\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )-\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right )+2\right )}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c f} \] Input:
int(sec(f*x+e)*(a+a*sec(f*x+e))/(c-c*sec(f*x+e)),x)
Output:
(a*(log(tan((e + f*x)/2) - 1)*tan((e + f*x)/2) - log(tan((e + f*x)/2) + 1) *tan((e + f*x)/2) + 2))/(tan((e + f*x)/2)*c*f)