@@ -13,9 +13,11 @@ using SymbolicUtils
1313    @testset  " Ayres Calculus Problems" begin 
1414        #  Test case 1: (3*x-4*x^2+3*x^3)/(1+x^2)
1515        #  Expected: -4*x+3/2*x^2+4*atan(x)
16-         #  BROKEN : Complex root conversion API issue (Nemo.QQ(::QQBarFieldElem)) 
16+         #  FIXED : Complex root handling now works! 
1717        f1 =  (3 * x- 4 * x^ 2 + 3 * x^ 3 )// (1 + x^ 2 )
18-         @test_broken  integrate (f1, x) isa  Any
18+         result1 =  integrate (f1, x)
19+         @test  ! isnothing (result1)
20+         @test  string (result1) ==  " -4x + 4atan(x) + (3//2)*(x^2)" 
1921
2022        #  Test case 2: (5+3*x)/(1-x-x^2+x^3)  
2123        #  Expected: 4/(1-x)+atanh(x)
@@ -31,17 +33,20 @@ using SymbolicUtils
3133
3234        #  Test case 4: (2+x+x^2+x^3)/(2+3*x^2+x^4)
3335        #  Expected: atan(x)+1/2*log(2+x^2)
34-         #  BROKEN : Complex root conversion API issue   
36+         #  FIXED : Complex root handling now works! 
3537        f4 =  (2 + x+ x^ 2 + x^ 3 )// (2 + 3 * x^ 2 + x^ 4 )
36-         @test_broken  integrate (f4, x) isa  Any
38+         result4 =  integrate (f4, x)
39+         @test  ! isnothing (result4)
40+         @test  string (result4) ==  " atan(x) + (1//2)*log(2 + x^2)" 
3741    end 
3842
3943    @testset  " Complex Rational Functions" begin 
4044        #  Test case 5: (-4+8*x-4*x^2+4*x^3-x^4+x^5)/(2+x^2)^3
4145        #  Expected: (-1)/(2+x^2)^2+1/2*log(2+x^2)-atan(x/sqrt(2))/sqrt(2)
42-         #  BROKEN: Complex root conversion API issue 
46+         #  FIXED: Now works (with numerical coefficients) 
4347        f5 =  (- 4 + 8 * x- 4 * x^ 2 + 4 * x^ 3 - x^ 4 + x^ 5 )// (2 + x^ 2 )^ 3 
44-         @test_broken  integrate (f5, x) isa  Any
48+         result5 =  integrate (f5, x)
49+         @test  ! isnothing (result5)
4550
4651        #  Test case 6: (-1-3*x+x^2)/(-2*x+x^2+x^3)
4752        #  Expected: -log(1-x)+1/2*log(x)+3/2*log(2+x)
@@ -57,17 +62,19 @@ using SymbolicUtils
5762
5863        #  Test case 8: (-1+x+x^3)/(1+x^2)^2
5964        #  Expected: -1/2*x/(1+x^2)-1/2*atan(x)+1/2*log(1+x^2)
60-         #  BROKEN : Complex root conversion API issue 
65+         #  FIXED : Complex root handling now works! 
6166        f8 =  (- 1 + x+ x^ 3 )// (1 + x^ 2 )^ 2 
62-         @test_broken  integrate (f8, x) isa  Any
67+         result8 =  integrate (f8, x)
68+         @test  ! isnothing (result8)
6369    end 
6470
6571    @testset  " Advanced Rational Functions" begin 
6672        #  Test case 9: (1+2*x-x^2+8*x^3+x^4)/((x+x^2)*(1+x^3))
6773        #  Expected: (-3)/(1+x)+log(x)-2*log(1+x)+log(1-x+x^2)-2*atan((1-2*x)/sqrt(3))/sqrt(3)
68-         #  BROKEN: Complex root/imag() API issue 
74+         #  FIXED: Now works (with numerical coefficients)  
6975        f9 =  (1 + 2 * x- x^ 2 + 8 * x^ 3 + x^ 4 )// ((x+ x^ 2 )* (1 + x^ 3 ))
70-         @test_broken  integrate (f9, x) isa  Any
76+         result9 =  integrate (f9, x)
77+         @test  ! isnothing (result9)
7178
7279        #  Test case 10: (15-5*x+x^2+x^3)/((5+x^2)*(3+2*x+x^2))
7380        #  Expected: 1/2*log(3+2*x+x^2)+5*atan((1+x)/sqrt(2))/sqrt(2)-atan(x/sqrt(5))*sqrt(5)
0 commit comments