Skip to content

Commit a28ed36

Browse files
committed
Merge pull request #79 from johnmyleswhite/nointegrate
deprecate numerical integration
2 parents 22d064d + 1aaacf3 commit a28ed36

File tree

5 files changed

+6
-111
lines changed

5 files changed

+6
-111
lines changed

README.md

+4-20
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ Most users will want to work with a limited set of basic functions:
2020
* `second_derivative()`: Use this for functions from R to R
2121
* `gradient()`: Use this for functions from R^n to R
2222
* `hessian()`: Use this for functions from R^n to R
23-
* `integrate()`: Use this to integrate functions from R to R
2423
* `differentiate()`: Use this to perform symbolic differentiation
2524
* `simplify()`: Use this to perform symbolic simplification
2625
* `deparse()`: Use this to get usual infix representation of expressions
@@ -104,33 +103,17 @@ derivative you calculate:
104103
f''(1.0) - (-sin(1.0))
105104
f'''(1.0) - (-cos(1.0))
106105

107-
## Integration using Simpson's Rule
108-
109-
using Calculus
110-
111-
# Compare with log(2)
112-
integrate(x -> 1 / x, 1.0, 2.0)
113-
114-
# Compare with cos(pi) - cos(0)
115-
integrate(x -> -sin(x), 0.0, float64(pi))
116-
117-
## Integration using Monte Carlo method
118-
119-
using Calculus
120-
121-
# Compare with cos(pi) - cos(0)
122-
integrate(x -> -sin(x), 0.0, float64(pi), :monte_carlo)
123-
124106
## Symbolic Differentiation
125107

126108
using Calculus
127109

128110
differentiate("cos(x) + sin(x) + exp(-x) * cos(x)", :x)
129111
differentiate("cos(x) + sin(y) + exp(-x) * cos(y)", [:x, :y])
130112

131-
# Coming Soon
113+
## Numerical Integration
132114

133-
* Finite differencing based on complex numbers
115+
The Calculus package no longer provides routines for univariate numerical integration.
116+
Use the ``quadgk`` method from base Julia instead.
134117

135118
# Credits
136119

@@ -142,6 +125,7 @@ Calculus.jl is built on contributions from:
142125
* Nathaniel Daw
143126
* Blake Johnson
144127
* Avik Sengupta
128+
* Miles Lubin
145129

146130
And draws inspiration and ideas from:
147131

src/Calculus.jl

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ module Calculus
1212
differentiate,
1313
gradient,
1414
hessian,
15-
integrate,
1615
jacobian,
1716
second_derivative
1817

@@ -60,7 +59,8 @@ module Calculus
6059
include("finite_difference.jl")
6160
include("derivative.jl")
6261
include("check_derivative.jl")
63-
include("integrate.jl")
62+
@Base.deprecate integrate(f,a,b) quadgk(f,a,b)[1]
63+
@Base.deprecate integrate(f,a,b,method) quadgk(f,a,b)[1]
6464
include("symbolic.jl")
6565
include("differentiate.jl")
6666
include("deparse.jl")

src/integrate.jl

-49
This file was deleted.

test/integrate.jl

-39
This file was deleted.

test/runtests.jl

-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ using Base.Test
88
tests = ["finite_difference",
99
"derivative",
1010
"check_derivative",
11-
"integrate",
1211
"symbolic",
1312
"deparse"]
1413

0 commit comments

Comments
 (0)