Plotting arbitrary constants in mathematica

Click For Summary

Discussion Overview

The discussion centers on how to plot functions involving arbitrary constants in Mathematica, specifically using the example of the function r(psi) = a(1 - eCos(psi). The scope includes technical explanations and practical applications of plotting in Mathematica.

Discussion Character

  • Technical explanation, Experimental/applied

Main Points Raised

  • One participant asks how to plot a function with arbitrary constants in Mathematica.
  • Another participant suggests that plotting a function with arbitrary constants directly is not feasible, but proposes using Manipulate to vary the constants while plotting.
  • A third participant introduces the idea of defining dimensionless variables to absorb some constants, noting that while 'a' can be treated as a scale, 'e' is dimensionless and cannot be absorbed in the same way.
  • The third participant provides an example of using Manipulate with a dimensionless variable to plot the function.

Areas of Agreement / Disagreement

Participants do not reach a consensus on the feasibility of plotting functions with arbitrary constants directly, with differing views on the use of Manipulate and dimensionless variables.

Contextual Notes

There are limitations regarding the treatment of constants and the definitions of dimensionless variables that are not fully resolved in the discussion.

kraigandrews
Messages
105
Reaction score
0
How do you plot arbitrary constants in mathematica? for example r(psi)=a(1-eCos(psi)), where a and e are some constant.

Thanks in advance for the help.
 
Physics news on Phys.org
Well, you cannot plot a function with arbitrary constants. Where would the computer draw the line? However, what you can do is do a Plot inside a Manipulate, like this:

Manipulate[Plot[a (1 - e Cos[psi]), {psi, -1, 1}], {{a, 1}, -2, 2}, {{e, 1}, -2, 2}]
 
OK thanks.
 
Some constants can be absorbed into variables by defining dimensionless variables.
This basically treats the constant as the "natural scale" for that dimension.

In your example, you can define the dimensionless, s = r/a
But e is dimensionless and can't really be absorbed anywhere.

So

Manipulate[ Plot[ 1 - e Cos[psi], {psi, -1, 1}, AxesLabel->{"psi","s=r/a"}], {{e,1}, -2, 2}]
 

Similar threads

  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 4 ·
Replies
4
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K