0
$\begingroup$

I have a problem with form similar to the following:

I have a set of equations that is f(x, y) = 0. For each x, I can use FindRoot to find a value of y. Suppose I want to select the x such that the implied value of y is minimises something like (y- y*)^2.

I feel like I want to combine NMinimize or FindMinimum with FindRoot but have difficulty achieving this.

$\endgroup$
3
$\begingroup$

Without information about y* you could solve your problem in one step using NMinimize:

NMinimize[{(y-ystar)^2,f[x,y]==0},{x,y}]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.