- #1
CAF123
Gold Member
- 2,948
- 88
Consider an integral of the form $$\int_{-1}^1 dx f(x)g(x).$$
I'd like to use https://www.gnu.org/software/gsl/doc/html/min.html to find the maximum of the convolution ##f(x)g(x)## in the domain ##x \in [-1,1]##. The method initiates via a double function with parameters x and a void params.
1) Is it a necessary part of the method to declare a function with such arguments? The function in the link returns cos x + 1. What is the syntax if I want to return the output of another function defined previously in my program?
I'd like to use https://www.gnu.org/software/gsl/doc/html/min.html to find the maximum of the convolution ##f(x)g(x)## in the domain ##x \in [-1,1]##. The method initiates via a double function with parameters x and a void params.
1) Is it a necessary part of the method to declare a function with such arguments? The function in the link returns cos x + 1. What is the syntax if I want to return the output of another function defined previously in my program?