@@ -6,15 +6,15 @@ half_derivative_of_x_square_minus_1_at_1 = 5/(3*sqrt(π))
66half_derivative_of_exp_at_1 = ℯ* erf (1 )+ 1 / sqrt (π)
77
88@testset " Test Caputo Direct Fractional Derivative" begin
9- @test isapprox (fracdiff (x-> x, 0.5 , 0 , 1 , 1e-8 , CaputoDirect ())[1 ], 2 / sqrt (pi ); atol = 1e-5 )
10- @test isapprox (fracdiff (x-> x^ 5 , 0.5 , 0 , 3.2 , 1e-8 , CaputoDirect ())[1 ], 4.300306216488329e2 ; atol = 1e-5 )
11- @test isapprox (fracdiff (x-> x^ 5 , 0.25 , 0 , 3.2 , 1e-8 , CaputoDirect ())[1 ], 382.1228113951680 ; atol = 1e-5 )
12- @test isapprox (fracdiff (x-> (x- 3 )^ 3 + (x+ 2 )^ 2 + 5 , 0.5 , 0 , 0.83 , 1e-8 , CaputoDirect ())[1 ], 23.899930581118699 ; atol = 1e-5 )
13- @test isapprox (fracdiff (x-> (x- 3 )^ 3 + (x+ 2 )^ 2 + 5 , 0.25 , 0 , 0.83 , 1e-8 , CaputoDirect ())[1 ], 22.96354626572943 ; atol = 1e-5 )
14- @test isapprox (fracdiff (x-> cos (x), 0.5 , 0 , 0.34 , 1e-8 , CaputoDirect ())[1 ], - 0.147174774607683 ; atol = 1e-5 )
15- @test isapprox (fracdiff (x-> cos (x), 0.25 , 0 , 0.34 , 1e-8 , CaputoDirect ())[1 ], - 0.093074344902431 ; atol = 1e-5 )
16- @test isapprox (fracdiff (x-> exp (- x^ 2 ), 0.5 , 0 , 2.3 , 1e-8 , CaputoDirect ())[1 ], - 0.505891017154289 ; atol = 1e-5 )
17- @test isapprox (fracdiff (x-> exp (- x^ 2 ), 0.25 , 0 , 2.3 , 1e-8 , CaputoDirect ())[1 ], - 0.762927553656252 ; atol = 1e-5 )
9+ @test isapprox (fracdiff (x-> x, 0.5 , 0 , 1 , 1e-4 , CaputoDirect ())[1 ], 2 / sqrt (pi ); atol = 1e-5 )
10+ @test isapprox (fracdiff (x-> x^ 5 , 0.5 , 0 , 3.2 , 1e-4 , CaputoDirect ())[1 ], 4.300306216488329e2 ; atol = 1e-5 )
11+ @test isapprox (fracdiff (x-> x^ 5 , 0.25 , 0 , 3.2 , 1e-4 , CaputoDirect ())[1 ], 382.1228113951680 ; atol = 1e-5 )
12+ @test isapprox (fracdiff (x-> (x- 3 )^ 3 + (x+ 2 )^ 2 + 5 , 0.5 , 0 , 0.83 , 1e-4 , CaputoDirect ())[1 ], 23.899930581118699 ; atol = 1e-5 )
13+ @test isapprox (fracdiff (x-> (x- 3 )^ 3 + (x+ 2 )^ 2 + 5 , 0.25 , 0 , 0.83 , 1e-4 , CaputoDirect ())[1 ], 22.96354626572943 ; atol = 1e-5 )
14+ @test isapprox (fracdiff (x-> cos (x), 0.5 , 0 , 0.34 , 1e-4 , CaputoDirect ())[1 ], - 0.147174774607683 ; atol = 1e-5 )
15+ @test isapprox (fracdiff (x-> cos (x), 0.25 , 0 , 0.34 , 1e-4 , CaputoDirect ())[1 ], - 0.093074344902431 ; atol = 1e-5 )
16+ @test isapprox (fracdiff (x-> exp (- x^ 2 ), 0.5 , 0 , 2.3 , 1e-4 , CaputoDirect ())[1 ], - 0.505891017154289 ; atol = 1e-5 )
17+ @test isapprox (fracdiff (x-> exp (- x^ 2 ), 0.25 , 0 , 2.3 , 1e-4 , CaputoDirect ())[1 ], - 0.762927553656252 ; atol = 1e-5 )
1818
1919 @test isapprox (fracdiff (x-> x, 0.5 , 0 , [1 , 2 , 3 ], 0.0001 , CaputoDirect ()), [2 / sqrt (pi ), 1.5957691216057408 , 1.9544100476116828 ]; atol= 1e-3 )
2020end
0 commit comments