I can plot derivatives using ForwardDiff and Plots
but QuadGK.jl gives two answers so this method won’t work. Is there a way to plot the integral using QuadGK, or another integral package, that gives one output, like ForwardDiff?
Just extract the first output from QuadGK? EDIT: And please include reproducible code when you post questions.
Ok, how do I extract an output from QuadGK.
The same way as anything else in Julia: store the result in a variable, for example:
julia> f(x) = x / 2
f (generic function with 1 method)
julia> y = 10
julia> z = quadgk(f, 1, y)
And use the REPL or notebook to experiment and play around.
Are you looking for something like
plot(x -> quadgk(f, 1, x))?
That is, if you want to take advantage of the fact that the first
plot argument can be a function, you pass a function
x -> quadgk(f, 1, x) that takes an
x and returns \int_1^x f(x')dx', using
 to get the first return value of
quadgk (which returns a tuple).
Perfect, and I’ll be sure to play around with different variations @dpsanders !