I have been trying to solve two integrals at the same time using the Integrals.jl Package. I am following the example in the documentation of Integrals.jl in the link below.
My function that I am integrating is an in-place function that modifies a vector of size 2.
using LinearAlgebra
using Integrals, Cubature
function func!(y::Vector{Float64}, k::Float64, p::Vector{Float64})
epsilon = k^2 - p[2];
energy = sqrt( epsilon^2 + p[1]^2 );
tangent = tanh( p[3] * energy ) / energy;
y[1] = tangent * k^2 - 1;
y[2] = k^2 * ( 1 - tangent * epsilon );
end
prob = IntegralProblem(func!, 0, 100, [1.0, 1.0, 100.0]; nout = 2);
sol = solve(prob, HCubatureJL());
println(sol.u)
It tells me that I need to specify that the function I am integrating has two inputs and two outputs with the arument “nout = 2” but when I do so I get a warning telling me that that argument is depricated and that I should use “IntegralsFunctions” instead.
┌ Warning: `nout` and `batch` keywords are deprecated in favor of inplace `IntegralFunction`s or `BatchIntegralFunction`s. See the updated Integrals.jl documentation for details.
â”” @ SciMLBase C:\Users\laura\.julia\packages\SciMLBase\2HZ5m\src\problems\basic_problems.jl:475
[0.13095384303975866, 1.2935022147141437]
The problem is, I can not for the life of me find any documentation for how to use “IntegralFunctions”. This is my first forum post so I hope I am doing this correctly, thanks in advance.