I dont understand this, can someone explain how to do it?
Show older comments
Numerically investigating a limit at a point c which is not zero requires us to use points which get close to c. A simple trick allows us to reuse our points which get close to 0. For instance if
>> x = [.1 .01 .001 .0001 .00001]; % and
>> c = pi/2;
Then we can make points getting close to c from above and below as follows:
>> x1 = c + x; % points above c
>> x2 = c - x; % points below c
Use this to investigate
lim (pi/2 -2) tanx
x arrow pi/2
What value for the limit do you get?
5 Comments
Dunya Jadallah
on 4 Oct 2023
James Tursa
on 4 Oct 2023
Can you post an image of the actual assignment? So we can ensure that your question copy above is correct? I'm trying to figure out what the point of the (pi/2-2) is in the context of the problem.
David Goodmanson
on 4 Oct 2023
Edited: David Goodmanson
on 4 Oct 2023
I think what is meant is (pi/2-x) *tan(x), and Dunya should be able to work out the limit.
i didnt,
Then do it:
x = [.1 .01 .001 .0001 .00001]; % and
c = pi/2;
x1 = c + x; % points above c
x2 = c - x; % points below c
y1 = (pi/2-2)*tan(x1)
y2 = (pi/2-2)*tan(x2)
%or
y1 = (pi/2-x1).*tan(x1)
y2 = (pi/2-x2).*tan(x2)
Answers (1)
This is not a solution, but plotting the function
helps you understand its behavior. From the graph, you can see that the function is periodic and discontinuous at odd multiples of
. Does the limit exist?
helps you understand its behavior. From the graph, you can see that the function is periodic and discontinuous at odd multiples of figure(1)
fplot(@(x) (pi/2 -2)*tan(x), [-2*pi 2*pi])
title({'$f(x) = \left(\frac{\pi}{2} - 2\right) \tan(x)$'}, 'interpreter', 'latex', FontSize=14)
xlabel('x')
However, many of us believed that there is a typo in the provided function, and that
should be
. From the graph, you can clearly see that the function is apparently 'smooth' at
, despite knowing that tangent is a discontinuous function. Therefore, it is implied that a limit exists at
for the function
.
should be
. From the graph, you can clearly see that the function is apparently 'smooth' at
.figure(2)
fplot(@(x) (pi/2 -x).*tan(x), [-2*pi 2*pi])
title({'$f(x) = \left(\frac{\pi}{2} - x\right) \tan(x)$'}, 'interpreter', 'latex', FontSize=14)
xlabel('x')
1 Comment
Now, you can use the limit() command from Symbolic Math Toolbox to calculate the limit of the function

syms x
f = (pi/2 - x)*tan(x);
limit(f, x, pi/2)
More examples can be found at these links:
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
