Integrand size = 18, antiderivative size = 64 \[ \int \frac {a+b \sin (e+f x)}{c+d x} \, dx=\frac {a \log (c+d x)}{d}+\frac {b \operatorname {CosIntegral}\left (\frac {c f}{d}+f x\right ) \sin \left (e-\frac {c f}{d}\right )}{d}+\frac {b \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (\frac {c f}{d}+f x\right )}{d} \] Output:
a*ln(d*x+c)/d-b*Ci(c*f/d+f*x)*sin(-e+c*f/d)/d+b*cos(-e+c*f/d)*Si(c*f/d+f*x )/d
Time = 0.19 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.89 \[ \int \frac {a+b \sin (e+f x)}{c+d x} \, dx=\frac {a \log (c+d x)+b \operatorname {CosIntegral}\left (f \left (\frac {c}{d}+x\right )\right ) \sin \left (e-\frac {c f}{d}\right )+b \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )}{d} \] Input:
Integrate[(a + b*Sin[e + f*x])/(c + d*x),x]
Output:
(a*Log[c + d*x] + b*CosIntegral[f*(c/d + x)]*Sin[e - (c*f)/d] + b*Cos[e - (c*f)/d]*SinIntegral[f*(c/d + x)])/d
Time = 0.32 (sec) , antiderivative size = 64, 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, 3798, 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 {a+b \sin (e+f x)}{c+d x} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \sin (e+f x)}{c+d x}dx\) |
\(\Big \downarrow \) 3798 |
\(\displaystyle \int \left (\frac {a}{c+d x}+\frac {b \sin (e+f x)}{c+d x}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {a \log (c+d x)}{d}+\frac {b \operatorname {CosIntegral}\left (x f+\frac {c f}{d}\right ) \sin \left (e-\frac {c f}{d}\right )}{d}+\frac {b \cos \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d}\) |
Input:
Int[(a + b*Sin[e + f*x])/(c + d*x),x]
Output:
(a*Log[c + d*x])/d + (b*CosIntegral[(c*f)/d + f*x]*Sin[e - (c*f)/d])/d + ( b*Cos[e - (c*f)/d]*SinIntegral[(c*f)/d + f*x])/d
Int[((c_.) + (d_.)*(x_))^(m_.)*((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(n_.) , x_Symbol] :> Int[ExpandIntegrand[(c + d*x)^m, (a + b*Sin[e + f*x])^n, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && IGtQ[n, 0] && (EqQ[n, 1] || IGtQ[ m, 0] || NeQ[a^2 - b^2, 0])
Time = 0.89 (sec) , antiderivative size = 87, normalized size of antiderivative = 1.36
method | result | size |
parts | \(\frac {a \ln \left (d x +c \right )}{d}+b \left (\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}\right )\) | \(87\) |
derivativedivides | \(\frac {\frac {f a \ln \left (c f -d e +d \left (f x +e \right )\right )}{d}+f b \left (\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}\right )}{f}\) | \(103\) |
default | \(\frac {\frac {f a \ln \left (c f -d e +d \left (f x +e \right )\right )}{d}+f b \left (\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}-\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}\right )}{f}\) | \(103\) |
risch | \(\frac {a \ln \left (d x +c \right )}{d}-\frac {i b \,{\mathrm e}^{\frac {i \left (c f -d e \right )}{d}} \operatorname {expIntegral}_{1}\left (i f x +i e +\frac {i \left (c f -d e \right )}{d}\right )}{2 d}+\frac {i b \,{\mathrm e}^{-\frac {i \left (c f -d e \right )}{d}} \operatorname {expIntegral}_{1}\left (-i f x -i e -\frac {i c f -i d e}{d}\right )}{2 d}\) | \(111\) |
Input:
int((a+b*sin(f*x+e))/(d*x+c),x,method=_RETURNVERBOSE)
Output:
a*ln(d*x+c)/d+b*(Si(f*x+e+(c*f-d*e)/d)*cos((c*f-d*e)/d)/d-Ci(f*x+e+(c*f-d* e)/d)*sin((c*f-d*e)/d)/d)
Time = 0.08 (sec) , antiderivative size = 74, normalized size of antiderivative = 1.16 \[ \int \frac {a+b \sin (e+f x)}{c+d x} \, dx=-\frac {b \operatorname {Ci}\left (\frac {d f x + c f}{d}\right ) \sin \left (-\frac {d e - c f}{d}\right ) - b \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {d f x + c f}{d}\right ) - a \log \left (d x + c\right )}{d} \] Input:
integrate((a+b*sin(f*x+e))/(d*x+c),x, algorithm="fricas")
Output:
-(b*cos_integral((d*f*x + c*f)/d)*sin(-(d*e - c*f)/d) - b*cos(-(d*e - c*f) /d)*sin_integral((d*f*x + c*f)/d) - a*log(d*x + c))/d
\[ \int \frac {a+b \sin (e+f x)}{c+d x} \, dx=\int \frac {a + b \sin {\left (e + f x \right )}}{c + d x}\, dx \] Input:
integrate((a+b*sin(f*x+e))/(d*x+c),x)
Output:
Integral((a + b*sin(e + f*x))/(c + d*x), x)
Result contains complex when optimal does not.
Time = 0.08 (sec) , antiderivative size = 171, normalized size of antiderivative = 2.67 \[ \int \frac {a+b \sin (e+f x)}{c+d x} \, dx=\frac {\frac {2 \, a f \log \left (c + \frac {{\left (f x + e\right )} d}{f} - \frac {d e}{f}\right )}{d} + \frac {{\left (f {\left (-i \, E_{1}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + i \, E_{1}\left (-\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \cos \left (-\frac {d e - c f}{d}\right ) + f {\left (E_{1}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + E_{1}\left (-\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right )\right )} \sin \left (-\frac {d e - c f}{d}\right )\right )} b}{d}}{2 \, f} \] Input:
integrate((a+b*sin(f*x+e))/(d*x+c),x, algorithm="maxima")
Output:
1/2*(2*a*f*log(c + (f*x + e)*d/f - d*e/f)/d + (f*(-I*exp_integral_e(1, (I* (f*x + e)*d - I*d*e + I*c*f)/d) + I*exp_integral_e(1, -(I*(f*x + e)*d - I* d*e + I*c*f)/d))*cos(-(d*e - c*f)/d) + f*(exp_integral_e(1, (I*(f*x + e)*d - I*d*e + I*c*f)/d) + exp_integral_e(1, -(I*(f*x + e)*d - I*d*e + I*c*f)/ d))*sin(-(d*e - c*f)/d))*b/d)/f
Result contains higher order function than in optimal. Order 9 vs. order 4.
Time = 0.59 (sec) , antiderivative size = 693, normalized size of antiderivative = 10.83 \[ \int \frac {a+b \sin (e+f x)}{c+d x} \, dx=\text {Too large to display} \] Input:
integrate((a+b*sin(f*x+e))/(d*x+c),x, algorithm="giac")
Output:
1/2*(b*imag_part(cos_integral(f*x + c*f/d))*tan(1/2*e)^2*tan(1/2*c*f/d)^2 - b*imag_part(cos_integral(-f*x - c*f/d))*tan(1/2*e)^2*tan(1/2*c*f/d)^2 + 2*a*log(abs(d*x + c))*tan(1/2*e)^2*tan(1/2*c*f/d)^2 + 2*b*sin_integral((d* f*x + c*f)/d)*tan(1/2*e)^2*tan(1/2*c*f/d)^2 + 2*b*real_part(cos_integral(f *x + c*f/d))*tan(1/2*e)^2*tan(1/2*c*f/d) + 2*b*real_part(cos_integral(-f*x - c*f/d))*tan(1/2*e)^2*tan(1/2*c*f/d) - 2*b*real_part(cos_integral(f*x + c*f/d))*tan(1/2*e)*tan(1/2*c*f/d)^2 - 2*b*real_part(cos_integral(-f*x - c* f/d))*tan(1/2*e)*tan(1/2*c*f/d)^2 - b*imag_part(cos_integral(f*x + c*f/d)) *tan(1/2*e)^2 + b*imag_part(cos_integral(-f*x - c*f/d))*tan(1/2*e)^2 + 2*a *log(abs(d*x + c))*tan(1/2*e)^2 - 2*b*sin_integral((d*f*x + c*f)/d)*tan(1/ 2*e)^2 + 4*b*imag_part(cos_integral(f*x + c*f/d))*tan(1/2*e)*tan(1/2*c*f/d ) - 4*b*imag_part(cos_integral(-f*x - c*f/d))*tan(1/2*e)*tan(1/2*c*f/d) + 8*b*sin_integral((d*f*x + c*f)/d)*tan(1/2*e)*tan(1/2*c*f/d) - b*imag_part( cos_integral(f*x + c*f/d))*tan(1/2*c*f/d)^2 + b*imag_part(cos_integral(-f* x - c*f/d))*tan(1/2*c*f/d)^2 + 2*a*log(abs(d*x + c))*tan(1/2*c*f/d)^2 - 2* b*sin_integral((d*f*x + c*f)/d)*tan(1/2*c*f/d)^2 + 2*b*real_part(cos_integ ral(f*x + c*f/d))*tan(1/2*e) + 2*b*real_part(cos_integral(-f*x - c*f/d))*t an(1/2*e) - 2*b*real_part(cos_integral(f*x + c*f/d))*tan(1/2*c*f/d) - 2*b* real_part(cos_integral(-f*x - c*f/d))*tan(1/2*c*f/d) + b*imag_part(cos_int egral(f*x + c*f/d)) - b*imag_part(cos_integral(-f*x - c*f/d)) + 2*a*log...
Timed out. \[ \int \frac {a+b \sin (e+f x)}{c+d x} \, dx=\int \frac {a+b\,\sin \left (e+f\,x\right )}{c+d\,x} \,d x \] Input:
int((a + b*sin(e + f*x))/(c + d*x),x)
Output:
int((a + b*sin(e + f*x))/(c + d*x), x)
\[ \int \frac {a+b \sin (e+f x)}{c+d x} \, dx=\frac {\left (\int \frac {\sin \left (f x +e \right )}{d x +c}d x \right ) b d +\mathrm {log}\left (d x +c \right ) a}{d} \] Input:
int((a+b*sin(f*x+e))/(d*x+c),x)
Output:
(int(sin(e + f*x)/(c + d*x),x)*b*d + log(c + d*x)*a)/d