0
$\begingroup$

Is there any numerical method to solve $f(x,y)-g(x,y)=0$ within $[x_0,y_0]$ to $[x_n,y_n]$? $f(x,y)$ and $g(x,y)$, both are differentiable within the given range (in case if it's matter).

Example:

$f(x,y)=\frac{1}{x+y}$ and $g(x,y)=\frac{1}{x^2+y^2}$

I would like to find all roots (if exists) of the following equation from $x=0,y=1$ to $x=1,y=0$

$$f(x,y)-g(x,y)=0$$

  • 0
    Yes both are same but in the link, there are 3 eqns and 3 variables. But in my case I have only one equation and two variables $x$ and $y$. Is it still possible to solve with Newton-Raphson?2017-01-09
  • 0
    You could minimize $(f(x,y) - g(x,y))^2$, but you might obtain local minimizer only. Why don't just try some computer algebra system?2017-01-09

1 Answers 1

1

I guess you want solve the equation $$ f(x,y) - g(x,y) = 0 $$ on the line segment $$ S = \{ (1-t)(x_0, y_0) + t(x_n, y_n) \mid t\in [0,1] \}. $$ Your example is actually a smooth scalar equation on a compact interval. So basically every root finding method works. Notice that solving $$ \frac{f(x,y)}{g(x,y)} = 1 $$ might be numerically more stable.

For your example, you can obtain the solution after some algebra: \begin{align*} 0 &= (1-t)0 + t1 + (1-t)1 + t0 - ((1-t)0 + t1)^2 - ((1-t)1 + t0)^2 \\ &= 1 -t^2 - (1-t)^2 \\ &= 2t. \end{align*} That is, $t = 0$.