Traditionally, you will have to fit a model (single equation or system of equation model) for the variables that affect your objective. Then you would proceed to take the maximum of the fitted equations using calculus. That is the way it is done for instance to calculate maximum welfare econometrically. One of the pioneers in this area is the Nobel laureate economist Tinbergen. I attach a article of his for a simple model. Hope it helps.
The topic of economic growth and debt burden is a complex object of research. It would be correct to detail which economy you are talking about: regional or national. Following the points you have indicated:
The accuracy of the estimated debt/economic growth ratio depends on the accuracy of the hypotheses formulated about the influence of certain factors on the formation of debt and economic growth indicators (for example, GDP per capita). I believe that it is necessary to formulate a system of hypotheses. In addition, I support Lall B. Ramrattan that the achievement of your goal is related to the use of a econometric equations system according to influence factors (probably the panel regression method can be used). Georgi Kiranchev'sremark is also true. There is an effect of a time lag, it's need to take into account a time lag when searching for the optimal ratio of the quantities you are interested in. The correlation between the results of the diffusion of innovation (for example, the widespread introduction of computer technology) and the peaks of economic activity of the Kondratiev cycles comes to my mind.
Practical any library or machine learning framework for R/Python. For example, scikit-learn, keras, PyTorch, TensorFlow, etc.
Summary:
Logically based hypotheses; systems of econometric equations; panel regression; statistical sampling methods (bootstrap).
Using calculus, one can find out the optimal value of a variable. But first you have to find out what are you trying to maximize and then the constraints to that variable. See' Fundamental methods of Mathematical Economics by Alpha C. Chiang' for details.
Hi Mamadou Alieu Jallow . Hopefully I correctly interpreted your question. Since your goal to to establish the optimal level of debt, i suggests you employ a threshold model. Depending on the nature of the data that you intend to use, the available model options are Hanses (1999), Hansen (2000), Kremer et al (2013), Seo and Shin (2016) and Seo et al (2019). I think any of these models will help you to identify optimal debt level (threshold) and you can use other models such as GMM technique for robustness checking purposes.