Integrand size = 18, antiderivative size = 67 \[ \int \frac {c+d x}{a+a \sec (e+f x)} \, dx=\frac {(c+d x)^2}{2 a d}-\frac {2 d \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2}-\frac {(c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f} \] Output:
1/2*(d*x+c)^2/a/d-2*d*ln(cos(1/2*f*x+1/2*e))/a/f^2-(d*x+c)*tan(1/2*f*x+1/2 *e)/a/f
Time = 0.63 (sec) , antiderivative size = 104, normalized size of antiderivative = 1.55 \[ \int \frac {c+d x}{a+a \sec (e+f x)} \, dx=\frac {\cos \left (\frac {1}{2} (e+f x)\right ) \sec (e+f x) \left (-2 f (c+d x) \sec \left (\frac {e}{2}\right ) \sin \left (\frac {f x}{2}\right )+\cos \left (\frac {1}{2} (e+f x)\right ) \left (f^2 x (2 c+d x)-4 d \log \left (\cos \left (\frac {1}{2} (e+f x)\right )\right )-2 d f x \tan \left (\frac {e}{2}\right )\right )\right )}{a f^2 (1+\sec (e+f x))} \] Input:
Integrate[(c + d*x)/(a + a*Sec[e + f*x]),x]
Output:
(Cos[(e + f*x)/2]*Sec[e + f*x]*(-2*f*(c + d*x)*Sec[e/2]*Sin[(f*x)/2] + Cos [(e + f*x)/2]*(f^2*x*(2*c + d*x) - 4*d*Log[Cos[(e + f*x)/2]] - 2*d*f*x*Tan [e/2])))/(a*f^2*(1 + Sec[e + f*x]))
Time = 0.30 (sec) , antiderivative size = 67, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {3042, 4679, 2009}
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 {c+d x}{a \sec (e+f x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {c+d x}{a \csc \left (e+f x+\frac {\pi }{2}\right )+a}dx\) |
\(\Big \downarrow \) 4679 |
\(\displaystyle \int \left (\frac {c+d x}{a}-\frac {c+d x}{a \cos (e+f x)+a}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {(c+d x) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}+\frac {(c+d x)^2}{2 a d}-\frac {2 d \log \left (\cos \left (\frac {e}{2}+\frac {f x}{2}\right )\right )}{a f^2}\) |
Input:
Int[(c + d*x)/(a + a*Sec[e + f*x]),x]
Output:
(c + d*x)^2/(2*a*d) - (2*d*Log[Cos[e/2 + (f*x)/2]])/(a*f^2) - ((c + d*x)*T an[e/2 + (f*x)/2])/(a*f)
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.) + (a_))^(n_.)*((c_.) + (d_.)*(x_))^(m_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, 1/(Sin[e + f*x]^n/(b + a*Si n[e + f*x])^n), x], x] /; FreeQ[{a, b, c, d, e, f}, x] && ILtQ[n, 0] && IGt Q[m, 0]
Time = 0.15 (sec) , antiderivative size = 53, normalized size of antiderivative = 0.79
method | result | size |
parallelrisch | \(\frac {d \ln \left (\sec \left (\frac {e}{2}+\frac {f x}{2}\right )^{2}\right )+\left (\left (-d x -c \right ) \tan \left (\frac {e}{2}+\frac {f x}{2}\right )+f x \left (\frac {d x}{2}+c \right )\right ) f}{a \,f^{2}}\) | \(53\) |
norman | \(\frac {c x}{a}+\frac {d \,x^{2}}{2 a}-\frac {c \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}-\frac {d x \tan \left (\frac {e}{2}+\frac {f x}{2}\right )}{a f}+\frac {d \ln \left (1+\tan \left (\frac {e}{2}+\frac {f x}{2}\right )^{2}\right )}{a \,f^{2}}\) | \(76\) |
risch | \(\frac {d \,x^{2}}{2 a}+\frac {c x}{a}+\frac {2 i d x}{a f}+\frac {2 i d e}{a \,f^{2}}-\frac {2 i \left (d x +c \right )}{f a \left (1+{\mathrm e}^{i \left (f x +e \right )}\right )}-\frac {2 d \ln \left (1+{\mathrm e}^{i \left (f x +e \right )}\right )}{a \,f^{2}}\) | \(87\) |
Input:
int((d*x+c)/(a+a*sec(f*x+e)),x,method=_RETURNVERBOSE)
Output:
(d*ln(sec(1/2*e+1/2*f*x)^2)+((-d*x-c)*tan(1/2*e+1/2*f*x)+f*x*(1/2*d*x+c))* f)/a/f^2
Time = 0.08 (sec) , antiderivative size = 99, normalized size of antiderivative = 1.48 \[ \int \frac {c+d x}{a+a \sec (e+f x)} \, dx=\frac {d f^{2} x^{2} + 2 \, c f^{2} x + {\left (d f^{2} x^{2} + 2 \, c f^{2} x\right )} \cos \left (f x + e\right ) - 2 \, {\left (d \cos \left (f x + e\right ) + d\right )} \log \left (\frac {1}{2} \, \cos \left (f x + e\right ) + \frac {1}{2}\right ) - 2 \, {\left (d f x + c f\right )} \sin \left (f x + e\right )}{2 \, {\left (a f^{2} \cos \left (f x + e\right ) + a f^{2}\right )}} \] Input:
integrate((d*x+c)/(a+a*sec(f*x+e)),x, algorithm="fricas")
Output:
1/2*(d*f^2*x^2 + 2*c*f^2*x + (d*f^2*x^2 + 2*c*f^2*x)*cos(f*x + e) - 2*(d*c os(f*x + e) + d)*log(1/2*cos(f*x + e) + 1/2) - 2*(d*f*x + c*f)*sin(f*x + e ))/(a*f^2*cos(f*x + e) + a*f^2)
\[ \int \frac {c+d x}{a+a \sec (e+f x)} \, dx=\frac {\int \frac {c}{\sec {\left (e + f x \right )} + 1}\, dx + \int \frac {d x}{\sec {\left (e + f x \right )} + 1}\, dx}{a} \] Input:
integrate((d*x+c)/(a+a*sec(f*x+e)),x)
Output:
(Integral(c/(sec(e + f*x) + 1), x) + Integral(d*x/(sec(e + f*x) + 1), x))/ a
Leaf count of result is larger than twice the leaf count of optimal. 273 vs. \(2 (57) = 114\).
Time = 0.12 (sec) , antiderivative size = 273, normalized size of antiderivative = 4.07 \[ \int \frac {c+d x}{a+a \sec (e+f x)} \, dx=-\frac {2 \, d e {\left (\frac {2 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a f} - \frac {\sin \left (f x + e\right )}{a f {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - 2 \, c {\left (\frac {2 \, \arctan \left (\frac {\sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}\right )}{a} - \frac {\sin \left (f x + e\right )}{a {\left (\cos \left (f x + e\right ) + 1\right )}}\right )} - \frac {{\left ({\left (f x + e\right )}^{2} \cos \left (f x + e\right )^{2} + {\left (f x + e\right )}^{2} \sin \left (f x + e\right )^{2} + 2 \, {\left (f x + e\right )}^{2} \cos \left (f x + e\right ) + {\left (f x + e\right )}^{2} - 2 \, {\left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} + 2 \, \cos \left (f x + e\right ) + 1\right ) - 4 \, {\left (f x + e\right )} \sin \left (f x + e\right )\right )} d}{a f \cos \left (f x + e\right )^{2} + a f \sin \left (f x + e\right )^{2} + 2 \, a f \cos \left (f x + e\right ) + a f}}{2 \, f} \] Input:
integrate((d*x+c)/(a+a*sec(f*x+e)),x, algorithm="maxima")
Output:
-1/2*(2*d*e*(2*arctan(sin(f*x + e)/(cos(f*x + e) + 1))/(a*f) - sin(f*x + e )/(a*f*(cos(f*x + e) + 1))) - 2*c*(2*arctan(sin(f*x + e)/(cos(f*x + e) + 1 ))/a - sin(f*x + e)/(a*(cos(f*x + e) + 1))) - ((f*x + e)^2*cos(f*x + e)^2 + (f*x + e)^2*sin(f*x + e)^2 + 2*(f*x + e)^2*cos(f*x + e) + (f*x + e)^2 - 2*(cos(f*x + e)^2 + sin(f*x + e)^2 + 2*cos(f*x + e) + 1)*log(cos(f*x + e)^ 2 + sin(f*x + e)^2 + 2*cos(f*x + e) + 1) - 4*(f*x + e)*sin(f*x + e))*d/(a* f*cos(f*x + e)^2 + a*f*sin(f*x + e)^2 + 2*a*f*cos(f*x + e) + a*f))/f
Leaf count of result is larger than twice the leaf count of optimal. 248 vs. \(2 (57) = 114\).
Time = 0.22 (sec) , antiderivative size = 248, normalized size of antiderivative = 3.70 \[ \int \frac {c+d x}{a+a \sec (e+f x)} \, dx=\frac {d f^{2} x^{2} \tan \left (\frac {1}{2} \, f x\right ) \tan \left (\frac {1}{2} \, e\right ) + 2 \, c f^{2} x \tan \left (\frac {1}{2} \, f x\right ) \tan \left (\frac {1}{2} \, e\right ) - d f^{2} x^{2} - 2 \, c f^{2} x + 2 \, d f x \tan \left (\frac {1}{2} \, f x\right ) + 2 \, d f x \tan \left (\frac {1}{2} \, e\right ) - 2 \, d \log \left (\frac {4 \, {\left (\tan \left (\frac {1}{2} \, f x\right )^{2} \tan \left (\frac {1}{2} \, e\right )^{2} - 2 \, \tan \left (\frac {1}{2} \, f x\right ) \tan \left (\frac {1}{2} \, e\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, f x\right )^{2} \tan \left (\frac {1}{2} \, e\right )^{2} + \tan \left (\frac {1}{2} \, f x\right )^{2} + \tan \left (\frac {1}{2} \, e\right )^{2} + 1}\right ) \tan \left (\frac {1}{2} \, f x\right ) \tan \left (\frac {1}{2} \, e\right ) + 2 \, c f \tan \left (\frac {1}{2} \, f x\right ) + 2 \, c f \tan \left (\frac {1}{2} \, e\right ) + 2 \, d \log \left (\frac {4 \, {\left (\tan \left (\frac {1}{2} \, f x\right )^{2} \tan \left (\frac {1}{2} \, e\right )^{2} - 2 \, \tan \left (\frac {1}{2} \, f x\right ) \tan \left (\frac {1}{2} \, e\right ) + 1\right )}}{\tan \left (\frac {1}{2} \, f x\right )^{2} \tan \left (\frac {1}{2} \, e\right )^{2} + \tan \left (\frac {1}{2} \, f x\right )^{2} + \tan \left (\frac {1}{2} \, e\right )^{2} + 1}\right )}{2 \, {\left (a f^{2} \tan \left (\frac {1}{2} \, f x\right ) \tan \left (\frac {1}{2} \, e\right ) - a f^{2}\right )}} \] Input:
integrate((d*x+c)/(a+a*sec(f*x+e)),x, algorithm="giac")
Output:
1/2*(d*f^2*x^2*tan(1/2*f*x)*tan(1/2*e) + 2*c*f^2*x*tan(1/2*f*x)*tan(1/2*e) - d*f^2*x^2 - 2*c*f^2*x + 2*d*f*x*tan(1/2*f*x) + 2*d*f*x*tan(1/2*e) - 2*d *log(4*(tan(1/2*f*x)^2*tan(1/2*e)^2 - 2*tan(1/2*f*x)*tan(1/2*e) + 1)/(tan( 1/2*f*x)^2*tan(1/2*e)^2 + tan(1/2*f*x)^2 + tan(1/2*e)^2 + 1))*tan(1/2*f*x) *tan(1/2*e) + 2*c*f*tan(1/2*f*x) + 2*c*f*tan(1/2*e) + 2*d*log(4*(tan(1/2*f *x)^2*tan(1/2*e)^2 - 2*tan(1/2*f*x)*tan(1/2*e) + 1)/(tan(1/2*f*x)^2*tan(1/ 2*e)^2 + tan(1/2*f*x)^2 + tan(1/2*e)^2 + 1)))/(a*f^2*tan(1/2*f*x)*tan(1/2* e) - a*f^2)
Time = 15.24 (sec) , antiderivative size = 79, normalized size of antiderivative = 1.18 \[ \int \frac {c+d x}{a+a \sec (e+f x)} \, dx=\frac {d\,x^2}{2\,a}-\frac {2\,d\,\ln \left ({\mathrm {e}}^{e\,1{}\mathrm {i}}\,{\mathrm {e}}^{f\,x\,1{}\mathrm {i}}+1\right )}{a\,f^2}-\frac {\left (c+d\,x\right )\,2{}\mathrm {i}}{a\,f\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+1\right )}+\frac {x\,\left (c\,f+d\,2{}\mathrm {i}\right )}{a\,f} \] Input:
int((c + d*x)/(a + a/cos(e + f*x)),x)
Output:
(d*x^2)/(2*a) - (2*d*log(exp(e*1i)*exp(f*x*1i) + 1))/(a*f^2) - ((c + d*x)* 2i)/(a*f*(exp(e*1i + f*x*1i) + 1)) + (x*(d*2i + c*f))/(a*f)
Time = 0.18 (sec) , antiderivative size = 68, normalized size of antiderivative = 1.01 \[ \int \frac {c+d x}{a+a \sec (e+f x)} \, dx=\frac {2 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) d -2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c f -2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d f x +2 c \,f^{2} x +d \,f^{2} x^{2}}{2 a \,f^{2}} \] Input:
int((d*x+c)/(a+a*sec(f*x+e)),x)
Output:
(2*log(tan((e + f*x)/2)**2 + 1)*d - 2*tan((e + f*x)/2)*c*f - 2*tan((e + f* x)/2)*d*f*x + 2*c*f**2*x + d*f**2*x**2)/(2*a*f**2)