用Octave判断间断点的分类(3)
广告
{{v.name}}
(3)第二类间断点
讨论\( f(x)={\rm e}^\frac{x}{ {\rm tan}x } \)的间断点及类型.
程序代码如下
function [text_result, numeric_result] = func17(x_value)
pkg load symbolic;
x = sym('x');
question = exp(x / tan(x));
if (((mod(x_value, pi) == 0) || (mod(x_value, pi) == 0.5 * pi)) && (x_value != 0))
error('Invalid input value.')
endif
lim = limit(question, x, x_value);
text_result = ["\n", disp(lim)];
numeric_result = eval(lim);
endfunction
当\(x = k\pi \)及\(x = k\pi + \frac{\pi}{2}(k \in \mathbf{Z} ) \)时,\( f(x) \)间断.
令\(x \to 0 \),计算结果如下
>> [text_result, numeric_result] = func17(0)
text_result =
ℯ
numeric_result = 2.7183
因为\( \displaystyle\lim_{x \to 0 } f(x)=e \),所以\( x=0 \)为\( f(x) \)的可去间断点.
令\(x \to k\pi + \frac{\pi}{2} (x = \frac{\pi}{2} + 0.01, x = \frac{\pi}{2} - 0.01)\),计算结果如下
>> [text_result, numeric_result] = func17(pi/2 + 0.01)
warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from
double_to_sym_heuristic at line 50 column 7
sym at line 384 column 13
limit at line 92 column 5
func17 at line 8 column 9
text_result =
-1976⋅π
──────────────
⎛25⋅π⎞
3927⋅cot⎜────⎟
⎝7854⎠
ℯ
numeric_result = 0.9843
>> [text_result, numeric_result] = func17(pi/2 - 0.01)
warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from
double_to_sym_heuristic at line 50 column 7
sym at line 384 column 13
limit at line 92 column 5
func17 at line 8 column 9
text_result =
1951⋅π
────────────────
⎛1951⋅π⎞
3927⋅tan⎜──────⎟
⎝ 3927 ⎠
ℯ
numeric_result = 1.0157
因为\( \displaystyle\lim_{x \to k\pi + \frac{\pi}{2} } f(x)=1 \)
,所以\(x = k\pi + \frac{\pi}{2}(k \in \mathbf{Z} ) \)为\( f(x) \)的可去间断点.
令\(x \to k\pi (k \ne 0) (x = \pi + 0.01, x = \pi - 0.01)\),计算结果如下
>> [text_result, numeric_result] = func17(pi + 0.01)
warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from
double_to_sym_heuristic at line 50 column 7
sym at line 384 column 13
limit at line 92 column 5
func17 at line 8 column 9
text_result =
1891⋅π
──────────────
⎛6⋅π ⎞
1885⋅tan⎜────⎟
⎝1885⎠
ℯ
numeric_result = 7.4230e+136
>> [text_result, numeric_result] = func17(pi - 0.01)
warning: passing floating-point values to sym is dangerous, see "help sym"
warning: called from
double_to_sym_heuristic at line 50 column 7
sym at line 384 column 13
limit at line 92 column 5
func17 at line 8 column 9
text_result =
5997
──────────────
⎛5997⎞
1915⋅tan⎜────⎟
⎝1915⎠
ℯ
numeric_result = 1.0016e-136
因为\( \displaystyle\lim_{x \to k\pi \atop
k \ne 0 } f(x) \)的左右极限有一个不存在(有一个为无穷)
,所以\(x = k\pi(k \in \mathbf{Z} ) \)且\(k \ne 0 \)为\( f(x) \)的第二类间断点.