You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can imagine a non-trivial portion of users only want to perform 1D integrals. A simple example showing how a numerical integral of cosine equals sine would be:
julia> using Integrals
julia> f(x, p) = cos(x)
f (generic function with 1 method)
julia> my_sin(x) = solve(IntegralProblem(f, 0, x), HCubatureJL()).u
my_sin (generic function with 1 method)
julia> # `my_sin` is a numerical approximation of sin
julia> # The integration constant is zero
julia> let x = rand(10)
@. my_sin(x) ≈ sin(x)
end
10-element BitVector:
1
1
1
1
1
1
1
1
1
1
This example does the problem specification, solving, and solution extraction in a single line and of course therefore not be the first example. But something to that flavor.
The text was updated successfully, but these errors were encountered:
I can imagine a non-trivial portion of users only want to perform 1D integrals. A simple example showing how a numerical integral of cosine equals sine would be:
This example does the problem specification, solving, and solution extraction in a single line and of course therefore not be the first example. But something to that flavor.
The text was updated successfully, but these errors were encountered: