1
$\begingroup$

I am attempting to graph a logarithmic function using the following code;

Plot[{Log[1/(2-e^(-2 x))^.5]},{x,-6,6}]

however, I am getting only axis with no displayed graph. Thank you in advance to anyone who can help!

I have also tried

f[x_]=Log[1/(2-e^(-2x))^.5]
Plot[{f[x]},{x,-6,6}]

The domain [-6,6] was a random selection with no particular significance.

Thank you for your time.

$\endgroup$
  • 7
    $\begingroup$ The Euler constant is E, not e. $\endgroup$ – Henrik Schumacher Oct 11 '18 at 20:28
3
$\begingroup$

The problem is with the way you wrote the Euler constant. Most builtin functions and variables in Mathematica are capitalized, so it should be E, not e. When Mathematica sees the lower case e it just seems like an undefined variable and switches to symbolic computation, which doesn't return a number so there is nothing to plot, hence the empty graph. So writing

Plot[{Log[1/(2 - E^(-2 x))^.5]}, {x, -6, 6}]

should solve your problem

| improve this answer | |
$\endgroup$

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