I have a cost function with 2 parameters. The variables are dependent on each other. So, if I just take a partial derivative with respect to one variable the slope is in terms of the other variable and vice-versa. So, how can I compute the optimal values for these variables that minimize my cost function?
10$\begingroup$ It would be useful if you could show your problem in formulas. $\endgroup$– Wolfgang BangerthApr 10, 2019 at 14:17
2$\begingroup$ I concur, please provide the actual formulas. $\endgroup$– MPIchaelMay 16, 2019 at 14:43
What you have appears to be a non-linear function which you are trying to optimize. Whilst not as trivial as linear optimization it is not particularly difficult either. Since numerically you aren't working with symbolic variables but always with numbers (arrays of numbers called vectors) which are computed at each step of the optimization process anew, to adapt to the parameters being considered.
I'd suggest you open a book on numerical analysis at the chapter treating non-linear optimization. One method to try would be gradient descent, but there are better variations.