用Octave计算不定式极限(7)
广告
{{v.name}}
其他不定式(4) \( 0 ^0 \)型
计算\( \displaystyle\lim_{x \to 0^+ } x^x \)
程序代码如下
function [text_result, numeric_result] = func13(x_value)
pkg load symbolic;
x = sym('x');
question = power(x, x);
lim = limit(question, x, x_value);
text_result = ["\n", disp(lim)];
numeric_result = eval(lim);
endfunction
令\(x \to 0^+ \),计算结果如下
>> [text_result, numeric_result] = func13(eps)
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
func13 at line 5 column 9
text_result =
1125899906842611
────────────────
1125899906842624
2
─────────────────
2
numeric_result = 1.0000