Plotting k^2 in Mathematica - Output Not 1?

In summary, the conversation discussed the output of a Mathematica code that was expected to give a value of 1, but instead gave a sinusoidal output. The addition theorems for Jacobi elliptic functions were mentioned, and it was noted that the functions appeared to be 1 when plotted separately. However, it was clarified that the second argument in JacobiSN and JacobiDN is m, not k, and a link was provided for further clarification on the nomenclature.
  • #1
member 428835
Can anyone confirm if the following in Mathematica gives an output that is not 1? I'm getting some sort of sinusoid, but I should get 1.

Code:
k = 2;
Plot[k^2 JacobiSN[t, k]^2 + JacobiDN[t, k]^2, {t, 0, 10}]

Thanks!
 
Physics news on Phys.org
  • #2
joshmccraney said:
Can anyone confirm if the following in Mathematica gives an output that is not 1? I'm getting some sort of sinusoid, but I should get 1.

Code:
k = 2;
Plot[k^2 JacobiSN[t, k]^2 + JacobiDN[t, k]^2, {t, 0, 10}]

Thanks!
Yes, that oscillates between 1 and 2 (Mathematica 12.0.0.0).
 
  • #3
  • #4
I don't know if this helps, but

Code:
Plot[2 JacobiSN[t, k]^2 + JacobiDN[t, k]^2, {t, 0, 10}]

does appear to be 1 for all values of t while 4 JacobiSN[t, k]^2 + JacobiDN[t, k]^2 is not.

I noticed that by plotting the two functions separately and guessing the needed scale factor.
 
  • #5
Bill Simpson said:
I don't know if this helps, but

Code:
Plot[2 JacobiSN[t, k]^2 + JacobiDN[t, k]^2, {t, 0, 10}]

does appear to be 1 for all values of t while 4 JacobiSN[t, k]^2 + JacobiDN[t, k]^2 is not.

I noticed that by plotting the two functions separately and guessing the needed scale factor.
Do you mean ##k^2## instead of 4?
 

1. How do I plot k^2 in Mathematica?

To plot k^2 in Mathematica, you can use the Plot function and specify k^2 as the input expression. For example: Plot[k^2, {k, 0, 10}] will plot the function from k = 0 to k = 10.

2. Why is the output not 1 when plotting k^2 in Mathematica?

The output of k^2 in Mathematica will not always be 1 because it depends on the value of k. When plotting the function, the output will be the squared value of k for each input value of k.

3. How can I change the range of the plot when plotting k^2 in Mathematica?

You can specify the range of the plot by changing the values in the Plot function. For example: Plot[k^2, {k, 0, 100}] will plot the function from k = 0 to k = 100.

4. Can I add labels and titles to the plot when plotting k^2 in Mathematica?

Yes, you can add labels and titles to the plot by using the PlotLabel and AxesLabel options in the Plot function. For example: Plot[k^2, {k, 0, 10}, PlotLabel -> "Plot of k^2", AxesLabel -> {"k", "k^2"}]

5. Is there a way to change the style of the plot when plotting k^2 in Mathematica?

Yes, you can change the style of the plot by using the PlotStyle option in the Plot function. This allows you to change the color, thickness, and other visual aspects of the plot. For example: Plot[k^2, {k, 0, 10}, PlotStyle -> {Red, Dashed, Thick}] will plot the function in a red, dashed, and thick line.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
200
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
4
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
5
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
801
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
155
Back
Top