Mathematica How to Graph Functions with Respect to Constants in Mathematica?

AI Thread Summary
Graphing functions in Mathematica with respect to a constant, rather than a specific real number, is possible. Users can plot a function like y = ax for various values of the constant 'a' by utilizing the Table function within the Plot command. For example, the expression Plot[Table[a x, {a, 1, 10}], {x, -2, 2}] allows for the visualization of the function across a range of 'a' values, effectively displaying multiple lines on the graph. This method eliminates the need to specify a definite value for the constant, enabling a more dynamic representation of the function.
Nabeshin
Science Advisor
Messages
2,207
Reaction score
16
Hey, I was wondering if any of you know if it's possible to graph functions in mathematica with respect to a constant instead of a real number.

For example, plot the function ax from 1 to 10.

Is there any way to get it to plot this and just realize it needs to throw a's on the vertical axis, or do I always have to specify a definite value of the constant?
 
Physics news on Phys.org
Do you mean you want to plot y = a x for several values of a, like so:
Code:
Plot[Table[a x, {a, 1, 10}], {x, -2, 2}]
 

Similar threads

Replies
3
Views
2K
Replies
1
Views
3K
Replies
2
Views
2K
Replies
1
Views
4K
Replies
14
Views
2K
Replies
4
Views
2K
Replies
1
Views
5K
Replies
1
Views
3K
Replies
7
Views
5K
Back
Top