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

Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
13 replies · 3K views
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   Reactions: 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   Reactions: 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.
 
PeroK said:
Okay, but you know what a sine function looks like?
Yeah ofcourse
 
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   Reactions: Delta2, Idonthave, vanhees71 and 1 other person
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.
 
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   Reactions: Delta2
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   Reactions: Delta2
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: