# Solving non-linear function [closed]

I'm trying to solve the following function:

$$R_c(x) = 100(x_2 − x_1^2)^2 + (1 − x_1)^2$$

I need to find values of $$x_1$$ and $$x_2$$ as the value of $$R_c$$ changes. For example one solution to $$R_c$$ is 0, so $$R_c=0=100(x_2 − x_1^2)^2 + (1 − x_1)^2$$ and then I need to solve for $$x_2$$ and $$x_1$$.

Another solution to $$R_c$$ is $$108.32$$, so $$R_c=108.32=100(x_2 − x_1^2)^2 + (1 − x_1)^2$$ and then I need to solve for $$x_2$$ and $$x_1$$, etc.

Is there any way I can do this on Matlab or a calculator? I don't know where to start. Any help will be appreciated. I don't need a solution, just a starting point.

• Given the value of $Rc(x)$, You can find the associate curve, not the value of $x_1$ and $x_2$. You need to condition to determine the both. – Young Kindaichi Apr 17 at 10:04
• Would Mathematics be a better home for this question. – Qmechanic Apr 17 at 11:31

Just use a graphing calculator tool like Geogebra and enter the equation with substituting x1 = x and x2 = y and Rc = b ( some parameter or slider ).

Then you will get the curves for any given value of b, which are the locus of all x,y which satisfy the given equation.

Below is the curve for value of Rc = 100 . You can use the slider to change the value of Rc to any value that you desire

To make the formulae look easier try a change of variable

$$p=1-x_1$$

$$q=10(x_2-x_1^2)$$

then

$$p^2+q^2=0$$, Hint: squared terms are positive or zero

or

$$p^2+q^2=108.32$$

There seem to be many possible solutions for the second, maybe you could investigate from there.

You need more information than you have given us to solve this. Without such information there are always infinitely many solutions when you have only one equation and two unknowns.

For example are the $$x_1$$ and $$x_2$$ supposed to be real numbers? If so, then when $$R_c=0$$ both $$(x_1-x_1)^2$$ and $$(1-x_1)^2$$ cannot be negative. Then they can only sum to zero if they both zero, making so $$x_1=x_1=1$$. If the $$x_{1,2}$$ can be complex, however, then you have an infinity of solutions.

Another possibility is that $$x_{1,2}$$ are required to be integers, then you have a diophantine problem, which is rather harder.