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

In summary: This is very important, because it is a standard mathematical trick to make the frequency of a sine function vary with time, and this is what the question is asking you to do. So, if you are ok with that, now we come to the second part of the question, which is to plot the graph of ##g^2(x)##.Yes, I understand now. Thank you for explaining it in detail. I will try plotting the functions using the suggested methods.
  • #1
Idonthave
7
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
  • #2
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?
 
  • #3
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
  • #4
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.
 
  • #5
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?
 
  • #6
PeroK said:
Okay, but you know what a sine function looks like?
Yeah ofcourse
 
  • #7
Idonthave said:
Yeah ofcourse
What precisely is the question?
 
  • #8
PeroK said:
What precisely is the question?
To plot this function. No other detail is provided.
 
  • #9
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:

1. What is the purpose of plotting the function g(x) = sin(πn/L) x and its corresponding g²(x)?

The purpose of plotting these functions is to visually represent the relationship between the input values (x) and the output values (g(x) and g²(x)). This can help in understanding the behavior of the functions and identifying any patterns or trends.

2. How do I choose the appropriate values for n and L when plotting g(x) = sin(πn/L) x and g²(x)?

The values of n and L can be chosen based on the desired range and precision of the plot. Generally, n can take on any integer value and L can be any positive real number. It is recommended to choose values that will result in a smooth and clear plot.

3. Can I plot g(x) = sin(πn/L) x and g²(x) on the same graph?

Yes, you can plot both functions on the same graph by using different colors or line styles to differentiate between them. This will allow for a direct comparison between the two functions.

4. How can I interpret the graph of g(x) = sin(πn/L) x and g²(x)?

The graph of g(x) will be a sinusoidal curve with a period of L and amplitude of 1. The graph of g²(x) will be a similar curve, but with a smaller amplitude of 0.5. This indicates that g²(x) is the squared function of g(x).

5. Are there any special considerations when plotting g(x) = sin(πn/L) x and g²(x)?

One consideration is that the values of n and L should be chosen carefully to avoid any singularities or discontinuities in the plot. Additionally, it may be helpful to adjust the scale of the graph to better visualize the curves and their relationship.

Similar threads

  • Introductory Physics Homework Help
Replies
1
Views
1K
Replies
10
Views
3K
Replies
3
Views
1K
  • Quantum Physics
Replies
31
Views
3K
  • Introductory Physics Homework Help
Replies
2
Views
2K
Replies
1
Views
954
  • Computing and Technology
Replies
4
Views
3K
  • Introductory Physics Homework Help
Replies
7
Views
2K
Replies
1
Views
1K
Replies
11
Views
4K
Back
Top