使用计算机求函数极限示例 |
您所在的位置:网站首页 › 如何求极限值 › 使用计算机求函数极限示例 |
问题
求值: lim x → ∞ 4 x 2 + x − 4 x 2 \lim_{x \rightarrow \infty} \sqrt{4x^2 + x} - \sqrt{4x^2} x→∞lim4x2+x −4x2 数学方法上下同乘以 4 x 2 − x + 4 x 2 \sqrt{4x^2 - x} + \sqrt{4x^2} 4x2−x +4x2 得: lim x → ∞ ( 4 x 2 + x − 4 x 2 ) ( 4 x 2 − x + 4 x 2 ) 4 x 2 + x + 4 x 2 \lim_{x \rightarrow \infty} \frac{(\sqrt{4x^2 + x} - \sqrt{4x^2})( \sqrt{4x^2 - x} + \sqrt{4x^2})}{\sqrt{4x^2 + x} + \sqrt{4x^2}} x→∞lim4x2+x +4x2 (4x2+x −4x2 )(4x2−x +4x2 ) = lim x → ∞ 4 x 2 + x − 4 x 2 4 x 2 − x + 4 x 2 =\lim_{x \rightarrow \infty} \frac{4x^2 + x - {4x^2}}{\sqrt{4x^2 - x} + \sqrt{4x^2}} =x→∞lim4x2−x +4x2 4x2+x−4x2 = lim x → ∞ x 4 x 2 + x + 4 x 2 =\lim_{x \rightarrow \infty} \frac{x}{\sqrt{4x^2 + x} + \sqrt{4x^2}} =x→∞lim4x2+x +4x2 x 由于 x x x 不为 0,所以上下同时除以 x x x 可得: lim x → ∞ ∣ x ∣ x 4 \lim_{x \rightarrow \infty} \frac{\frac{|x|}{x}}{4} x→∞lim4x∣x∣ 根据 x x x 的正负属性可得: 当 x → + ∞ x \rightarrow +\infty x→+∞ 时,原式 = 1 4 =\frac{1}{4} =41;当 x → − ∞ x \rightarrow -\infty x→−∞ 时,原式 = − 1 4 =-\frac{1}{4} =−41;完成。 计算机方法在以下代码中 class Test1 { public static void main(String[] args) { double x = 1; for (int i = 0; i return Math.sqrt(4 * x * x + x) - 2 * x; } }我们首先定义了一个函数 fun(x) 用于求 4 x 2 + x − 4 x 2 \sqrt{4x^2 + x} - \sqrt{4x^2} 4x2+x −4x2 ,然后在主函数中,分别求x=1,10,…,1E7的情况,结果如下所示。 x = 1, fun(x) = 0.236067977500. x = 10, fun(x) = 0.248456731317. x = 100, fun(x) = 0.249843945008. x = 1000, fun(x) = 0.249984376953. x = 10000, fun(x) = 0.249998437521. x = 100000, fun(x) = 0.249999843742. x = 1000000, fun(x) = 0.249999984400. x = 10000000, fun(x) = 0.250000000000.当 x x x 的初始值取 − 1 -1 −1 时,结果为: x = -1, fun(x) = -0.267949192431. x = -10, fun(x) = -0.251582341869. x = -100, fun(x) = -0.250156445618. x = -1000, fun(x) = -0.250015626953. x = -10000, fun(x) = -0.250001562519. x = -100000, fun(x) = -0.250000156258. x = -1000000, fun(x) = -0.250000015600. x = -10000000, fun(x) = -0.250000000000.完毕。 |
今日新闻 |
推荐新闻 |
CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3 |