0
$\begingroup$

I want to plot the implicit function $y=\log_2(1+x\,y)$ as a function of $x$.

I tried with ContourPlot and NSolve, but I'm getting a lot of errors.

$\endgroup$
1
  • 1
    $\begingroup$ Where is your try? $\endgroup$ – zhk Jun 15 '17 at 3:19
1
$\begingroup$

Something like this?

f[x_, y_] := y - Log2[1 + x*y];

ContourPlot[f[x, y] == 0, {x, 0, 5}, {y, 0, 5}, ColorFunction -> Hue]
$\endgroup$
4
  • 1
    $\begingroup$ Perhaps, y - Log[1 + x*y, 2] instead. $\endgroup$ – bbgodfrey Jun 15 '17 at 3:43
  • 2
    $\begingroup$ @bbgodfrey I think, it should be y - Log[2, 1+x*y]? What you say? $\endgroup$ – zhk Jun 15 '17 at 3:50
  • $\begingroup$ Indeed, it should. $\endgroup$ – bbgodfrey Jun 15 '17 at 3:51
  • $\begingroup$ @bbgodfrey Thx for pointing that out, otherwise, I could have suggested something wrong. $\endgroup$ – zhk Jun 15 '17 at 3:52
1
$\begingroup$

The straightforward approach works for me.

 ContourPlot[y == Log2[1 + x y], {x, 1, 100}, {y, 1, 10}]

plot

$\endgroup$
1
$\begingroup$

Just to complete, solve the equation with respect to x, yeilding x=(2^y-1)/yand then use the parametric plot:

ParametricPlot[{(-1 + 2^y)/y, y}, {y, 0.1, 10}, AspectRatio -> 0.7]

enter image description here

Have fun!

$\endgroup$

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