\(\int \frac {1}{a+8 x-8 x^2+4 x^3-x^4} \, dx\) [47]

Optimal result
Mathematica [C] (verified)
Rubi [A] (verified)
Maple [C] (verified)
Fricas [B] (verification not implemented)
Sympy [A] (verification not implemented)
Maxima [F]
Giac [B] (verification not implemented)
Mupad [B] (verification not implemented)
Reduce [B] (verification not implemented)

Optimal result

Integrand size = 22, antiderivative size = 93 \[ \int \frac {1}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\frac {\arctan \left (\frac {1-x}{\sqrt {1-\sqrt {4+a}}}\right )}{2 \sqrt {4+a} \sqrt {1-\sqrt {4+a}}}-\frac {\arctan \left (\frac {1-x}{\sqrt {1+\sqrt {4+a}}}\right )}{2 \sqrt {4+a} \sqrt {1+\sqrt {4+a}}} \] Output:

1/2*arctan((1-x)/(1-(4+a)^(1/2))^(1/2))/(4+a)^(1/2)/(1-(4+a)^(1/2))^(1/2)- 
1/2*arctan((1-x)/(1+(4+a)^(1/2))^(1/2))/(4+a)^(1/2)/(1+(4+a)^(1/2))^(1/2)
 

Mathematica [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.

Time = 0.03 (sec) , antiderivative size = 57, normalized size of antiderivative = 0.61 \[ \int \frac {1}{a+8 x-8 x^2+4 x^3-x^4} \, dx=-\frac {1}{4} \text {RootSum}\left [a+8 \text {$\#$1}-8 \text {$\#$1}^2+4 \text {$\#$1}^3-\text {$\#$1}^4\&,\frac {\log (x-\text {$\#$1})}{-2+4 \text {$\#$1}-3 \text {$\#$1}^2+\text {$\#$1}^3}\&\right ] \] Input:

Integrate[(a + 8*x - 8*x^2 + 4*x^3 - x^4)^(-1),x]
 

Output:

-1/4*RootSum[a + 8*#1 - 8*#1^2 + 4*#1^3 - #1^4 & , Log[x - #1]/(-2 + 4*#1 
- 3*#1^2 + #1^3) & ]
 

Rubi [A] (verified)

Time = 0.23 (sec) , antiderivative size = 89, normalized size of antiderivative = 0.96, number of steps used = 4, number of rules used = 3, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.136, Rules used = {2458, 1406, 217}

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 {1}{a-x^4+4 x^3-8 x^2+8 x} \, dx\)

\(\Big \downarrow \) 2458

\(\displaystyle \int \frac {1}{a-(x-1)^4-2 (x-1)^2+3}d(x-1)\)

\(\Big \downarrow \) 1406

\(\displaystyle \frac {\int \frac {1}{-(x-1)^2+\sqrt {a+4}-1}d(x-1)}{2 \sqrt {a+4}}-\frac {\int \frac {1}{-(x-1)^2-\sqrt {a+4}-1}d(x-1)}{2 \sqrt {a+4}}\)

\(\Big \downarrow \) 217

\(\displaystyle \frac {\arctan \left (\frac {x-1}{\sqrt {\sqrt {a+4}+1}}\right )}{2 \sqrt {a+4} \sqrt {\sqrt {a+4}+1}}-\frac {\arctan \left (\frac {x-1}{\sqrt {1-\sqrt {a+4}}}\right )}{2 \sqrt {a+4} \sqrt {1-\sqrt {a+4}}}\)

Input:

Int[(a + 8*x - 8*x^2 + 4*x^3 - x^4)^(-1),x]
 

Output:

-1/2*ArcTan[(-1 + x)/Sqrt[1 - Sqrt[4 + a]]]/(Sqrt[4 + a]*Sqrt[1 - Sqrt[4 + 
 a]]) + ArcTan[(-1 + x)/Sqrt[1 + Sqrt[4 + a]]]/(2*Sqrt[4 + a]*Sqrt[1 + Sqr 
t[4 + a]])
 

Defintions of rubi rules used

rule 217
Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(-(Rt[-a, 2]*Rt[-b, 2])^( 
-1))*ArcTan[Rt[-b, 2]*(x/Rt[-a, 2])], x] /; FreeQ[{a, b}, x] && PosQ[a/b] & 
& (LtQ[a, 0] || LtQ[b, 0])
 

rule 1406
Int[((a_) + (b_.)*(x_)^2 + (c_.)*(x_)^4)^(-1), x_Symbol] :> With[{q = Rt[b^ 
2 - 4*a*c, 2]}, Simp[c/q   Int[1/(b/2 - q/2 + c*x^2), x], x] - Simp[c/q   I 
nt[1/(b/2 + q/2 + c*x^2), x], x]] /; FreeQ[{a, b, c}, x] && NeQ[b^2 - 4*a*c 
, 0] && PosQ[b^2 - 4*a*c]
 

rule 2458
Int[(Pn_)^(p_.), x_Symbol] :> With[{S = Coeff[Pn, x, Expon[Pn, x] - 1]/(Exp 
on[Pn, x]*Coeff[Pn, x, Expon[Pn, x]])}, Subst[Int[ExpandToSum[Pn /. x -> x 
- S, x]^p, x], x, x + S] /; BinomialQ[Pn /. x -> x - S, x] || (IntegerQ[Exp 
on[Pn, x]/2] && TrinomialQ[Pn /. x -> x - S, x])] /; FreeQ[p, x] && PolyQ[P 
n, x] && GtQ[Expon[Pn, x], 2] && NeQ[Coeff[Pn, x, Expon[Pn, x] - 1], 0]
 
Maple [C] (verified)

Result contains higher order function than in optimal. Order 9 vs. order 3.

Time = 0.08 (sec) , antiderivative size = 51, normalized size of antiderivative = 0.55

method result size
default \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{4}\) \(51\)
risch \(\frac {\left (\munderset {\textit {\_R} =\operatorname {RootOf}\left (\textit {\_Z}^{4}-4 \textit {\_Z}^{3}+8 \textit {\_Z}^{2}-8 \textit {\_Z} -a \right )}{\sum }\frac {\ln \left (x -\textit {\_R} \right )}{-\textit {\_R}^{3}+3 \textit {\_R}^{2}-4 \textit {\_R} +2}\right )}{4}\) \(51\)

Input:

int(1/(-x^4+4*x^3-8*x^2+a+8*x),x,method=_RETURNVERBOSE)
 

Output:

1/4*sum(1/(-_R^3+3*_R^2-4*_R+2)*ln(x-_R),_R=RootOf(_Z^4-4*_Z^3+8*_Z^2-8*_Z 
-a))
 

Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 457 vs. \(2 (67) = 134\).

Time = 0.08 (sec) , antiderivative size = 457, normalized size of antiderivative = 4.91 \[ \int \frac {1}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\frac {1}{4} \, \sqrt {\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 1}{a^{2} + 7 \, a + 12}} \log \left ({\left (a - \frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 4\right )} \sqrt {\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 1}{a^{2} + 7 \, a + 12}} + x - 1\right ) - \frac {1}{4} \, \sqrt {\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 1}{a^{2} + 7 \, a + 12}} \log \left (-{\left (a - \frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 4\right )} \sqrt {\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 1}{a^{2} + 7 \, a + 12}} + x - 1\right ) + \frac {1}{4} \, \sqrt {-\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} - 1}{a^{2} + 7 \, a + 12}} \log \left ({\left (a + \frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 4\right )} \sqrt {-\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} - 1}{a^{2} + 7 \, a + 12}} + x - 1\right ) - \frac {1}{4} \, \sqrt {-\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} - 1}{a^{2} + 7 \, a + 12}} \log \left (-{\left (a + \frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} + 4\right )} \sqrt {-\frac {\frac {a^{2} + 7 \, a + 12}{\sqrt {a^{3} + 10 \, a^{2} + 33 \, a + 36}} - 1}{a^{2} + 7 \, a + 12}} + x - 1\right ) \] Input:

integrate(1/(-x^4+4*x^3-8*x^2+a+8*x),x, algorithm="fricas")
 

Output:

1/4*sqrt(((a^2 + 7*a + 12)/sqrt(a^3 + 10*a^2 + 33*a + 36) + 1)/(a^2 + 7*a 
+ 12))*log((a - (a^2 + 7*a + 12)/sqrt(a^3 + 10*a^2 + 33*a + 36) + 4)*sqrt( 
((a^2 + 7*a + 12)/sqrt(a^3 + 10*a^2 + 33*a + 36) + 1)/(a^2 + 7*a + 12)) + 
x - 1) - 1/4*sqrt(((a^2 + 7*a + 12)/sqrt(a^3 + 10*a^2 + 33*a + 36) + 1)/(a 
^2 + 7*a + 12))*log(-(a - (a^2 + 7*a + 12)/sqrt(a^3 + 10*a^2 + 33*a + 36) 
+ 4)*sqrt(((a^2 + 7*a + 12)/sqrt(a^3 + 10*a^2 + 33*a + 36) + 1)/(a^2 + 7*a 
 + 12)) + x - 1) + 1/4*sqrt(-((a^2 + 7*a + 12)/sqrt(a^3 + 10*a^2 + 33*a + 
36) - 1)/(a^2 + 7*a + 12))*log((a + (a^2 + 7*a + 12)/sqrt(a^3 + 10*a^2 + 3 
3*a + 36) + 4)*sqrt(-((a^2 + 7*a + 12)/sqrt(a^3 + 10*a^2 + 33*a + 36) - 1) 
/(a^2 + 7*a + 12)) + x - 1) - 1/4*sqrt(-((a^2 + 7*a + 12)/sqrt(a^3 + 10*a^ 
2 + 33*a + 36) - 1)/(a^2 + 7*a + 12))*log(-(a + (a^2 + 7*a + 12)/sqrt(a^3 
+ 10*a^2 + 33*a + 36) + 4)*sqrt(-((a^2 + 7*a + 12)/sqrt(a^3 + 10*a^2 + 33* 
a + 36) - 1)/(a^2 + 7*a + 12)) + x - 1)
 

Sympy [A] (verification not implemented)

Time = 0.56 (sec) , antiderivative size = 66, normalized size of antiderivative = 0.71 \[ \int \frac {1}{a+8 x-8 x^2+4 x^3-x^4} \, dx=- \operatorname {RootSum} {\left (t^{4} \cdot \left (256 a^{3} + 2816 a^{2} + 10240 a + 12288\right ) + t^{2} \left (- 32 a - 128\right ) - 1, \left ( t \mapsto t \log {\left (64 t^{3} a^{2} + 448 t^{3} a + 768 t^{3} - 4 t a - 20 t + x - 1 \right )} \right )\right )} \] Input:

integrate(1/(-x**4+4*x**3-8*x**2+a+8*x),x)
 

Output:

-RootSum(_t**4*(256*a**3 + 2816*a**2 + 10240*a + 12288) + _t**2*(-32*a - 1 
28) - 1, Lambda(_t, _t*log(64*_t**3*a**2 + 448*_t**3*a + 768*_t**3 - 4*_t* 
a - 20*_t + x - 1)))
 

Maxima [F]

\[ \int \frac {1}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\int { -\frac {1}{x^{4} - 4 \, x^{3} + 8 \, x^{2} - a - 8 \, x} \,d x } \] Input:

integrate(1/(-x^4+4*x^3-8*x^2+a+8*x),x, algorithm="maxima")
 

Output:

-integrate(1/(x^4 - 4*x^3 + 8*x^2 - a - 8*x), x)
 

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 2669 vs. \(2 (67) = 134\).

Time = 2.22 (sec) , antiderivative size = 2669, normalized size of antiderivative = 28.70 \[ \int \frac {1}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\text {Too large to display} \] Input:

integrate(1/(-x^4+4*x^3-8*x^2+a+8*x),x, algorithm="giac")
 

Output:

-1/4*sqrt(((a + 4)^(3/2) + a + 4)/(a^3 + 11*a^2 + 40*a + 48))*log(abs(sqrt 
(a + 4)*a^5 + sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*a^4*x + 
a^5 + sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*sqrt(a + 4)*a^3* 
x - sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*a^4 + 17*sqrt(a + 
4)*a^4 + 14*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*a^3*x - sq 
rt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*sqrt(a + 4)*a^3 + 17*a^4 
 + 10*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*sqrt(a + 4)*a^2* 
x - 14*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*a^3 + 111*sqrt( 
a + 4)*a^3 + 69*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*a^2*x 
- 10*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*sqrt(a + 4)*a^2 + 
 111*a^3 + 29*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*sqrt(a + 
 4)*a*x - 69*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*a^2 + 351 
*sqrt(a + 4)*a^2 + 144*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12) 
*a*x - 29*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*sqrt(a + 4)* 
a + 351*a^2 + 28*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*sqrt( 
a + 4)*x - 144*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*a + 544 
*sqrt(a + 4)*a + 112*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*x 
 - 28*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12)*sqrt(a + 4) + 54 
4*a - 112*sqrt(a^2 + (a^2 + 7*a + 12)*sqrt(a + 4) + 7*a + 12) + 336*sqrt(a 
 + 4) + 336)) + 1/4*sqrt(((a + 4)^(3/2) + a + 4)/(a^3 + 11*a^2 + 40*a +...
 

Mupad [B] (verification not implemented)

Time = 22.14 (sec) , antiderivative size = 571, normalized size of antiderivative = 6.14 \[ \int \frac {1}{a+8 x-8 x^2+4 x^3-x^4} \, dx=-\mathrm {atan}\left (-\frac {a\,8{}\mathrm {i}-x\,16{}\mathrm {i}+x\,\sqrt {a^3+12\,a^2+48\,a+64}\,1{}\mathrm {i}-a\,x\,8{}\mathrm {i}-\sqrt {a^3+12\,a^2+48\,a+64}\,1{}\mathrm {i}-a^2\,x\,1{}\mathrm {i}+a^2\,1{}\mathrm {i}+16{}\mathrm {i}}{44\,a^2\,\sqrt {\frac {a-\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+4\,a^3\,\sqrt {\frac {a-\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+160\,a\,\sqrt {\frac {a-\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+192\,\sqrt {\frac {a-\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}}\right )\,\sqrt {\frac {a-\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}\,2{}\mathrm {i}-\mathrm {atan}\left (-\frac {a\,8{}\mathrm {i}-x\,16{}\mathrm {i}-x\,\sqrt {a^3+12\,a^2+48\,a+64}\,1{}\mathrm {i}-a\,x\,8{}\mathrm {i}+\sqrt {a^3+12\,a^2+48\,a+64}\,1{}\mathrm {i}-a^2\,x\,1{}\mathrm {i}+a^2\,1{}\mathrm {i}+16{}\mathrm {i}}{160\,a\,\sqrt {\frac {a+\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+192\,\sqrt {\frac {a+\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+44\,a^2\,\sqrt {\frac {a+\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}+4\,a^3\,\sqrt {\frac {a+\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}}\right )\,\sqrt {\frac {a+\sqrt {a^3+12\,a^2+48\,a+64}+4}{16\,a^3+176\,a^2+640\,a+768}}\,2{}\mathrm {i} \] Input:

int(1/(a + 8*x - 8*x^2 + 4*x^3 - x^4),x)
 

Output:

- atan(-(a*8i - x*16i + x*(48*a + 12*a^2 + a^3 + 64)^(1/2)*1i - a*x*8i - ( 
48*a + 12*a^2 + a^3 + 64)^(1/2)*1i - a^2*x*1i + a^2*1i + 16i)/(44*a^2*((a 
- (48*a + 12*a^2 + a^3 + 64)^(1/2) + 4)/(640*a + 176*a^2 + 16*a^3 + 768))^ 
(1/2) + 4*a^3*((a - (48*a + 12*a^2 + a^3 + 64)^(1/2) + 4)/(640*a + 176*a^2 
 + 16*a^3 + 768))^(1/2) + 160*a*((a - (48*a + 12*a^2 + a^3 + 64)^(1/2) + 4 
)/(640*a + 176*a^2 + 16*a^3 + 768))^(1/2) + 192*((a - (48*a + 12*a^2 + a^3 
 + 64)^(1/2) + 4)/(640*a + 176*a^2 + 16*a^3 + 768))^(1/2)))*((a - (48*a + 
12*a^2 + a^3 + 64)^(1/2) + 4)/(640*a + 176*a^2 + 16*a^3 + 768))^(1/2)*2i - 
 atan(-(a*8i - x*16i - x*(48*a + 12*a^2 + a^3 + 64)^(1/2)*1i - a*x*8i + (4 
8*a + 12*a^2 + a^3 + 64)^(1/2)*1i - a^2*x*1i + a^2*1i + 16i)/(160*a*((a + 
(48*a + 12*a^2 + a^3 + 64)^(1/2) + 4)/(640*a + 176*a^2 + 16*a^3 + 768))^(1 
/2) + 192*((a + (48*a + 12*a^2 + a^3 + 64)^(1/2) + 4)/(640*a + 176*a^2 + 1 
6*a^3 + 768))^(1/2) + 44*a^2*((a + (48*a + 12*a^2 + a^3 + 64)^(1/2) + 4)/( 
640*a + 176*a^2 + 16*a^3 + 768))^(1/2) + 4*a^3*((a + (48*a + 12*a^2 + a^3 
+ 64)^(1/2) + 4)/(640*a + 176*a^2 + 16*a^3 + 768))^(1/2)))*((a + (48*a + 1 
2*a^2 + a^3 + 64)^(1/2) + 4)/(640*a + 176*a^2 + 16*a^3 + 768))^(1/2)*2i
 

Reduce [B] (verification not implemented)

Time = 0.16 (sec) , antiderivative size = 222, normalized size of antiderivative = 2.39 \[ \int \frac {1}{a+8 x-8 x^2+4 x^3-x^4} \, dx=\frac {-2 \sqrt {a +4}\, \sqrt {\sqrt {a +4}+1}\, \mathit {atan} \left (\frac {x -1}{\sqrt {\sqrt {a +4}+1}}\right )+2 \sqrt {\sqrt {a +4}+1}\, \mathit {atan} \left (\frac {x -1}{\sqrt {\sqrt {a +4}+1}}\right ) a +8 \sqrt {\sqrt {a +4}+1}\, \mathit {atan} \left (\frac {x -1}{\sqrt {\sqrt {a +4}+1}}\right )-\sqrt {a +4}\, \sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}-x +1\right )+\sqrt {a +4}\, \sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}+x -1\right )-\sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}-x +1\right ) a -4 \sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}-x +1\right )+\sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}+x -1\right ) a +4 \sqrt {\sqrt {a +4}-1}\, \mathrm {log}\left (\sqrt {\sqrt {a +4}-1}+x -1\right )}{4 a^{2}+28 a +48} \] Input:

int(1/(-x^4+4*x^3-8*x^2+a+8*x),x)
 

Output:

( - 2*sqrt(a + 4)*sqrt(sqrt(a + 4) + 1)*atan((x - 1)/sqrt(sqrt(a + 4) + 1) 
) + 2*sqrt(sqrt(a + 4) + 1)*atan((x - 1)/sqrt(sqrt(a + 4) + 1))*a + 8*sqrt 
(sqrt(a + 4) + 1)*atan((x - 1)/sqrt(sqrt(a + 4) + 1)) - sqrt(a + 4)*sqrt(s 
qrt(a + 4) - 1)*log(sqrt(sqrt(a + 4) - 1) - x + 1) + sqrt(a + 4)*sqrt(sqrt 
(a + 4) - 1)*log(sqrt(sqrt(a + 4) - 1) + x - 1) - sqrt(sqrt(a + 4) - 1)*lo 
g(sqrt(sqrt(a + 4) - 1) - x + 1)*a - 4*sqrt(sqrt(a + 4) - 1)*log(sqrt(sqrt 
(a + 4) - 1) - x + 1) + sqrt(sqrt(a + 4) - 1)*log(sqrt(sqrt(a + 4) - 1) + 
x - 1)*a + 4*sqrt(sqrt(a + 4) - 1)*log(sqrt(sqrt(a + 4) - 1) + x - 1))/(4* 
(a**2 + 7*a + 12))