Professional Documents
Culture Documents
0.5
Out[4]=
1 2 3 4 5 6
-0.5
-1.0
0.5
Out[5]=
1 2 3 4 5 6
-0.5
-1.0
0.5
Out[6]=
1 2 3 4 5 6
-0.5
-1.0
2
2.5
Out[7]= 2.0
1.5
2.5
Out[8]= 2.0
1.5
2.5
Out[9]= 2.0
1.5
In[15]:= Manipulate [Plot [2 (x - 4) ^ 2 + 1, {x, 3, 5}, PlotStyle → Lighter [Red, a]], {a, 0, 1}]
3.0
2.5
Out[15]=
2.0
1.5
2.5
Out[19]= 2.0
1.5
2.5
Out[22]= 2.0
1.5
2.5
Out[23]= 2.0
1.5
2.5
Out[24]= 2.0
1.5
Question: 1. Plot the function f(x) = log(x) in [2,10] with axis origin (0,0) with aspect ratio 2 and 0⩽ f(x) ≤
2.
Question:2 Plot the function g(x) = Cos(2*x) in [0, Pi] with -1⩽ g(x) ≤ 1 having green color. Use mesh
points on graph as well.
Question: 3 Manipulate the plot the function h(x) = e^x in [0,a], use mixture of red and blue color where
1 ≤ a ≤ 3.
5
In[25]:= Plot [Log [x], {x, 2, 10 }, AxesOrigin → {0, 0}, AspectRatio → 2, PlotRange → {0, 2}]
2.0
1.5
Out[25]= 1.0
0.5
0 2 4 6 8 10
In[27]:= Plot [Cos [2 * x], {x, 0, Pi }, PlotRange → {- 1, 1}, PlotStyle → Green , Mesh → Full ]
1.0
0.5
Out[27]=
0.5 1.0 1.5 2.0 2.5 3.0
-0.5
-1.0
6
In[28]:= Manipulate [Plot [Exp [x], {x, 0, a}, PlotStyle → Blend [{Red, Blue }, .3 ]], {a, 1, 3}]
20
15
Out[28]=
10
2.5
Out[32]= 2.0
1.5
2.5
Out[33]= 2.0
1.5
2.5
Out[34]= 2.0
1.5
2.5
Out[37]= 2.0
1.5
2.5
Out[43]= 2.0
1.5
Out[44]=
2.5
2.0
Out[45]=
1.5
1.0
2.5
Out[48]= 2.0
1.5
In[53]:= Plot [2 (x - 4) ^ 2 - 21, {x, - 5, 5}, AxesStyle → Arrowheads [{- .05, .05 }], AxesOrigin → {0, 0}]
100
Out[53]=
50
-4 -2 2 4
0.5
Out[54]=
1 2 3 4 5 6
-0.5
-1.0
1.0
0.5
Out[57]=
1 2 3 4 5 6
-0.5
-1.0
10
In[61]:= Plot [Sin [x], {x, 0, 2 * Pi }, GridLines → {{Pi / 2, Pi, 3 * Pi / 2, 2 * Pi }, {- 1, - .5, 0, .5, 1}},
GridLinesStyle → Directive [Thin, Red, Dashed ]]
1.0
0.5
Out[61]=
1 2 3 4 5 6
-0.5
-1.0
In[64]:= Plot [Sin [x], {x, 0, 2 * Pi }, GridLines → {Range [0, 2 * Pi, Pi / 4], Range [- 1, 1, .5 ]},
GridLinesStyle → Directive [Thin, Red, Dashed ]]
1.0
0.5
Out[64]=
1 2 3 4 5 6
-0.5
-1.0