Integrand size = 22, antiderivative size = 109 \[ \int \frac {A+B x}{(d+e x) \left (a+c x^2\right )} \, dx=\frac {(A c d+a B e) \arctan \left (\frac {\sqrt {c} x}{\sqrt {a}}\right )}{\sqrt {a} \sqrt {c} \left (c d^2+a e^2\right )}-\frac {(B d-A e) \log (d+e x)}{c d^2+a e^2}+\frac {(B d-A e) \log \left (a+c x^2\right )}{2 \left (c d^2+a e^2\right )} \] Output:
(A*c*d+B*a*e)*arctan(c^(1/2)*x/a^(1/2))/a^(1/2)/c^(1/2)/(a*e^2+c*d^2)-(-A* e+B*d)*ln(e*x+d)/(a*e^2+c*d^2)+(-A*e+B*d)*ln(c*x^2+a)/(2*a*e^2+2*c*d^2)
Time = 0.06 (sec) , antiderivative size = 91, normalized size of antiderivative = 0.83 \[ \int \frac {A+B x}{(d+e x) \left (a+c x^2\right )} \, dx=\frac {2 (A c d+a B e) \arctan \left (\frac {\sqrt {c} x}{\sqrt {a}}\right )-\sqrt {a} \sqrt {c} (B d-A e) \left (2 \log (d+e x)-\log \left (a+c x^2\right )\right )}{2 \sqrt {a} \sqrt {c} \left (c d^2+a e^2\right )} \] Input:
Integrate[(A + B*x)/((d + e*x)*(a + c*x^2)),x]
Output:
(2*(A*c*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]] - Sqrt[a]*Sqrt[c]*(B*d - A* e)*(2*Log[d + e*x] - Log[a + c*x^2]))/(2*Sqrt[a]*Sqrt[c]*(c*d^2 + a*e^2))
Time = 0.27 (sec) , antiderivative size = 109, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.091, Rules used = {657, 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 x}{\left (a+c x^2\right ) (d+e x)} \, dx\) |
\(\Big \downarrow \) 657 |
\(\displaystyle \int \left (\frac {a B e+c x (B d-A e)+A c d}{\left (a+c x^2\right ) \left (a e^2+c d^2\right )}+\frac {e (A e-B d)}{(d+e x) \left (a e^2+c d^2\right )}\right )dx\) |
\(\Big \downarrow \) 2009 |
\(\displaystyle \frac {\arctan \left (\frac {\sqrt {c} x}{\sqrt {a}}\right ) (a B e+A c d)}{\sqrt {a} \sqrt {c} \left (a e^2+c d^2\right )}+\frac {\log \left (a+c x^2\right ) (B d-A e)}{2 \left (a e^2+c d^2\right )}-\frac {(B d-A e) \log (d+e x)}{a e^2+c d^2}\) |
Input:
Int[(A + B*x)/((d + e*x)*(a + c*x^2)),x]
Output:
((A*c*d + a*B*e)*ArcTan[(Sqrt[c]*x)/Sqrt[a]])/(Sqrt[a]*Sqrt[c]*(c*d^2 + a* e^2)) - ((B*d - A*e)*Log[d + e*x])/(c*d^2 + a*e^2) + ((B*d - A*e)*Log[a + c*x^2])/(2*(c*d^2 + a*e^2))
Int[(((d_.) + (e_.)*(x_))^(m_.)*((f_.) + (g_.)*(x_))^(n_.))/((a_) + (c_.)*( x_)^2), x_Symbol] :> Int[ExpandIntegrand[(d + e*x)^m*((f + g*x)^n/(a + c*x^ 2)), x], x] /; FreeQ[{a, c, d, e, f, g, m}, x] && IntegersQ[n]
Time = 1.34 (sec) , antiderivative size = 92, normalized size of antiderivative = 0.84
method | result | size |
default | \(\frac {\left (A e -B d \right ) \ln \left (e x +d \right )}{a \,e^{2}+c \,d^{2}}+\frac {\frac {\left (-A c e +B c d \right ) \ln \left (c \,x^{2}+a \right )}{2 c}+\frac {\left (A c d +B a e \right ) \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{\sqrt {a c}}}{a \,e^{2}+c \,d^{2}}\) | \(92\) |
risch | \(\frac {\ln \left (e x +d \right ) A e}{a \,e^{2}+c \,d^{2}}-\frac {\ln \left (e x +d \right ) B d}{a \,e^{2}+c \,d^{2}}+\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\left (a^{2} c \,e^{2}+a \,c^{2} d^{2}\right ) \textit {\_Z}^{2}+\left (2 A a c e -2 B a c d \right ) \textit {\_Z} +c \,A^{2}+B^{2} a \right )}{\sum }\textit {\_R} \ln \left (\left (\left (3 a c \,e^{2}-c^{2} d^{2}\right ) \textit {\_R}^{2}+\left (3 A c e -B c d \right ) \textit {\_R} +2 B^{2}\right ) x +4 a c d e \,\textit {\_R}^{2}+\left (A c d -B a e \right ) \textit {\_R} +2 A B \right )\right )}{2}\) | \(170\) |
Input:
int((B*x+A)/(e*x+d)/(c*x^2+a),x,method=_RETURNVERBOSE)
Output:
(A*e-B*d)/(a*e^2+c*d^2)*ln(e*x+d)+1/(a*e^2+c*d^2)*(1/2*(-A*c*e+B*c*d)/c*ln (c*x^2+a)+(A*c*d+B*a*e)/(a*c)^(1/2)*arctan(c*x/(a*c)^(1/2)))
Time = 0.64 (sec) , antiderivative size = 200, normalized size of antiderivative = 1.83 \[ \int \frac {A+B x}{(d+e x) \left (a+c x^2\right )} \, dx=\left [-\frac {{\left (A c d + B a e\right )} \sqrt {-a c} \log \left (\frac {c x^{2} - 2 \, \sqrt {-a c} x - a}{c x^{2} + a}\right ) - {\left (B a c d - A a c e\right )} \log \left (c x^{2} + a\right ) + 2 \, {\left (B a c d - A a c e\right )} \log \left (e x + d\right )}{2 \, {\left (a c^{2} d^{2} + a^{2} c e^{2}\right )}}, \frac {2 \, {\left (A c d + B a e\right )} \sqrt {a c} \arctan \left (\frac {\sqrt {a c} x}{a}\right ) + {\left (B a c d - A a c e\right )} \log \left (c x^{2} + a\right ) - 2 \, {\left (B a c d - A a c e\right )} \log \left (e x + d\right )}{2 \, {\left (a c^{2} d^{2} + a^{2} c e^{2}\right )}}\right ] \] Input:
integrate((B*x+A)/(e*x+d)/(c*x^2+a),x, algorithm="fricas")
Output:
[-1/2*((A*c*d + B*a*e)*sqrt(-a*c)*log((c*x^2 - 2*sqrt(-a*c)*x - a)/(c*x^2 + a)) - (B*a*c*d - A*a*c*e)*log(c*x^2 + a) + 2*(B*a*c*d - A*a*c*e)*log(e*x + d))/(a*c^2*d^2 + a^2*c*e^2), 1/2*(2*(A*c*d + B*a*e)*sqrt(a*c)*arctan(sq rt(a*c)*x/a) + (B*a*c*d - A*a*c*e)*log(c*x^2 + a) - 2*(B*a*c*d - A*a*c*e)* log(e*x + d))/(a*c^2*d^2 + a^2*c*e^2)]
Timed out. \[ \int \frac {A+B x}{(d+e x) \left (a+c x^2\right )} \, dx=\text {Timed out} \] Input:
integrate((B*x+A)/(e*x+d)/(c*x**2+a),x)
Output:
Timed out
Time = 0.15 (sec) , antiderivative size = 98, normalized size of antiderivative = 0.90 \[ \int \frac {A+B x}{(d+e x) \left (a+c x^2\right )} \, dx=\frac {{\left (B d - A e\right )} \log \left (c x^{2} + a\right )}{2 \, {\left (c d^{2} + a e^{2}\right )}} - \frac {{\left (B d - A e\right )} \log \left (e x + d\right )}{c d^{2} + a e^{2}} + \frac {{\left (A c d + B a e\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{{\left (c d^{2} + a e^{2}\right )} \sqrt {a c}} \] Input:
integrate((B*x+A)/(e*x+d)/(c*x^2+a),x, algorithm="maxima")
Output:
1/2*(B*d - A*e)*log(c*x^2 + a)/(c*d^2 + a*e^2) - (B*d - A*e)*log(e*x + d)/ (c*d^2 + a*e^2) + (A*c*d + B*a*e)*arctan(c*x/sqrt(a*c))/((c*d^2 + a*e^2)*s qrt(a*c))
Time = 0.14 (sec) , antiderivative size = 103, normalized size of antiderivative = 0.94 \[ \int \frac {A+B x}{(d+e x) \left (a+c x^2\right )} \, dx=\frac {{\left (B d - A e\right )} \log \left (c x^{2} + a\right )}{2 \, {\left (c d^{2} + a e^{2}\right )}} - \frac {{\left (B d e - A e^{2}\right )} \log \left ({\left | e x + d \right |}\right )}{c d^{2} e + a e^{3}} + \frac {{\left (A c d + B a e\right )} \arctan \left (\frac {c x}{\sqrt {a c}}\right )}{{\left (c d^{2} + a e^{2}\right )} \sqrt {a c}} \] Input:
integrate((B*x+A)/(e*x+d)/(c*x^2+a),x, algorithm="giac")
Output:
1/2*(B*d - A*e)*log(c*x^2 + a)/(c*d^2 + a*e^2) - (B*d*e - A*e^2)*log(abs(e *x + d))/(c*d^2*e + a*e^3) + (A*c*d + B*a*e)*arctan(c*x/sqrt(a*c))/((c*d^2 + a*e^2)*sqrt(a*c))
Time = 7.09 (sec) , antiderivative size = 535, normalized size of antiderivative = 4.91 \[ \int \frac {A+B x}{(d+e x) \left (a+c x^2\right )} \, dx=\frac {\ln \left (d+e\,x\right )\,\left (A\,e-B\,d\right )}{c\,d^2+a\,e^2}-\frac {\ln \left (B^2\,c\,e\,x-\frac {\left (c\,\left (a\,\left (\frac {A\,e}{2}-\frac {B\,d}{2}\right )+\frac {A\,d\,\sqrt {-a\,c}}{2}\right )+\frac {B\,a\,e\,\sqrt {-a\,c}}{2}\right )\,\left (x\,\left (3\,A\,c^2\,e^2-B\,c^2\,d\,e\right )-\frac {\left (c\,\left (a\,\left (\frac {A\,e}{2}-\frac {B\,d}{2}\right )+\frac {A\,d\,\sqrt {-a\,c}}{2}\right )+\frac {B\,a\,e\,\sqrt {-a\,c}}{2}\right )\,\left (x\,\left (6\,a\,c^2\,e^3-2\,c^3\,d^2\,e\right )+8\,a\,c^2\,d\,e^2\right )}{a^2\,c\,e^2+a\,c^2\,d^2}-B\,a\,c\,e^2+A\,c^2\,d\,e\right )}{a^2\,c\,e^2+a\,c^2\,d^2}+A\,B\,c\,e\right )\,\left (c\,\left (a\,\left (\frac {A\,e}{2}-\frac {B\,d}{2}\right )+\frac {A\,d\,\sqrt {-a\,c}}{2}\right )+\frac {B\,a\,e\,\sqrt {-a\,c}}{2}\right )}{a^2\,c\,e^2+a\,c^2\,d^2}-\frac {\ln \left (B^2\,c\,e\,x-\frac {\left (c\,\left (a\,\left (\frac {A\,e}{2}-\frac {B\,d}{2}\right )-\frac {A\,d\,\sqrt {-a\,c}}{2}\right )-\frac {B\,a\,e\,\sqrt {-a\,c}}{2}\right )\,\left (x\,\left (3\,A\,c^2\,e^2-B\,c^2\,d\,e\right )-\frac {\left (c\,\left (a\,\left (\frac {A\,e}{2}-\frac {B\,d}{2}\right )-\frac {A\,d\,\sqrt {-a\,c}}{2}\right )-\frac {B\,a\,e\,\sqrt {-a\,c}}{2}\right )\,\left (x\,\left (6\,a\,c^2\,e^3-2\,c^3\,d^2\,e\right )+8\,a\,c^2\,d\,e^2\right )}{a^2\,c\,e^2+a\,c^2\,d^2}-B\,a\,c\,e^2+A\,c^2\,d\,e\right )}{a^2\,c\,e^2+a\,c^2\,d^2}+A\,B\,c\,e\right )\,\left (c\,\left (a\,\left (\frac {A\,e}{2}-\frac {B\,d}{2}\right )-\frac {A\,d\,\sqrt {-a\,c}}{2}\right )-\frac {B\,a\,e\,\sqrt {-a\,c}}{2}\right )}{a^2\,c\,e^2+a\,c^2\,d^2} \] Input:
int((A + B*x)/((a + c*x^2)*(d + e*x)),x)
Output:
(log(d + e*x)*(A*e - B*d))/(a*e^2 + c*d^2) - (log(B^2*c*e*x - ((c*(a*((A*e )/2 - (B*d)/2) + (A*d*(-a*c)^(1/2))/2) + (B*a*e*(-a*c)^(1/2))/2)*(x*(3*A*c ^2*e^2 - B*c^2*d*e) - ((c*(a*((A*e)/2 - (B*d)/2) + (A*d*(-a*c)^(1/2))/2) + (B*a*e*(-a*c)^(1/2))/2)*(x*(6*a*c^2*e^3 - 2*c^3*d^2*e) + 8*a*c^2*d*e^2))/ (a*c^2*d^2 + a^2*c*e^2) - B*a*c*e^2 + A*c^2*d*e))/(a*c^2*d^2 + a^2*c*e^2) + A*B*c*e)*(c*(a*((A*e)/2 - (B*d)/2) + (A*d*(-a*c)^(1/2))/2) + (B*a*e*(-a* c)^(1/2))/2))/(a*c^2*d^2 + a^2*c*e^2) - (log(B^2*c*e*x - ((c*(a*((A*e)/2 - (B*d)/2) - (A*d*(-a*c)^(1/2))/2) - (B*a*e*(-a*c)^(1/2))/2)*(x*(3*A*c^2*e^ 2 - B*c^2*d*e) - ((c*(a*((A*e)/2 - (B*d)/2) - (A*d*(-a*c)^(1/2))/2) - (B*a *e*(-a*c)^(1/2))/2)*(x*(6*a*c^2*e^3 - 2*c^3*d^2*e) + 8*a*c^2*d*e^2))/(a*c^ 2*d^2 + a^2*c*e^2) - B*a*c*e^2 + A*c^2*d*e))/(a*c^2*d^2 + a^2*c*e^2) + A*B *c*e)*(c*(a*((A*e)/2 - (B*d)/2) - (A*d*(-a*c)^(1/2))/2) - (B*a*e*(-a*c)^(1 /2))/2))/(a*c^2*d^2 + a^2*c*e^2)
Time = 0.22 (sec) , antiderivative size = 106, normalized size of antiderivative = 0.97 \[ \int \frac {A+B x}{(d+e x) \left (a+c x^2\right )} \, dx=\frac {2 \sqrt {c}\, \sqrt {a}\, \mathit {atan} \left (\frac {c x}{\sqrt {c}\, \sqrt {a}}\right ) b e +2 \sqrt {c}\, \sqrt {a}\, \mathit {atan} \left (\frac {c x}{\sqrt {c}\, \sqrt {a}}\right ) c d -\mathrm {log}\left (c \,x^{2}+a \right ) a c e +\mathrm {log}\left (c \,x^{2}+a \right ) b c d +2 \,\mathrm {log}\left (e x +d \right ) a c e -2 \,\mathrm {log}\left (e x +d \right ) b c d}{2 c \left (a \,e^{2}+c \,d^{2}\right )} \] Input:
int((B*x+A)/(e*x+d)/(c*x^2+a),x)
Output:
(2*sqrt(c)*sqrt(a)*atan((c*x)/(sqrt(c)*sqrt(a)))*b*e + 2*sqrt(c)*sqrt(a)*a tan((c*x)/(sqrt(c)*sqrt(a)))*c*d - log(a + c*x**2)*a*c*e + log(a + c*x**2) *b*c*d + 2*log(d + e*x)*a*c*e - 2*log(d + e*x)*b*c*d)/(2*c*(a*e**2 + c*d** 2))