How can I plot the function g(x) = sin(πn/L) x and its corresponding g²(x)?

AI Thread Summary
The discussion revolves around plotting the function g(x) = sin(πn/L)x and its square g²(x) within the context of quantum mechanics. Participants suggest various software tools for plotting, including gnuplot, Geogebra, and Wolfram Alpha, emphasizing their ease of use and accessibility. The importance of understanding how the parameter 'n' affects the sine function's frequency is highlighted, suggesting that visualizing different values can aid comprehension. The original poster expresses confusion about the relevance of the question to their studies, indicating a need for clearer connections between theory and visualization. Overall, the conversation focuses on finding effective ways to visualize mathematical functions related to quantum mechanics.
Idonthave
Messages
7
Reaction score
2
New poster has been reminded to post schoolwork problems in the Homework Help forums
Summary:: We are currently studying basics of quantum mechanics. I'm getting the theory part but it's hard to visualise everything and understand. We are given this question to plot the function so if someone could help me in this.

Plot the following function and the corresponding g²(x)

g(x) = sin(πn/L) x
0≤x≤L; n = 1,2,3, etc
 
  • Wow
Likes Delta2
Physics news on Phys.org
Idonthave said:
Summary:: We are currently studying basics of quantum mechanics. I'm getting the theory part but it's hard to visualise everything and understand. We are given this question to plot the function so if someone could help me in this.

Plot the following function and the corresponding g²(x)

g(x) = sin(πn/L) x
0≤x≤L; n = 1,2,3, etc
So, you're studying QM and you need help plotting the graph of a sine function?
 
There are a plethora of programs you can use to plot functions. My favorite is gnuplot. AFAIK it exists for free also under Microsoft.

A quite useful program is also Geogebra, with which you can easily visualize a lot in math and physics without much programming effort. It's also free software running on all platforms.
 
  • Love
Likes Delta2
PeroK said:
So, you're studying QM and you need help plotting the graph of a sine function?
Yes..we were studying and this was given to us in the middle of nowhere and I have no idea about it and how it's even related.
 
Idonthave said:
Yes..we were studying and this was given to us in the middle of nowhere and I have no idea about it and how it's even related.
Okay, but you know what a sine function looks like?
 
PeroK said:
Okay, but you know what a sine function looks like?
Yeah ofcourse
 
Idonthave said:
Yeah ofcourse
What precisely is the question?
 
PeroK said:
What precisely is the question?
To plot this function. No other detail is provided.
 
Idonthave said:
Summary:: We are currently studying basics of quantum mechanics. I'm getting the theory part but it's hard to visualise everything and understand. We are given this question to plot the function so if someone could help me in this.

Plot the following function and the corresponding g²(x)

g(x) = sin(πn/L) x
0≤x≤L; n = 1,2,3, etc
As an aside, you can do quick plots in wolfram alpha: E.g. Here's a case where n=2 and L=3
https://www.wolframalpha.com/input/?i=Plot+sin(π2x/3)+and+sin(π2x/3)**2+from+0+to+3
 
Last edited:
  • Like
Likes Delta2, Idonthave, vanhees71 and 1 other person
  • #10
O
vanhees71 said:
There are a plethora of programs you can use to plot functions. My favorite is gnuplot. AFAIK it exists for free also under Microsoft.

A quite useful program is also Geogebra, with which you can easily visualize a lot in math and physics without much programming effort. It's also free software running on all platforms.
Okay, will have a look at these. Thanks.
 
  • #12
Idonthave said:
Plot the following function and the corresponding g²(x)
g(x) = sin(πn/L) x
0≤x≤L; n = 1,2,3, etc
Everyone seems to be reading that as g(x) = sin(πnx/L). I assume that is what you meant.
 
  • Like
Likes Delta2
  • #13
haruspex said:
Everyone seems to be reading that as g(x) = sin(πnx/L). I assume that is what you meant.
Yeah, it's that only.
 
  • Like
Likes Delta2
  • #14
So I guess you know what the graph of ##g(x)=\sin x## looks like (I hope you are not lieing to us about this) and you don't know what the graph of ##f(x)=\sin (ax)## looks like where the constant a is ##a=\frac{\pi n}{L}## (it is actually not a constant but varies as n varies). The constant a in this case adjusts the frequency of the sine function (how fast it varies). I guess the only definite way to see this for yourself is to get one program (like the one vanhees71 suggested) or go to wolfram and plot the function ##\sin (ax)## for the various values of a, for example ##\sin 2 x##, ##sin 4 x## e.t.c and see how that affects the graph of the function.
 
Last edited:
Back
Top