Plotting
graphs
, lOMoARcPSD|58847208
Plotting Graphs in Mathematica
Method 1
◼ Example 1(Plot the graph of x2 in Mathematica)
Plotx2,{x,-2,2}
4
3
2
1
-2 -1 1 2
◼ Example 2(Plot the graph of x2- 3 X+ 1 in Mathematica)
Plot[x^2-3x+1,{x,-2,5}]
10
8
6
4
2
-2 -1 1 2 3 4 5
◼ Example 3
Plot[Cos[3x],{x,-4,4}]
, lOMoARcPSD|58847208
2 2-D Plotting graphs
1.0
0.5
-4 -2 2 4
-0.5
-1.0
◼ Example 4 (Graph of two functions on same set of axes)
Plotx2,x,{x,-2,2}
4
3
2
1
-2 -1 1 2
-1
-2
◼ Example 5
Plot[{x^2-3x+1,Cos[x]},{x,-3,6}]