0

I am trying to see if the two graphs intersect each other or not. If they intersect, I want to know the points too. One is an exponential function in and the other is a polynomial function in two variables $x$ and $y$. I was using Solve to do the same before when both were polynomial functions. Now, Solve just returns the arguments.

Solve[4 + 0.2 Exp[-x] == (-0.38 x^2 - 
    x (0.05 (0.2 - 1.6 y) + 0.2 (-2.9 - 0.2 y)) - 
    0.8 y (0.15 - 0.2 y + 0.9 (-3 + 2 y)))/(0.2 x + 0.8 y) && x >= 0 &&
   y >= 0, {x, y}]

Can you please guide me with this?

J. M.'s missing motivation
  • 124,525
  • 11
  • 401
  • 574
gaganso
  • 295
  • 1
  • 9

2 Answers2

2

You can use Contourplot more directly to show the solutionrange of f1[x]==f2[x,y]

ContourPlot[f1[x] == f2[x, y] , {x, -c, c}, {y, -c, c} , FrameLabel -> {x, y}]

enter image description here

This contour equals the solution of NSolve[f1[x] == f2[x, y] , {x, y}]

Ulrich Neumann
  • 53,729
  • 2
  • 23
  • 55
  • Yes, very nice! This clearly shows where the solution is! The place of discontinuity is where the denominator equals zero: p = ContourPlot[f1[x] == f2[x, y], {x, -c, c}, {y, -c, c}, FrameLabel -> {x, y}]; q = ContourPlot[.2 x + .8 y == 0, {x, -c, c}, {y, -c, c}, ContourStyle -> Red]; Show[p, q] – mjw Mar 31 '19 at 17:49
1

I believe there is no solution when both $x\ge 0$ and $y\ge0$.

Here are some quick plots:

 c = 3;
 f1[x_] = 4 + Exp[-x];
 f2[x_, y_] = (-0.38 x^2 - x (0.05 (0.2 - 1.6 y) + 0.2 (-2.9 - 0.2 y)) 
               - 0.8 y (0.15 - 0.2 y + 0.9 (-3 + 2 y)))/(0.2 x + 0.8 y);
 ContourPlot[{f2[x, y]}, {x, 0, c}, {y, 0, c}, 
   Contours -> 10, FrameLabel -> {x, y}]
 Plot[f1[x], {x, 0, c}, AxesLabel -> {x, 4 + Exp[-x]}]

enter image description here

At the innermost contour shown, $f_2(x,y) = 2$ and the value of $f_2(x,y)$ along the other contours decreases as $x$ and $y$ increase. The function $f_1(x,y)=4+\exp(-x)$ is bounded between $4$ and $5$ for $x\ge0$.

Also,

 f2[10^-30, 10^-30] 

returns

2.61.

If you relax the conditions $\{x\ge0,y\ge0\}$, Mathematica will return solutions:

 NSolve[4. + 0.2 Exp[-x] == (-0.38 x^2 
        -x (0.05 (0.2 - 1.6 y) + 0.2 (-2.9 - 0.2 y)) 
        -0.8 y (0.15 - 0.2 y + 0.9 (-3 + 2 y)))/(0.2 x + 0.8 y), 
        {x, y}]

does give a complicated expression for $y$ as a function of $x$.

mjw
  • 2,146
  • 5
  • 13