Integrand size = 18, antiderivative size = 60 \[ \int \frac {c+d x}{a+a \sin (e+f x)} \, dx=-\frac {(c+d x) \cot \left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )}{a f}+\frac {2 d \log \left (\sin \left (\frac {e}{2}+\frac {\pi }{4}+\frac {f x}{2}\right )\right )}{a f^2} \] Output:
-(d*x+c)*cot(1/2*e+1/4*Pi+1/2*f*x)/a/f+2*d*ln(sin(1/2*e+1/4*Pi+1/2*f*x))/a /f^2
Time = 0.19 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.85 \[ \int \frac {c+d x}{a+a \sin (e+f x)} \, dx=\frac {2 d \log \left (\cos \left (\frac {1}{4} (2 e-\pi +2 f x)\right )\right )+f (c+d x) \tan \left (\frac {1}{4} (2 e-\pi +2 f x)\right )}{a f^2} \] Input:
Integrate[(c + d*x)/(a + a*Sin[e + f*x]),x]
Output:
(2*d*Log[Cos[(2*e - Pi + 2*f*x)/4]] + f*(c + d*x)*Tan[(2*e - Pi + 2*f*x)/4 ])/(a*f^2)
Time = 0.37 (sec) , antiderivative size = 63, normalized size of antiderivative = 1.05, number of steps used = 7, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.389, Rules used = {3042, 3799, 3042, 4672, 3042, 25, 3956}
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 \sin (e+f x)+a} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {c+d x}{a \sin (e+f x)+a}dx\) |
\(\Big \downarrow \) 3799 |
\(\displaystyle \frac {\int (c+d x) \csc ^2\left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )dx}{2 a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\int (c+d x) \csc \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )^2dx}{2 a}\) |
\(\Big \downarrow \) 4672 |
\(\displaystyle \frac {\frac {2 d \int \cot \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )dx}{f}-\frac {2 (c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{f}}{2 a}\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \frac {\frac {2 d \int -\tan \left (\frac {e}{2}+\frac {f x}{2}+\frac {3 \pi }{4}\right )dx}{f}-\frac {2 (c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{f}}{2 a}\) |
\(\Big \downarrow \) 25 |
\(\displaystyle \frac {-\frac {2 d \int \tan \left (\frac {1}{4} (2 e+3 \pi )+\frac {f x}{2}\right )dx}{f}-\frac {2 (c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{f}}{2 a}\) |
\(\Big \downarrow \) 3956 |
\(\displaystyle \frac {\frac {4 d \log \left (-\cos \left (\frac {e}{2}+\frac {f x}{2}-\frac {\pi }{4}\right )\right )}{f^2}-\frac {2 (c+d x) \cot \left (\frac {e}{2}+\frac {f x}{2}+\frac {\pi }{4}\right )}{f}}{2 a}\) |
Input:
Int[(c + d*x)/(a + a*Sin[e + f*x]),x]
Output:
((-2*(c + d*x)*Cot[e/2 + Pi/4 + (f*x)/2])/f + (4*d*Log[-Cos[e/2 - Pi/4 + ( f*x)/2]])/f^2)/(2*a)
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Simp[(2*a)^n Int[(c + d*x)^m*Sin[(1/2)*(e + Pi*(a/(2*b))) + f*(x/2)]^(2*n), x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && EqQ[a^2 - b^ 2, 0] && IntegerQ[n] && (GtQ[n, 0] || IGtQ[m, 0])
Int[tan[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-Log[RemoveContent[Cos[c + d *x], x]]/d, x] /; FreeQ[{c, d}, x]
Int[csc[(e_.) + (f_.)*(x_)]^2*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp [(-(c + d*x)^m)*(Cot[e + f*x]/f), x] + Simp[d*(m/f) Int[(c + d*x)^(m - 1) *Cot[e + f*x], x], x] /; FreeQ[{c, d, e, f}, x] && GtQ[m, 0]
Result contains complex when optimal does not.
Time = 0.69 (sec) , antiderivative size = 73, normalized size of antiderivative = 1.22
method | result | size |
risch | \(-\frac {2 i d x}{a f}-\frac {2 i d e}{a \,f^{2}}-\frac {2 \left (d x +c \right )}{f a \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}+\frac {2 d \ln \left ({\mathrm e}^{i \left (f x +e \right )}+i\right )}{a \,f^{2}}\) | \(73\) |
parallelrisch | \(\frac {-d \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) \ln \left (\sec \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )+2 d \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 \left (-\frac {d x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{2}+\frac {d x}{2}+c \right ) f}{a \,f^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}\) | \(96\) |
norman | \(\frac {\frac {2 c \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f a}+\frac {d x \tan \left (\frac {f x}{2}+\frac {e}{2}\right )}{f a}-\frac {d x}{f a}}{\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1}+\frac {2 d \ln \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )}{a \,f^{2}}-\frac {d \ln \left (1+\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}\right )}{a \,f^{2}}\) | \(107\) |
Input:
int((d*x+c)/(a+a*sin(f*x+e)),x,method=_RETURNVERBOSE)
Output:
-2*I*d/a/f*x-2*I*d/a/f^2*e-2*(d*x+c)/f/a/(exp(I*(f*x+e))+I)+2*d/a/f^2*ln(e xp(I*(f*x+e))+I)
Leaf count of result is larger than twice the leaf count of optimal. 100 vs. \(2 (48) = 96\).
Time = 0.08 (sec) , antiderivative size = 100, normalized size of antiderivative = 1.67 \[ \int \frac {c+d x}{a+a \sin (e+f x)} \, dx=-\frac {d f x + c f + {\left (d f x + c f\right )} \cos \left (f x + e\right ) - {\left (d \cos \left (f x + e\right ) + d \sin \left (f x + e\right ) + d\right )} \log \left (\sin \left (f x + e\right ) + 1\right ) - {\left (d f x + c f\right )} \sin \left (f x + e\right )}{a f^{2} \cos \left (f x + e\right ) + a f^{2} \sin \left (f x + e\right ) + a f^{2}} \] Input:
integrate((d*x+c)/(a+a*sin(f*x+e)),x, algorithm="fricas")
Output:
-(d*f*x + c*f + (d*f*x + c*f)*cos(f*x + e) - (d*cos(f*x + e) + d*sin(f*x + e) + d)*log(sin(f*x + e) + 1) - (d*f*x + c*f)*sin(f*x + e))/(a*f^2*cos(f* x + e) + a*f^2*sin(f*x + e) + a*f^2)
Leaf count of result is larger than twice the leaf count of optimal. 272 vs. \(2 (46) = 92\).
Time = 0.45 (sec) , antiderivative size = 272, normalized size of antiderivative = 4.53 \[ \int \frac {c+d x}{a+a \sin (e+f x)} \, dx=\begin {cases} - \frac {2 c f}{a f^{2} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f^{2}} + \frac {d f x \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a f^{2} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f^{2}} - \frac {d f x}{a f^{2} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f^{2}} + \frac {2 d \log {\left (\tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1 \right )} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a f^{2} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f^{2}} + \frac {2 d \log {\left (\tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1 \right )}}{a f^{2} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f^{2}} - \frac {d \log {\left (\tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1 \right )} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )}}{a f^{2} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f^{2}} - \frac {d \log {\left (\tan ^{2}{\left (\frac {e}{2} + \frac {f x}{2} \right )} + 1 \right )}}{a f^{2} \tan {\left (\frac {e}{2} + \frac {f x}{2} \right )} + a f^{2}} & \text {for}\: f \neq 0 \\\frac {c x + \frac {d x^{2}}{2}}{a \sin {\left (e \right )} + a} & \text {otherwise} \end {cases} \] Input:
integrate((d*x+c)/(a+a*sin(f*x+e)),x)
Output:
Piecewise((-2*c*f/(a*f**2*tan(e/2 + f*x/2) + a*f**2) + d*f*x*tan(e/2 + f*x /2)/(a*f**2*tan(e/2 + f*x/2) + a*f**2) - d*f*x/(a*f**2*tan(e/2 + f*x/2) + a*f**2) + 2*d*log(tan(e/2 + f*x/2) + 1)*tan(e/2 + f*x/2)/(a*f**2*tan(e/2 + f*x/2) + a*f**2) + 2*d*log(tan(e/2 + f*x/2) + 1)/(a*f**2*tan(e/2 + f*x/2) + a*f**2) - d*log(tan(e/2 + f*x/2)**2 + 1)*tan(e/2 + f*x/2)/(a*f**2*tan(e /2 + f*x/2) + a*f**2) - d*log(tan(e/2 + f*x/2)**2 + 1)/(a*f**2*tan(e/2 + f *x/2) + a*f**2), Ne(f, 0)), ((c*x + d*x**2/2)/(a*sin(e) + a), True))
Leaf count of result is larger than twice the leaf count of optimal. 169 vs. \(2 (48) = 96\).
Time = 0.04 (sec) , antiderivative size = 169, normalized size of antiderivative = 2.82 \[ \int \frac {c+d x}{a+a \sin (e+f x)} \, dx=-\frac {\frac {{\left (2 \, {\left (f x + e\right )} \cos \left (f x + e\right ) - {\left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} + 2 \, \sin \left (f x + e\right ) + 1\right )} \log \left (\cos \left (f x + e\right )^{2} + \sin \left (f x + e\right )^{2} + 2 \, \sin \left (f x + e\right ) + 1\right )\right )} d}{a f \cos \left (f x + e\right )^{2} + a f \sin \left (f x + e\right )^{2} + 2 \, a f \sin \left (f x + e\right ) + a f} - \frac {2 \, d e}{a f + \frac {a f \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}} + \frac {2 \, c}{a + \frac {a \sin \left (f x + e\right )}{\cos \left (f x + e\right ) + 1}}}{f} \] Input:
integrate((d*x+c)/(a+a*sin(f*x+e)),x, algorithm="maxima")
Output:
-((2*(f*x + e)*cos(f*x + e) - (cos(f*x + e)^2 + sin(f*x + e)^2 + 2*sin(f*x + e) + 1)*log(cos(f*x + e)^2 + sin(f*x + e)^2 + 2*sin(f*x + e) + 1))*d/(a *f*cos(f*x + e)^2 + a*f*sin(f*x + e)^2 + 2*a*f*sin(f*x + e) + a*f) - 2*d*e /(a*f + a*f*sin(f*x + e)/(cos(f*x + e) + 1)) + 2*c/(a + a*sin(f*x + e)/(co s(f*x + e) + 1)))/f
Leaf count of result is larger than twice the leaf count of optimal. 548 vs. \(2 (48) = 96\).
Time = 0.41 (sec) , antiderivative size = 548, normalized size of antiderivative = 9.13 \[ \int \frac {c+d x}{a+a \sin (e+f x)} \, dx=\text {Too large to display} \] Input:
integrate((d*x+c)/(a+a*sin(f*x+e)),x, algorithm="giac")
Output:
-(d*f*x*tan(1/2*f*x)*tan(1/2*e) + d*f*x*tan(1/2*f*x) + d*f*x*tan(1/2*e) + c*f*tan(1/2*f*x)*tan(1/2*e) - d*log(2*(tan(1/2*f*x)^2*tan(1/2*e)^2 - 2*tan (1/2*f*x)^2*tan(1/2*e) - 2*tan(1/2*f*x)*tan(1/2*e)^2 + tan(1/2*f*x)^2 + ta n(1/2*e)^2 + 2*tan(1/2*f*x) + 2*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) - d*f*x + c*f*tan(1/2*f*x) + d*log(2*(tan(1/2*f*x)^2*tan(1/2*e)^2 - 2*tan(1/2*f*x)^ 2*tan(1/2*e) - 2*tan(1/2*f*x)*tan(1/2*e)^2 + tan(1/2*f*x)^2 + tan(1/2*e)^2 + 2*tan(1/2*f*x) + 2*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) + c*f*tan(1/2*e) + d*log(2*(ta n(1/2*f*x)^2*tan(1/2*e)^2 - 2*tan(1/2*f*x)^2*tan(1/2*e) - 2*tan(1/2*f*x)*t an(1/2*e)^2 + tan(1/2*f*x)^2 + tan(1/2*e)^2 + 2*tan(1/2*f*x) + 2*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*e) - c*f + d*log(2*(tan(1/2*f*x)^2*tan(1/2*e)^2 - 2*tan(1/2*f*x)^2 *tan(1/2*e) - 2*tan(1/2*f*x)*tan(1/2*e)^2 + tan(1/2*f*x)^2 + tan(1/2*e)^2 + 2*tan(1/2*f*x) + 2*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*tan( 1/2*f*x) - a*f^2*tan(1/2*e) - a*f^2)
Time = 36.14 (sec) , antiderivative size = 66, normalized size of antiderivative = 1.10 \[ \int \frac {c+d x}{a+a \sin (e+f x)} \, dx=\frac {2\,d\,\ln \left ({\mathrm {e}}^{e\,1{}\mathrm {i}}\,{\mathrm {e}}^{f\,x\,1{}\mathrm {i}}+1{}\mathrm {i}\right )}{a\,f^2}-\frac {2\,\left (c+d\,x\right )}{a\,f\,\left ({\mathrm {e}}^{e\,1{}\mathrm {i}+f\,x\,1{}\mathrm {i}}+1{}\mathrm {i}\right )}-\frac {d\,x\,2{}\mathrm {i}}{a\,f} \] Input:
int((c + d*x)/(a + a*sin(e + f*x)),x)
Output:
(2*d*log(exp(e*1i)*exp(f*x*1i) + 1i))/(a*f^2) - (2*(c + d*x))/(a*f*(exp(e* 1i + f*x*1i) + 1i)) - (d*x*2i)/(a*f)
Time = 0.18 (sec) , antiderivative size = 134, normalized size of antiderivative = 2.23 \[ \int \frac {c+d x}{a+a \sin (e+f x)} \, dx=\frac {-\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d -\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )^{2}+1\right ) d +2 \,\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 ) d +2 \,\mathrm {log}\left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right ) d +2 \tan \left (\frac {f x}{2}+\frac {e}{2}\right ) c f +\tan \left (\frac {f x}{2}+\frac {e}{2}\right ) d f x -d f x}{a \,f^{2} \left (\tan \left (\frac {f x}{2}+\frac {e}{2}\right )+1\right )} \] Input:
int((d*x+c)/(a+a*sin(f*x+e)),x)
Output:
( - log(tan((e + f*x)/2)**2 + 1)*tan((e + f*x)/2)*d - log(tan((e + f*x)/2) **2 + 1)*d + 2*log(tan((e + f*x)/2) + 1)*tan((e + f*x)/2)*d + 2*log(tan((e + f*x)/2) + 1)*d + 2*tan((e + f*x)/2)*c*f + tan((e + f*x)/2)*d*f*x - d*f* x)/(a*f**2*(tan((e + f*x)/2) + 1))