Assignment-2
Name - Ravi Ranjan Kumar
Q1. (a). Construct a table of values of function f(x) = (x^2+x+2)/(x+1) when x is sufficiently close to 1.
Evaluate the limit of f(x) as x approaches to 1.Sketch the graph of functions together with the
point(1,2) and draw the lines between the point (1,0),(1,2) and (0,2).
In[54]:= Table[{x, (x ^ 2 + x + 2) / (x + 1)}, {x, 0.9, 1.1, 0.01}] // TableForm
Out[54]//TableForm=
0.9 1.95263
0.91 1.95712
0.92 1.96167
0.93 1.96627
0.94 1.97093
0.95 1.97564
0.96 1.98041
0.97 1.98523
0.98 1.9901
0.99 1.99503
1. 2.
1.01 2.00502
1.02 2.0101
1.03 2.01522
1.04 2.02039
1.05 2.02561
1.06 2.03087
1.07 2.03618
1.08 2.04154
1.09 2.04694
1.1 2.05238
In[55]:=
In[56]:= Limit[(x ^ 2 + x + 2) / (x + 1), x → 1]
Out[56]=
Observation:
The function approaches 2 as x gets closer to 1.This behavior indicates that the function is continu-
ous at x=1, and its limit at this point is well defined.
2
In[57]:= ShowPlot(x ^ 2 + x + 2) / (x + 1), {x, - 2, 2}, PlotRange → {{- 1.5, 1.5}, {- 1, 5}},
PlotStyle → Blue, Thick[0.5], PlotLabel → "Graph of f(x) with points and line",
GraphicsRed, PointSize[Large], Point[{1, 2}], GraphicsBlack, Line[{{1, 0}, {1, 2}, {0, 2}}]
Out[57]=
Graph of f(x) with points and line
5
-1.5 -1.0 -0.5 0.5 1.0 1.5
-1
Observations:
1. The function f(x) is continuous and smooth near x=1,passing through point (1,2).
2. Line between point (1,2) and (0,2) form a horizontal segment on the graph.
Q.1(b). Construct a table of values of function f(x)=5x-3 when x is sufficiently close to 2. Evaluate the
limit of the function together with a limiting point.
3
In[58]:= Tablex, 5 x - 3, {x, 1.9, 2.1, 0.01} // TableForm
Out[58]//TableForm=
1.9 6.5
1.91 6.55
1.92 6.6
1.93 6.65
1.94 6.7
1.95 6.75
1.96 6.8
1.97 6.85
1.98 6.9
1.99 6.95
2. 7.
2.01 7.05
2.02 7.1
2.03 7.15
2.04 7.2
2.05 7.25
2.06 7.3
2.07 7.35
2.08 7.4
2.09 7.45
2.1 7.5
Observations:
The table displays x-values close to 2 and their corresponding f(x) values,the values of f(x ) approach
close to limit. This verifies the continuity of the function at x=2.
In[59]:= Limit5 x - 3, x → 2
Out[59]=
7
Observations:
Since f(x) is a linear function ,the limit exists and is simply the value of f(x) at x=2. This should return
f(x)=2.
4
In[60]:= ShowPlot5 x - 3, {x, - 10, 10}, PlotRange → All,
PlotStyle → Green, PlotLabel → "Graph of f(x) with limiting point",
GraphicsRed, PointSize[Large], Point[{2, 7}]
Out[60]=
Graph of f(x) with limiting point
40
20
-10 -5 5 10
-20
-40
Observations:
The graph of the function is a straight line since it is a linear function. The point (2,7) is clearly
marked , showing the limiting behavior as x->2.
Q 2. Use table/limit command to find the limit of following functions. Verify your answers by plotting
the graph of the function in the neighbourhood of limit point.
(a). Cos(1/x) as x approaches 0
In[61]:= Limit[Cos[1 / x], x → 0]
Out[61]=
Indeterminate
In[62]:=
Observations:
The limit is indeterminate due to oscillatory nature of Cos(1/x) as x approaches to 0.
5
In[63]:= Plot[Cos[1 / x], {x, - 0.1, 0.1}]
Out[63]=
1.0
0.5
-0.10 -0.05 0.05 0.10
-0.5
-1.0
Observations:
This plot shows that the function oscillates infinitely as x approaches 0.
Q. 2. (b) Sin x/x as x approaches infinity
In[64]:= LimitSin[x] x, x → Infinity
Out[64]=
0
In[65]:=
Observations:
The limit will be 0.
In[66]:= PlotSin[x] x, {x, 1, 100}
Out[66]=
0.05
20 40 60 80 100
-0.05
Observations:
The plot shows that function approaches 0 as x tends to infinity
Q 3. Draw the asymptotes of the following functions if any:
6
a. f(x)=(2x^2+x+5)/(x+1)
In[67]:= ResourceFunction["Asymptotes"]2 x ^ 2 + x + 5 (x + 1), x, y
Out[67]=
Vertical → {{y → ± ∞, x → - 1}}, Oblique → y → - 1 + 2 x, x → ± ∞
In[68]:= Plot2 x ^ 2 + x + 5 (x + 1), 2 x - 1, {x, - 10, 10}, PlotRange → {- 50, 50},
PlotStyle → {{Blue}, {Red, Dashed}}, ExclusionsStyle → Red, Dashed, Thick
Out[68]=
40
20
-10 -5 5 10
-20
-40
Observations:-
1.Vertical Asymptotes:- The vertical asymptote is at x = -1,since the denominator became zero at this
point.
2. Horizontal Asymptotes:- Not applicable
3. Oblique Asymptotes:- y=2x-1
b. (2x^1/2)/(2x+1)
In[69]:= ResourceFunction["Asymptotes"]2 x ^ 1 / 2 2 x + 1, x, y
Out[69]=
1 1
Horizontal → y → ,x→ ± ∞, Vertical → y → ± ∞, x→ -
2 2
7
In[70]:= Plot2 x ^ 1 / 2 2 x + 1, 1 / 2, {x, - 10, 10}, PlotRange → {- 10, 10},
PlotStyle → {{Blue}, {Red, Dashed}}, ExclusionsStyle → Red, Dashed, Thick
Out[70]=
10
-10 -5 5 10
-5
-10
Observations:-
1. Horizontal Asymptotes:-y=1/2
2. Vertical Asymptotes:- x=-1/2
3. Oblique Asymptotes:- Not applicable
c. f(x) = (3x^2-2x)/(9x^3+1)
In[71]:= ResourceFunction["Asymptotes"]3 x ^ 2 - 2 x 9 x ^ 3 + 1, x, y
Out[71]=
1
Horizontal → {{y → 0, x → ± ∞}}, Vertical → y → ± ∞, x→ -
32/3
In[72]:= Plot3 x ^ 2 - 2 x 9 x ^ 3 + 1, 0, {x, - 10, 10}, PlotRange → {- 5, 5},
PlotStyle → {{Blue}, {Red, Dashed}}, ExclusionsStyle → Red, Dashed, Thick
Out[72]=
-10 -5 5 10
-2
-4
Observations:-
1. Horizontal Asymptotes:-y=0
8
2. Vertical Asymptotes:- x = -1/3^2/3
3. Oblique Asymptotes:- Not Applicable
d. f(x) = (x^2+1)/(x-1)
In[73]:= ResourceFunction["Asymptotes"][(x ^ 2 + 1) / (x - 1), x, y]
Out[73]=
Vertical → {{y → ± ∞, x → 1}}, Oblique → {{y → 1 + x, x → ± ∞}}
In[74]:= Plot{(x ^ 2 + 1) / (x - 1), x + 1}, {x, - 10, 10}, PlotRange → {- 20, 20},
PlotStyle → {{Blue}, {Red, Dashed}}, ExclusionsStyle → Red, Dashed, Thick
Out[74]=
20
10
-10 -5 5 10
-10
-20
Observations:-
1. Horizontal Asymptotes: - Not applicable
2. Vertical Asymptotes:- x=1
3. Oblique asymptotes:- y=x+1
e. f(x)= (5x^3+2x^2+3)/x^2
In[75]:= ResourceFunction["Asymptotes"]5 x ^ 3 + 2 x ^ 2 + 3 x ^ 2, x, y
Out[75]=
Vertical → {{y → ∞, x → 0}}, Oblique → y → 2 + 5 x, x → ± ∞
9
In[76]:= Plot5 x ^ 3 + 2 x ^ 2 + 3 (x ^ 2), 5 x + 2, {x, - 10, 10}, PlotRange → {- 100, 100},
PlotStyle → {{Blue}, {Red, Dashed}}, ExclusionsStyle → Red, Dashed, Thick
Out[76]=
100
50
-10 -5 5 10
-50
-100
Observations:-
1. Horizontal Asymptotes:- Not applicable
2. Vertical Asymptotes:- x=0
3. Oblique Asymptotes:- y=5x+2
f. f(x)= tan(x)
In[77]:= ResourceFunction["Asymptotes"][Tan[x], x, y]
Out[77]=
π π π
Vertical → y → ± ∞, x→ - + 2 π 1 , y → ± ∞, x→ + 2 π 1 , y → ± ∞, x→ + π 1
2 2 2
In[78]:= Plot{Tan[x]}, {x, - 20, 20}, PlotRange → {- 100, 100},
PlotStyle → {{Blue}, {Red, Dashed}}, ExclusionsStyle → Red, Dashed, Thick
Out[78]=
100
50
-20 -10 10 20
-50
-100
Observations:-
1. Horizontal Asymptotes:- Not applicable
10
2. Vertical Asymptotes:- x = -π/2+2π c1, π/2 +2π c1, π/2+π c1
3. Oblique Asymptotes:- Not applicable
g. f(x) = (x-1)/(x^2+1)
In[79]:= ResourceFunction["Asymptotes"][(x - 1) / (x ^ 2 + 1), x, y]
Out[79]=
Horizontal → {{y → 0, x → ± ∞}}
In[80]:= Plot{(x - 1) / (x ^ 2 + 1), 0}, {x, - 5, 5}, PlotRange → {- 5, 5},
PlotStyle → {{Blue}, {Red, Dashed}}, ExclusionsStyle → Red, Dashed, Thick
Out[80]=
-4 -2 2 4
-2
-4
Observations:-
1. Horizontal Asymptotes:- y = 0
2. Vertical Asymptotes:- Not applicable.
3. Oblique Asymptotes:- Not applicable.