Integrand size = 29, antiderivative size = 302 \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \sqrt {d+f x^2}} \, dx=\frac {\left (b B-2 A c-B \sqrt {b^2-4 a c}\right ) \text {arctanh}\left (\frac {2 c d-\left (b-\sqrt {b^2-4 a c}\right ) f x}{\sqrt {2} \sqrt {2 c^2 d-2 a c f+b \left (b-\sqrt {b^2-4 a c}\right ) f} \sqrt {d+f x^2}}\right )}{\sqrt {2} \sqrt {b^2-4 a c} \sqrt {2 c^2 d-2 a c f+b \left (b-\sqrt {b^2-4 a c}\right ) f}}+\frac {\left (2 A c-B \left (b+\sqrt {b^2-4 a c}\right )\right ) \text {arctanh}\left (\frac {2 c d-\left (b+\sqrt {b^2-4 a c}\right ) f x}{\sqrt {2} \sqrt {2 c^2 d-2 a c f+b \left (b+\sqrt {b^2-4 a c}\right ) f} \sqrt {d+f x^2}}\right )}{\sqrt {2} \sqrt {b^2-4 a c} \sqrt {2 c^2 d-2 a c f+b \left (b+\sqrt {b^2-4 a c}\right ) f}} \] Output:
1/2*(B*b-2*A*c-B*(-4*a*c+b^2)^(1/2))*arctanh(1/2*(2*c*d-(b-(-4*a*c+b^2)^(1 /2))*f*x)*2^(1/2)/(2*c^2*d-2*a*c*f+b*(b-(-4*a*c+b^2)^(1/2))*f)^(1/2)/(f*x^ 2+d)^(1/2))*2^(1/2)/(-4*a*c+b^2)^(1/2)/(2*c^2*d-2*a*c*f+b*(b-(-4*a*c+b^2)^ (1/2))*f)^(1/2)+1/2*(2*A*c-B*(b+(-4*a*c+b^2)^(1/2)))*arctanh(1/2*(2*c*d-(b +(-4*a*c+b^2)^(1/2))*f*x)*2^(1/2)/(2*c^2*d-2*a*c*f+b*(b+(-4*a*c+b^2)^(1/2) )*f)^(1/2)/(f*x^2+d)^(1/2))*2^(1/2)/(-4*a*c+b^2)^(1/2)/(2*c^2*d-2*a*c*f+b* (b+(-4*a*c+b^2)^(1/2))*f)^(1/2)
Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
Time = 0.45 (sec) , antiderivative size = 195, normalized size of antiderivative = 0.65 \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \sqrt {d+f x^2}} \, dx=-\text {RootSum}\left [c d^2+2 b d \sqrt {f} \text {$\#$1}-2 c d \text {$\#$1}^2+4 a f \text {$\#$1}^2-2 b \sqrt {f} \text {$\#$1}^3+c \text {$\#$1}^4\&,\frac {B d \log \left (-\sqrt {f} x+\sqrt {d+f x^2}-\text {$\#$1}\right )+2 A \sqrt {f} \log \left (-\sqrt {f} x+\sqrt {d+f x^2}-\text {$\#$1}\right ) \text {$\#$1}-B \log \left (-\sqrt {f} x+\sqrt {d+f x^2}-\text {$\#$1}\right ) \text {$\#$1}^2}{b d \sqrt {f}-2 c d \text {$\#$1}+4 a f \text {$\#$1}-3 b \sqrt {f} \text {$\#$1}^2+2 c \text {$\#$1}^3}\&\right ] \] Input:
Integrate[(A + B*x)/((a + b*x + c*x^2)*Sqrt[d + f*x^2]),x]
Output:
-RootSum[c*d^2 + 2*b*d*Sqrt[f]*#1 - 2*c*d*#1^2 + 4*a*f*#1^2 - 2*b*Sqrt[f]* #1^3 + c*#1^4 & , (B*d*Log[-(Sqrt[f]*x) + Sqrt[d + f*x^2] - #1] + 2*A*Sqrt [f]*Log[-(Sqrt[f]*x) + Sqrt[d + f*x^2] - #1]*#1 - B*Log[-(Sqrt[f]*x) + Sqr t[d + f*x^2] - #1]*#1^2)/(b*d*Sqrt[f] - 2*c*d*#1 + 4*a*f*#1 - 3*b*Sqrt[f]* #1^2 + 2*c*#1^3) & ]
Time = 0.49 (sec) , antiderivative size = 302, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {1367, 488, 219}
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}{\sqrt {d+f x^2} \left (a+b x+c x^2\right )} \, dx\) |
\(\Big \downarrow \) 1367 |
\(\displaystyle -\frac {\left (-B \sqrt {b^2-4 a c}-2 A c+b B\right ) \int \frac {1}{\left (b+2 c x-\sqrt {b^2-4 a c}\right ) \sqrt {f x^2+d}}dx}{\sqrt {b^2-4 a c}}-\frac {\left (2 A c-B \left (\sqrt {b^2-4 a c}+b\right )\right ) \int \frac {1}{\left (b+2 c x+\sqrt {b^2-4 a c}\right ) \sqrt {f x^2+d}}dx}{\sqrt {b^2-4 a c}}\) |
\(\Big \downarrow \) 488 |
\(\displaystyle \frac {\left (-B \sqrt {b^2-4 a c}-2 A c+b B\right ) \int \frac {1}{4 d c^2+\left (b-\sqrt {b^2-4 a c}\right )^2 f-\frac {\left (2 c d-\left (b-\sqrt {b^2-4 a c}\right ) f x\right )^2}{f x^2+d}}d\frac {2 c d-\left (b-\sqrt {b^2-4 a c}\right ) f x}{\sqrt {f x^2+d}}}{\sqrt {b^2-4 a c}}+\frac {\left (2 A c-B \left (\sqrt {b^2-4 a c}+b\right )\right ) \int \frac {1}{4 d c^2+\left (b+\sqrt {b^2-4 a c}\right )^2 f-\frac {\left (2 c d-\left (b+\sqrt {b^2-4 a c}\right ) f x\right )^2}{f x^2+d}}d\frac {2 c d-\left (b+\sqrt {b^2-4 a c}\right ) f x}{\sqrt {f x^2+d}}}{\sqrt {b^2-4 a c}}\) |
\(\Big \downarrow \) 219 |
\(\displaystyle \frac {\left (-B \sqrt {b^2-4 a c}-2 A c+b B\right ) \text {arctanh}\left (\frac {2 c d-f x \left (b-\sqrt {b^2-4 a c}\right )}{\sqrt {2} \sqrt {d+f x^2} \sqrt {b f \left (b-\sqrt {b^2-4 a c}\right )-2 a c f+2 c^2 d}}\right )}{\sqrt {2} \sqrt {b^2-4 a c} \sqrt {b f \left (b-\sqrt {b^2-4 a c}\right )-2 a c f+2 c^2 d}}+\frac {\left (2 A c-B \left (\sqrt {b^2-4 a c}+b\right )\right ) \text {arctanh}\left (\frac {2 c d-f x \left (\sqrt {b^2-4 a c}+b\right )}{\sqrt {2} \sqrt {d+f x^2} \sqrt {b f \left (\sqrt {b^2-4 a c}+b\right )-2 a c f+2 c^2 d}}\right )}{\sqrt {2} \sqrt {b^2-4 a c} \sqrt {b f \left (\sqrt {b^2-4 a c}+b\right )-2 a c f+2 c^2 d}}\) |
Input:
Int[(A + B*x)/((a + b*x + c*x^2)*Sqrt[d + f*x^2]),x]
Output:
((b*B - 2*A*c - B*Sqrt[b^2 - 4*a*c])*ArcTanh[(2*c*d - (b - Sqrt[b^2 - 4*a* c])*f*x)/(Sqrt[2]*Sqrt[2*c^2*d - 2*a*c*f + b*(b - Sqrt[b^2 - 4*a*c])*f]*Sq rt[d + f*x^2])])/(Sqrt[2]*Sqrt[b^2 - 4*a*c]*Sqrt[2*c^2*d - 2*a*c*f + b*(b - Sqrt[b^2 - 4*a*c])*f]) + ((2*A*c - B*(b + Sqrt[b^2 - 4*a*c]))*ArcTanh[(2 *c*d - (b + Sqrt[b^2 - 4*a*c])*f*x)/(Sqrt[2]*Sqrt[2*c^2*d - 2*a*c*f + b*(b + Sqrt[b^2 - 4*a*c])*f]*Sqrt[d + f*x^2])])/(Sqrt[2]*Sqrt[b^2 - 4*a*c]*Sqr t[2*c^2*d - 2*a*c*f + b*(b + Sqrt[b^2 - 4*a*c])*f])
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1/(Rt[a, 2]*Rt[-b, 2]))* ArcTanh[Rt[-b, 2]*(x/Rt[a, 2])], x] /; FreeQ[{a, b}, x] && NegQ[a/b] && (Gt Q[a, 0] || LtQ[b, 0])
Int[1/(((c_) + (d_.)*(x_))*Sqrt[(a_) + (b_.)*(x_)^2]), x_Symbol] :> -Subst[ Int[1/(b*c^2 + a*d^2 - x^2), x], x, (a*d - b*c*x)/Sqrt[a + b*x^2]] /; FreeQ [{a, b, c, d}, x]
Int[((g_.) + (h_.)*(x_))/(((a_) + (b_.)*(x_) + (c_.)*(x_)^2)*Sqrt[(d_) + (f _.)*(x_)^2]), x_Symbol] :> With[{q = Rt[b^2 - 4*a*c, 2]}, Simp[(2*c*g - h*( b - q))/q Int[1/((b - q + 2*c*x)*Sqrt[d + f*x^2]), x], x] - Simp[(2*c*g - h*(b + q))/q Int[1/((b + q + 2*c*x)*Sqrt[d + f*x^2]), x], x]] /; FreeQ[{ a, b, c, d, f, g, h}, x] && NeQ[b^2 - 4*a*c, 0] && PosQ[b^2 - 4*a*c]
Leaf count of result is larger than twice the leaf count of optimal. \(639\) vs. \(2(266)=532\).
Time = 2.24 (sec) , antiderivative size = 640, normalized size of antiderivative = 2.12
method | result | size |
default | \(-\frac {\left (2 A c +B \sqrt {-4 a c +b^{2}}-B b \right ) \ln \left (\frac {-\frac {f b \sqrt {-4 a c +b^{2}}+2 a c f -b^{2} f -2 c^{2} d}{c^{2}}-\frac {\left (b -\sqrt {-4 a c +b^{2}}\right ) f \left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}\right )}{c}+\frac {\sqrt {-\frac {2 \left (f b \sqrt {-4 a c +b^{2}}+2 a c f -b^{2} f -2 c^{2} d \right )}{c^{2}}}\, \sqrt {4 {\left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}\right )}^{2} f -\frac {4 \left (b -\sqrt {-4 a c +b^{2}}\right ) f \left (x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}\right )}{c}-\frac {2 \left (f b \sqrt {-4 a c +b^{2}}+2 a c f -b^{2} f -2 c^{2} d \right )}{c^{2}}}}{2}}{x -\frac {-b +\sqrt {-4 a c +b^{2}}}{2 c}}\right )}{\sqrt {-4 a c +b^{2}}\, c \sqrt {-\frac {2 \left (f b \sqrt {-4 a c +b^{2}}+2 a c f -b^{2} f -2 c^{2} d \right )}{c^{2}}}}+\frac {\left (2 A c -B \sqrt {-4 a c +b^{2}}-B b \right ) \ln \left (\frac {-\frac {-f b \sqrt {-4 a c +b^{2}}+2 a c f -b^{2} f -2 c^{2} d}{c^{2}}-\frac {\left (b +\sqrt {-4 a c +b^{2}}\right ) f \left (x +\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}\right )}{c}+\frac {\sqrt {-\frac {2 \left (-f b \sqrt {-4 a c +b^{2}}+2 a c f -b^{2} f -2 c^{2} d \right )}{c^{2}}}\, \sqrt {4 {\left (x +\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}\right )}^{2} f -\frac {4 \left (b +\sqrt {-4 a c +b^{2}}\right ) f \left (x +\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}\right )}{c}-\frac {2 \left (-f b \sqrt {-4 a c +b^{2}}+2 a c f -b^{2} f -2 c^{2} d \right )}{c^{2}}}}{2}}{x +\frac {b +\sqrt {-4 a c +b^{2}}}{2 c}}\right )}{\sqrt {-4 a c +b^{2}}\, c \sqrt {-\frac {2 \left (-f b \sqrt {-4 a c +b^{2}}+2 a c f -b^{2} f -2 c^{2} d \right )}{c^{2}}}}\) | \(640\) |
Input:
int((B*x+A)/(c*x^2+b*x+a)/(f*x^2+d)^(1/2),x,method=_RETURNVERBOSE)
Output:
-(2*A*c+B*(-4*a*c+b^2)^(1/2)-B*b)/(-4*a*c+b^2)^(1/2)/c/(-2*(f*b*(-4*a*c+b^ 2)^(1/2)+2*a*c*f-b^2*f-2*c^2*d)/c^2)^(1/2)*ln((-(f*b*(-4*a*c+b^2)^(1/2)+2* a*c*f-b^2*f-2*c^2*d)/c^2-(b-(-4*a*c+b^2)^(1/2))*f/c*(x-1/2/c*(-b+(-4*a*c+b ^2)^(1/2)))+1/2*(-2*(f*b*(-4*a*c+b^2)^(1/2)+2*a*c*f-b^2*f-2*c^2*d)/c^2)^(1 /2)*(4*(x-1/2/c*(-b+(-4*a*c+b^2)^(1/2)))^2*f-4*(b-(-4*a*c+b^2)^(1/2))*f/c* (x-1/2/c*(-b+(-4*a*c+b^2)^(1/2)))-2*(f*b*(-4*a*c+b^2)^(1/2)+2*a*c*f-b^2*f- 2*c^2*d)/c^2)^(1/2))/(x-1/2/c*(-b+(-4*a*c+b^2)^(1/2))))+(2*A*c-B*(-4*a*c+b ^2)^(1/2)-B*b)/(-4*a*c+b^2)^(1/2)/c/(-2*(-f*b*(-4*a*c+b^2)^(1/2)+2*a*c*f-b ^2*f-2*c^2*d)/c^2)^(1/2)*ln((-(-f*b*(-4*a*c+b^2)^(1/2)+2*a*c*f-b^2*f-2*c^2 *d)/c^2-(b+(-4*a*c+b^2)^(1/2))*f/c*(x+1/2*(b+(-4*a*c+b^2)^(1/2))/c)+1/2*(- 2*(-f*b*(-4*a*c+b^2)^(1/2)+2*a*c*f-b^2*f-2*c^2*d)/c^2)^(1/2)*(4*(x+1/2*(b+ (-4*a*c+b^2)^(1/2))/c)^2*f-4*(b+(-4*a*c+b^2)^(1/2))*f/c*(x+1/2*(b+(-4*a*c+ b^2)^(1/2))/c)-2*(-f*b*(-4*a*c+b^2)^(1/2)+2*a*c*f-b^2*f-2*c^2*d)/c^2)^(1/2 ))/(x+1/2*(b+(-4*a*c+b^2)^(1/2))/c))
Leaf count of result is larger than twice the leaf count of optimal. 8977 vs. \(2 (263) = 526\).
Time = 31.10 (sec) , antiderivative size = 8977, normalized size of antiderivative = 29.73 \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \sqrt {d+f x^2}} \, dx=\text {Too large to display} \] Input:
integrate((B*x+A)/(c*x^2+b*x+a)/(f*x^2+d)^(1/2),x, algorithm="fricas")
Output:
Too large to include
\[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \sqrt {d+f x^2}} \, dx=\int \frac {A + B x}{\sqrt {d + f x^{2}} \left (a + b x + c x^{2}\right )}\, dx \] Input:
integrate((B*x+A)/(c*x**2+b*x+a)/(f*x**2+d)**(1/2),x)
Output:
Integral((A + B*x)/(sqrt(d + f*x**2)*(a + b*x + c*x**2)), x)
Exception generated. \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \sqrt {d+f x^2}} \, dx=\text {Exception raised: ValueError} \] Input:
integrate((B*x+A)/(c*x^2+b*x+a)/(f*x^2+d)^(1/2),x, algorithm="maxima")
Output:
Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'assume' command before evaluation *may* help (example of legal syntax is 'assume(4*a*c-b^2>0)', see `assume?` for more deta
Exception generated. \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \sqrt {d+f x^2}} \, dx=\text {Exception raised: TypeError} \] Input:
integrate((B*x+A)/(c*x^2+b*x+a)/(f*x^2+d)^(1/2),x, algorithm="giac")
Output:
Exception raised: TypeError >> an error occurred running a Giac command:IN PUT:sage2:=int(sage0,sageVARx):;OUTPUT:Unable to divide, perhaps due to ro unding error%%%{%%{poly1[%%%{-4,[3,2,0]%%%}+%%%{16,[1,3,1]%%%},%%%{4,[4,2, 0]%%%}+%%
Timed out. \[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \sqrt {d+f x^2}} \, dx=\int \frac {A+B\,x}{\sqrt {f\,x^2+d}\,\left (c\,x^2+b\,x+a\right )} \,d x \] Input:
int((A + B*x)/((d + f*x^2)^(1/2)*(a + b*x + c*x^2)),x)
Output:
int((A + B*x)/((d + f*x^2)^(1/2)*(a + b*x + c*x^2)), x)
\[ \int \frac {A+B x}{\left (a+b x+c x^2\right ) \sqrt {d+f x^2}} \, dx=\left (\int \frac {\sqrt {f \,x^{2}+d}}{c f \,x^{4}+b f \,x^{3}+a f \,x^{2}+c d \,x^{2}+b d x +a d}d x \right ) a +\left (\int \frac {\sqrt {f \,x^{2}+d}\, x}{c f \,x^{4}+b f \,x^{3}+a f \,x^{2}+c d \,x^{2}+b d x +a d}d x \right ) b \] Input:
int((B*x+A)/(c*x^2+b*x+a)/(f*x^2+d)^(1/2),x)
Output:
int(sqrt(d + f*x**2)/(a*d + a*f*x**2 + b*d*x + b*f*x**3 + c*d*x**2 + c*f*x **4),x)*a + int((sqrt(d + f*x**2)*x)/(a*d + a*f*x**2 + b*d*x + b*f*x**3 + c*d*x**2 + c*f*x**4),x)*b