0
$\begingroup$

For some reason the result of Plot of the following function:

Plot[-2 ln[{Cosh[1/2 (-(1/2) + x) 2] Sech[2/4]}], {x, 0, 1}]

is enter image description here

How can I get the graph of this function?

$\endgroup$
  • $\begingroup$ First step when Plot isn't doing what you expect: try evaluating it at a point, say x = 0.5 and see if you get what you expect. $\endgroup$ – Brett Champion Jul 24 '18 at 18:17
  • $\begingroup$ It should be Log, not ln. $\endgroup$ – corey979 Jul 24 '18 at 18:30
2
$\begingroup$

Try this:

Plot[-2 Log[10,{Cosh[1/2 (-(1/2) + x) 2] Sech[2/4]}], {x, 0, 1}] (*Log_10*)

Plot[-2 Log[{Cosh[1/2 (-(1/2) + x) 2] Sech[2/4]}], {x, 0, 1}] (*Log_e or ln*)

Plot[-2 Log[A, {Cosh[1/2 (-(1/2) + x) 2] Sech[2/4]}], {x, 0, 1}] (*Log_A*)

A can be any number.

$\endgroup$
  • $\begingroup$ Log[10, x] === Log10[x] $\endgroup$ – Bob Hanlon Jul 24 '18 at 20:10

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