I dont understand this, can someone explain how to do it?

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

Did you try the method suggested, namely to compute (pi/2-2)*tan(x1) and (pi/2-2)*tan(x2) ?
@Torsten i didnt, but how would you do so, is there a way to show step by step how to do this problem.
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.
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)
y1 = 1×5
1.0e+04 * 0.0004 0.0043 0.0429 0.4292 4.2920
y2 = (pi/2-2)*tan(x2)
y2 = 1×5
1.0e+04 * -0.0004 -0.0043 -0.0429 -0.4292 -4.2920
%or
y1 = (pi/2-x1).*tan(x1)
y1 = 1×5
0.9967 1.0000 1.0000 1.0000 1.0000
y2 = (pi/2-x2).*tan(x2)
y2 = 1×5
0.9967 1.0000 1.0000 1.0000 1.0000

Sign in to comment.

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?
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 .
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)
ans = 
1
More examples can be found at these links:

Sign in to comment.

Tags

Asked:

on 3 Oct 2023

Commented:

on 4 Oct 2023

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!