@@ -22,53 +22,53 @@ Pkg.add("SymbolicNumericIntegration")
2222Examples:
2323
2424``` julia
25- julia > using SymbolicNumericIntegration
26- julia > using Symbolics
25+ using Symbolics
26+ using SymbolicNumericIntegration
2727
28- julia > @variables x a b
28+ @variables x a b
2929
3030# if `detailed = true` (default), the output is a tuple of (solution, unsolved portion, err)
3131
32- julia > integrate (3 x^ 3 + 2 x - 5 )
33- (x^ 2 + (3 // 4 ) * (x^ 4 ) - (5 x), 0 , 0 )
32+ integrate (3 x^ 3 + 2 x - 5 )
33+ (x^ 2 + (3 // 4 ) * (x^ 4 ) - (5 x), 0 , 0 )
3434
35- julia > integrate ((5 + 2 x)^- 1 )
36- ((1 // 2 ) * log ((5 // 2 ) + x), 0 , 0.0 )
35+ integrate ((5 + 2 x)^- 1 )
36+ ((1 // 2 ) * log ((5 // 2 ) + x), 0 , 0.0 )
3737
3838# `detailed = false` simplifies the output to just the resulting integral
3939
40- julia > integrate (x^ 2 / (16 + x^ 2 ); detailed = false )
41- x + 4 atan ((- 1 // 4 ) * x)
40+ integrate (x^ 2 / (16 + x^ 2 ); detailed = false )
41+ x + 4 atan ((- 1 // 4 ) * x)
4242
43- julia > integrate (x^ 2 * log (x); detailed = false )
44- (1 // 3 ) * (x^ 3 )* log (x) - (1 // 9 ) * (x^ 3 )
43+ integrate (x^ 2 * log (x); detailed = false )
44+ (1 // 3 ) * (x^ 3 ) * log (x) - (1 // 9 ) * (x^ 3 )
4545
46- julia > integrate (sec (x) * tan (x); detailed = false )
46+ integrate (sec (x) * tan (x); detailed = false )
4747sec (x)
4848
4949# Symbolic integration. Here, a is a symbolic constant; therefore, we need
5050# to explicitly define the independent variable (say, x). Also, we set
5151# `symbolic = true` to force using the symbolic solver
5252
53- julia > integrate (sin (a * x), x; detailed = false , symbolic = true )
54- (- cos (a* x)) / a
53+ integrate (sin (a * x), x; detailed = false , symbolic = true )
54+ (- cos (a * x)) / a
5555
56- julia > integrate (x^ 2 * cos (a * x), x; detailed = false , symbolic = true )
57- ((a^ 2 )* (x^ 2 )* sin (a* x) + 2.0 a* x * cos (a* x) - 2.0 sin (a* x)) / (a^ 3 )
56+ integrate (x^ 2 * cos (a * x), x; detailed = false , symbolic = true )
57+ ((a^ 2 ) * (x^ 2 ) * sin (a * x) + 2.0 a * x * cos (a * x) - 2.0 sin (a * x)) / (a^ 3 )
5858
59- julia > integrate (log (log (a * x)) / x, x; detailed = false , symbolic = true )
60- log (a* x) * log (log (a* x)) - log (a* x)
59+ integrate (log (log (a * x)) / x, x; detailed = false , symbolic = true )
60+ log (a * x) * log (log (a * x)) - log (a * x)
6161
6262# multiple symbolic constants
6363
64- julia > integrate (cosh (a * x) * exp (b * x), x; detailed = false , symbolic = true )
65- (a* sinh (a* x) * exp (b* x) - b* cosh (a* x) * exp (b* x)) / (a^ 2 - (b^ 2 ))
64+ integrate (cosh (a * x) * exp (b * x), x; detailed = false , symbolic = true )
65+ (a * sinh (a * x) * exp (b * x) - b * cosh (a * x) * exp (b * x)) / (a^ 2 - (b^ 2 ))
6666
6767# definite integration, passing a tuple of (x, lower bound, higher bound) in the
6868# second argument
6969
70- julia > integrate (x * sin (a * x), (x, 0 , 1 ); symbolic = true , detailed = false )
71- (sin (a) - a* cos (a)) / (a^ 2 )
70+ integrate (x * sin (a * x), (x, 0 , 1 ); symbolic = true , detailed = false )
71+ (sin (a) - a * cos (a)) / (a^ 2 )
7272```
7373
7474SymbolicNumericIntegration.jl exports some special integral functions (defined over Complex numbers) and uses them in solving integrals:
@@ -81,13 +81,13 @@ SymbolicNumericIntegration.jl exports some special integral functions (defined o
8181For examples:
8282
8383``` julia
84- julia > integrate (exp (x + 1 ) / (x + 1 ))
84+ integrate (exp (x + 1 ) / (x + 1 ))
8585(SymbolicNumericIntegration. Ei (1 + x), 0 , 0.0 )
8686
87- julia > integrate (x * cos (a* x^ 2 - 1 ) / (a* x^ 2 - 1 ), x; detailed= false , symbolic= true )
88- ((1 // 2 ) * SymbolicNumericIntegration. Ci (a* (x^ 2 ) - 1 )) / a
87+ integrate (x * cos (a * x^ 2 - 1 ) / (a * x^ 2 - 1 ), x; detailed = false , symbolic = true )
88+ ((1 // 2 ) * SymbolicNumericIntegration. Ci (a * (x^ 2 ) - 1 )) / a
8989
90- julia > integrate (1 / (x* log (log (x))), x; detailed= false , symbolic= true )
90+ integrate (1 / (x * log (log (x))), x; detailed = false , symbolic = true )
9191SymbolicNumericIntegration. Li (log (x))
9292```
9393
@@ -213,4 +213,4 @@ file and the
213213[project]($link_project)
214214file.
215215""")
216- ```
216+ ```
0 commit comments