Plotting 2(or more) functions at once

In summary, the conversation discusses how to plot two functions at once in Mathematica and specifically mentions wanting to plot the y-t graph of a bouncing ball by combining equations of motion. The solution is to use the Show function with two separate plots.
  • #1
karkas
132
1
Hey all, I want to ask a simple question that I can't seem to get answered myself. How is it possible to get Mathematica to plot 2 functions at once? As in, I want to have x^2 {x,0,1} and x^3 {x,1,2} in the same plot graph.

More specifically, what I'm trying to do is plot the y-t graph of a ball bouncing on the ground, and I'm thinking of doing so by combining the equations of motion for every discrete stage of the bouncing.

Any help is greatly appreciated.
 
Physics news on Phys.org
  • #2
g1 = Plot[x^2, {x, 0, 1}];
g2 = Plot[x^3, {x, 1, 2}];
Show[g1, g2]

If it isn't clear whether it is working then substitute x^3-1 for a moment
 
  • #3
Bill Simpson said:
g1 = Plot[x^2, {x, 0, 1}];
g2 = Plot[x^3, {x, 1, 2}];
Show[g1, g2]

If it isn't clear whether it is working then substitute x^3-1 for a moment

Thanks a huge ton. It was clear as hell, didn't think of that.
 

1. How can I plot multiple functions on one graph using a scientific calculator?

To plot multiple functions on one graph using a scientific calculator, you will need to use the graphing function. Simply input each function into the calculator and press the graph button to display all of the functions on the same graph.

2. Can I plot two functions with different variables on the same graph?

Yes, you can plot two functions with different variables on the same graph. You will need to use a variable for each function and make sure they are labeled correctly on the graph.

3. How do I adjust the scale of the axes when plotting multiple functions?

To adjust the scale of the axes when plotting multiple functions, you can use the zoom or scale function on your graphing calculator. This will allow you to increase or decrease the range of values shown on the axes.

4. Is it possible to plot more than two functions on one graph?

Yes, it is possible to plot more than two functions on one graph. Most scientific calculators have the capability to plot multiple functions at once, so you can plot as many functions as your calculator allows.

5. Can I change the color or style of each function when plotting multiple functions?

Many scientific calculators allow you to change the color or style of each function when plotting multiple functions. Check your calculator's manual to see if this feature is available and how to access it.

Similar threads

  • MATLAB, Maple, Mathematica, LaTeX
Replies
2
Views
843
  • MATLAB, Maple, Mathematica, LaTeX
Replies
3
Views
2K
  • General Discussion
Replies
2
Views
396
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
8
Views
1K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
1
Views
3K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
10
Views
2K
  • MATLAB, Maple, Mathematica, LaTeX
Replies
14
Views
2K
  • Programming and Computer Science
Replies
2
Views
1K
Back
Top