I am new to Rcpp so I apologize in advance if this question is simple to answer. I searched on the web but couldn't find much help and I am hoping the savviness in this forum can help me!
I have an existing code in R using Rcpp, and I need to add to this code the following. I have a quadratic function in two variables, f(x, y), and I need to find the zeros of it:
f(x, y) = (x + by + c)' W (x + by + c)
where the unknowns are x and y. That is, I am interested in finding the set of pairs (x, y) that satisfy f(x , y)=0.
Note: This is a simulation exercise where I need to find the zeros of this function for different values of a, b, c and W. Therefore, I need to code this in a mechanical way (cannot just find the solution, for instance, by graphical inspection). Both variables are continue, and I don't want to work with a grid for (x,y) to see when f(x,y)=0. I need a more general/optimization solution. I don't really know what values (x,y) can take.