Integrand size = 18, antiderivative size = 88 \[ \int \frac {a+b \sin (e+f x)}{(c+d x)^2} \, dx=-\frac {a}{d (c+d x)}+\frac {b f \cos \left (e-\frac {c f}{d}\right ) \operatorname {CosIntegral}\left (\frac {c f}{d}+f x\right )}{d^2}-\frac {b \sin (e+f x)}{d (c+d x)}-\frac {b f \sin \left (e-\frac {c f}{d}\right ) \text {Si}\left (\frac {c f}{d}+f x\right )}{d^2} \] Output:
-a/d/(d*x+c)+b*f*cos(-e+c*f/d)*Ci(c*f/d+f*x)/d^2-b*sin(f*x+e)/d/(d*x+c)+b* f*sin(-e+c*f/d)*Si(c*f/d+f*x)/d^2
Time = 0.43 (sec) , antiderivative size = 72, normalized size of antiderivative = 0.82 \[ \int \frac {a+b \sin (e+f x)}{(c+d x)^2} \, dx=\frac {b f \cos \left (e-\frac {c f}{d}\right ) \operatorname {CosIntegral}\left (f \left (\frac {c}{d}+x\right )\right )-\frac {d (a+b \sin (e+f x))}{c+d x}-b f \sin \left (e-\frac {c f}{d}\right ) \text {Si}\left (f \left (\frac {c}{d}+x\right )\right )}{d^2} \] Input:
Integrate[(a + b*Sin[e + f*x])/(c + d*x)^2,x]
Output:
(b*f*Cos[e - (c*f)/d]*CosIntegral[f*(c/d + x)] - (d*(a + b*Sin[e + f*x]))/ (c + d*x) - b*f*Sin[e - (c*f)/d]*SinIntegral[f*(c/d + x)])/d^2
Time = 0.38 (sec) , antiderivative size = 88, 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)^2} \, dx\) |
\(\Big \downarrow \) 3042 |
\(\displaystyle \int \frac {a+b \sin (e+f x)}{(c+d x)^2}dx\) |
\(\Big \downarrow \) 3798 |
\(\displaystyle \int \left (\frac {a}{(c+d x)^2}+\frac {b \sin (e+f x)}{(c+d x)^2}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle -\frac {a}{d (c+d x)}+\frac {b f \operatorname {CosIntegral}\left (x f+\frac {c f}{d}\right ) \cos \left (e-\frac {c f}{d}\right )}{d^2}-\frac {b f \sin \left (e-\frac {c f}{d}\right ) \text {Si}\left (x f+\frac {c f}{d}\right )}{d^2}-\frac {b \sin (e+f x)}{d (c+d x)}\) |
Input:
Int[(a + b*Sin[e + f*x])/(c + d*x)^2,x]
Output:
-(a/(d*(c + d*x))) + (b*f*Cos[e - (c*f)/d]*CosIntegral[(c*f)/d + f*x])/d^2 - (b*Sin[e + f*x])/(d*(c + d*x)) - (b*f*Sin[e - (c*f)/d]*SinIntegral[(c*f )/d + f*x])/d^2
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.96 (sec) , antiderivative size = 122, normalized size of antiderivative = 1.39
method | result | size |
parts | \(-\frac {a}{d \left (d x +c \right )}+b f \left (-\frac {\sin \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}+\frac {\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}+\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}}{d}\right )\) | \(122\) |
derivativedivides | \(\frac {-\frac {a \,f^{2}}{\left (c f -d e +d \left (f x +e \right )\right ) d}+f^{2} b \left (-\frac {\sin \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}+\frac {\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}+\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}}{d}\right )}{f}\) | \(141\) |
default | \(\frac {-\frac {a \,f^{2}}{\left (c f -d e +d \left (f x +e \right )\right ) d}+f^{2} b \left (-\frac {\sin \left (f x +e \right )}{\left (c f -d e +d \left (f x +e \right )\right ) d}+\frac {\frac {\operatorname {Si}\left (f x +e +\frac {c f -d e}{d}\right ) \sin \left (\frac {c f -d e}{d}\right )}{d}+\frac {\operatorname {Ci}\left (f x +e +\frac {c f -d e}{d}\right ) \cos \left (\frac {c f -d e}{d}\right )}{d}}{d}\right )}{f}\) | \(141\) |
risch | \(-\frac {a}{d \left (d x +c \right )}-\frac {f 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^{2}}-\frac {b f \,{\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^{2}}-\frac {b \left (-2 d x f -2 c f \right ) \sin \left (f x +e \right )}{2 d \left (d x +c \right ) \left (-d x f -c f \right )}\) | \(154\) |
Input:
int((a+b*sin(f*x+e))/(d*x+c)^2,x,method=_RETURNVERBOSE)
Output:
-a/d/(d*x+c)+b*f*(-sin(f*x+e)/(c*f-d*e+d*(f*x+e))/d+(Si(f*x+e+(c*f-d*e)/d) *sin((c*f-d*e)/d)/d+Ci(f*x+e+(c*f-d*e)/d)*cos((c*f-d*e)/d)/d)/d)
Time = 0.08 (sec) , antiderivative size = 105, normalized size of antiderivative = 1.19 \[ \int \frac {a+b \sin (e+f x)}{(c+d x)^2} \, dx=\frac {{\left (b d f x + b c f\right )} \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Ci}\left (\frac {d f x + c f}{d}\right ) - b d \sin \left (f x + e\right ) + {\left (b d f x + b c f\right )} \sin \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {d f x + c f}{d}\right ) - a d}{d^{3} x + c d^{2}} \] Input:
integrate((a+b*sin(f*x+e))/(d*x+c)^2,x, algorithm="fricas")
Output:
((b*d*f*x + b*c*f)*cos(-(d*e - c*f)/d)*cos_integral((d*f*x + c*f)/d) - b*d *sin(f*x + e) + (b*d*f*x + b*c*f)*sin(-(d*e - c*f)/d)*sin_integral((d*f*x + c*f)/d) - a*d)/(d^3*x + c*d^2)
\[ \int \frac {a+b \sin (e+f x)}{(c+d x)^2} \, dx=\int \frac {a + b \sin {\left (e + f x \right )}}{\left (c + d x\right )^{2}}\, dx \] Input:
integrate((a+b*sin(f*x+e))/(d*x+c)**2,x)
Output:
Integral((a + b*sin(e + f*x))/(c + d*x)**2, x)
Result contains complex when optimal does not.
Time = 0.10 (sec) , antiderivative size = 196, normalized size of antiderivative = 2.23 \[ \int \frac {a+b \sin (e+f x)}{(c+d x)^2} \, dx=-\frac {\frac {2 \, a f^{2}}{{\left (f x + e\right )} d^{2} - d^{2} e + c d f} - \frac {{\left (f^{2} {\left (-i \, E_{2}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + i \, E_{2}\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^{2} {\left (E_{2}\left (\frac {i \, {\left (f x + e\right )} d - i \, d e + i \, c f}{d}\right ) + E_{2}\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}{{\left (f x + e\right )} d^{2} - d^{2} e + c d f}}{2 \, f} \] Input:
integrate((a+b*sin(f*x+e))/(d*x+c)^2,x, algorithm="maxima")
Output:
-1/2*(2*a*f^2/((f*x + e)*d^2 - d^2*e + c*d*f) - (f^2*(-I*exp_integral_e(2, (I*(f*x + e)*d - I*d*e + I*c*f)/d) + I*exp_integral_e(2, -(I*(f*x + e)*d - I*d*e + I*c*f)/d))*cos(-(d*e - c*f)/d) + f^2*(exp_integral_e(2, (I*(f*x + e)*d - I*d*e + I*c*f)/d) + exp_integral_e(2, -(I*(f*x + e)*d - I*d*e + I *c*f)/d))*sin(-(d*e - c*f)/d))*b/((f*x + e)*d^2 - d^2*e + c*d*f))/f
Leaf count of result is larger than twice the leaf count of optimal. 533 vs. \(2 (89) = 178\).
Time = 0.56 (sec) , antiderivative size = 533, normalized size of antiderivative = 6.06 \[ \int \frac {a+b \sin (e+f x)}{(c+d x)^2} \, dx=\frac {{\left ({\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} f^{2} \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Ci}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) - d e f^{2} \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Ci}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) + c f^{3} \cos \left (-\frac {d e - c f}{d}\right ) \operatorname {Ci}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) + {\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} f^{2} \sin \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) - d e f^{2} \sin \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) + c f^{3} \sin \left (-\frac {d e - c f}{d}\right ) \operatorname {Si}\left (\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d e + c f}{d}\right ) + d f^{2} \sin \left (-\frac {{\left (d x + c\right )} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )}}{d}\right )\right )} b d^{2}}{{\left ({\left (d x + c\right )} d^{4} {\left (\frac {d e}{d x + c} - \frac {c f}{d x + c} + f\right )} - d^{5} e + c d^{4} f\right )} f} - \frac {a}{{\left (d x + c\right )} d} \] Input:
integrate((a+b*sin(f*x+e))/(d*x+c)^2,x, algorithm="giac")
Output:
((d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f)*f^2*cos(-(d*e - c*f)/d)*cos _integral(((d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d) - d*e*f^2*cos(-(d*e - c*f)/d)*cos_integral(((d*x + c)*(d*e/(d*x + c) - c*f/ (d*x + c) + f) - d*e + c*f)/d) + c*f^3*cos(-(d*e - c*f)/d)*cos_integral((( d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d) + (d*x + c)*( d*e/(d*x + c) - c*f/(d*x + c) + f)*f^2*sin(-(d*e - c*f)/d)*sin_integral((( d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d) - d*e*f^2*sin (-(d*e - c*f)/d)*sin_integral(((d*x + c)*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d) + c*f^3*sin(-(d*e - c*f)/d)*sin_integral(((d*x + c)*(d* e/(d*x + c) - c*f/(d*x + c) + f) - d*e + c*f)/d) + d*f^2*sin(-(d*x + c)*(d *e/(d*x + c) - c*f/(d*x + c) + f)/d))*b*d^2/(((d*x + c)*d^4*(d*e/(d*x + c) - c*f/(d*x + c) + f) - d^5*e + c*d^4*f)*f) - a/((d*x + c)*d)
Timed out. \[ \int \frac {a+b \sin (e+f x)}{(c+d x)^2} \, dx=\int \frac {a+b\,\sin \left (e+f\,x\right )}{{\left (c+d\,x\right )}^2} \,d x \] Input:
int((a + b*sin(e + f*x))/(c + d*x)^2,x)
Output:
int((a + b*sin(e + f*x))/(c + d*x)^2, x)
\[ \int \frac {a+b \sin (e+f x)}{(c+d x)^2} \, dx=\frac {\left (\int \frac {\sin \left (f x +e \right )}{d^{2} x^{2}+2 c d x +c^{2}}d x \right ) b \,c^{2}+\left (\int \frac {\sin \left (f x +e \right )}{d^{2} x^{2}+2 c d x +c^{2}}d x \right ) b c d x +a x}{c \left (d x +c \right )} \] Input:
int((a+b*sin(f*x+e))/(d*x+c)^2,x)
Output:
(int(sin(e + f*x)/(c**2 + 2*c*d*x + d**2*x**2),x)*b*c**2 + int(sin(e + f*x )/(c**2 + 2*c*d*x + d**2*x**2),x)*b*c*d*x + a*x)/(c*(c + d*x))