-1
$\begingroup$

My Mathematica plot is coming out as blank. I am trying to plot my eigenfunction Ψ1.

Here is my code. What am I doing wrong?

Ψ1[x_] := sqrt[2/L] sin[{Pi x}/{L}];
L = 1;
Plot[Ψ1[x], {x, 0, L}]

enter image description here

$\endgroup$
1
  • $\begingroup$ You can format inline code and code blocks by selecting the code and clicking the {} button above the edit window. The edit window help button ? is useful for learning how to format your questions and answers. You may also find this meta Q&A helpful $\endgroup$
    – Michael E2
    Feb 26, 2019 at 14:59

1 Answer 1

6
$\begingroup$

Use Sqrt[] not sqrt[] and Sin[] not sin[]. For coupling/grouping use () not {}.

F[x_] := Sqrt[2/L] Sin[(Pi x)/L];
L = 1;
Plot[F[x], {x, 0, L}]
$\endgroup$
1
  • 5
    $\begingroup$ When You get a blank plot, it means that evaluation of your expression does not yield a real number. In that case, simply trying out your expression on a number will usually help show you what the problem is. $\endgroup$
    – John Doty
    Feb 26, 2019 at 15:05

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