用Java学高数:函数极限与连续(一)
发布日期:2021-06-29 15:03:59
浏览次数:3
分类:技术文章
本文共 6184 字,大约阅读时间需要 20 分钟。
1、第一道题
对应的Java代码public class MyMath { public static void main(String[] args) { System.out.println(f(-1)); System.out.println(f(0)); System.out.println(f(1)); System.out.println(f(3)); } public static double f(double x){ double y = (x * Math.sin(x - 3))/((x-1) * Math.pow((x - 3),2) ); return y; }}答案选择A
2、第二道题
Java代码 A选项:package com.itzheng1.test3;public class MyMath { public static void main(String[] args) { double a = 0; while (a <= Math.PI){ System.out.println(A(a)); a = a+0.1; } } public static double A(double x){ double y = Math.sin(x) / x; return y; }}
x从0 到π值从1越来越接近0所以A是错误的
B选项package com.itzheng1.test3;public class MyMath { public static void main(String[] args) { double a = 0; while (a <= 10){ System.out.println(B(a)); a = a+0.1; } } public static double B(double x){ double y = x * Math.sin(1/x); return y; }}
x从0到10,其结果的值逐渐趋向于1正确答案选择B
C选项package com.itzheng1.test3;public class MyMath { public static void main(String[] args) { double a = 0; while (a <= 10){ System.out.println(B(a)); a = a+0.1; } } public static double B(double x){ double y = (1/x) * Math.sin(1/x); return y; }}
x从0到10其值越来越趋向于0
D选项package com.itzheng1.test3;public class MyMath { public static void main(String[] args) { double a = 0; while (a <= 10){ System.out.println(B(a)); a = a+0.1; } } public static double B(double x){ double y = Math.sin(x) / x; return y; }}
的值越来越趋向于0
数学解析,正确答案选择B3、第三道题
package com.itzheng1.test3;public class MyMath { public static void main(String[] args) { double a =10; while (a >= 1){ System.out.println(B(a)); a = a-0.1; } } public static double B(double x){ double y = 2 * Math.pow(Math.E,1/(x-1)); return y; }}
当x为10趋向于1的时候其值不断的增大直到无穷
当x从-10到1的时候package com.itzheng1.test3;public class MyMath { public static void main(String[] args) { double a =-10; while (a < 1){ System.out.println(B(a)); a = a+0.1; } } public static double B(double x){ double y = 2 * Math.pow(Math.E,1/(x-1)); return y; }}
其值不断趋向于0
总结上述只有一个极限达到无穷,另外一个没有达到无穷因此答案选择D4、第四道题
5、第五道题
Java代码:package com.itzheng1.test3;public class MyMath2 { public static void main(String[] args) { double x = 0; while (x < 20){ System.out.println(f(x)); x = x + 0.1; } } public static double f(double x){ return Math.pow(((x + 2)/(x - 1)),x); }}
运行结果接近E三次方
6、第六道题
package com.itzheng1.test3;public class MyMath2 { public static void main(String[] args) { double a = 0; while ( a < 100){ System.out.println(f3(a)); a = a + 0.1; } } public static double f1(double x){ return x - 2; } public static double f2(double x){ return (x * x) + 2 * x + 1; } public static double f3(double x){ return (f2(f1(x)) / (x * x)); }}
运行结果接近1
7、第七道题
Java代码package com.itzheng1.test3;public class MyMath3 { public static void main(String[] args) { double x = 10; while (x > 0){ System.out.println(f1(x)); x = x - 0.001; } } public static double f1(double x){ double y = 1 - Math.pow(Math.E,Math.tan(x))/Math.asin(x/2); return y; }}
当x从10 到0的时候其值越来越接近-2所以a=-2
f(0)=a8、第八道题
Java程序package com.itzheng1.test3;public class MyMath3 { public static void main(String[] args) { double x = 10; while (x > 0){ System.out.println(f(x)); x = x - 0.01; } } public static double f(double x){ double y = (2 * ( Math.pow(Math.E,(-1/x)) )) / ( (Math.pow(Math.E,(2/x)) - (Math.pow(Math.E,(-1/x))) ) ) ; return y; }}
运行结果接近0
9、第九道题
Java代码package com.itzheng1.test3;public class MyMath3 { public static void main(String[] args) { double x = 10; while (x > 0){ System.out.println(f(x)); x = x - 0.01; } } public static double f(double x){ double y = ( ( Math.sin(x) + x*x * Math.sin(1/x) ) / (2 + x * x) * Math.log(1+x) ); return y; }}
运行结果接近1/2
10、第十道题
11、第十一道题
x=1 x= - 1 x = 0
分别为x趋近于 1x 趋近于 -1x 趋近于 0
Java程序1
当中x趋近于1的时候package com.itzheng1.test3;public class MyMath4 { public static void main(String[] args) { double x = 10; while (x > 1){ System.out.println(f(x)); x = x - 0.1; } } public static double f(double x){ double y = (x*x - x)/(x*x - 1) * Math.abs(x); return y; }}
其值趋近于1/2
Java程序2 当中x趋近于-1的时候package com.itzheng1.test3;public class MyMath4 { public static void main(String[] args) { double x = -10; while (x < -1){ System.out.println(f(x)); x = x + 0.001; } } public static double f(double x){ double y = (x*x - x)/(x*x - 1) * Math.abs(x); return y; }}
其值趋近于正无穷
Java程序3 当中x趋近于0负的时候package com.itzheng1.test3;public class MyMath4 { public static void main(String[] args) { double x = -10; while (x < 0){ System.out.println(f(x)); x = x + 0.001; } } public static double f(double x){ double y = (x*x - x)/(x*x - 1) * Math.abs(x); return y; }}
其值趋近于-1
Java程序4 当中x趋近于0正的时候package com.itzheng1.test3;public class MyMath4 { public static void main(String[] args) { double x = 10; while (x > 0){ System.out.println(f(x)); x = x - 0.001; } } public static double f(double x){ double y = (x*x - x)/(x*x - 1) * Math.abs(x); return y; }}
其值取决于1
转载地址:https://code100.blog.csdn.net/article/details/115432120 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!
发表评论
最新留言
不错!
[***.144.177.141]2024年04月07日 01时30分14秒
关于作者
喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
10种算法一文打尽!基本图表算法的视觉化阐释
2019-04-29
未来属于人工智能工程师,但成功转型不容易
2019-04-29
科技界“挠头”:困扰科技界可持续发展的难题
2019-04-29
20年后,这5种编码语言可能就消失了……
2019-04-29
标准出现问题,人工智能正在走向错误的方向
2019-04-29
如何使用Python实现最低有效位隐写术?
2019-04-29
湮没在赞誉之中,科学史上鲜为人知的五大“败笔”
2019-04-29
别再对分类变量进行独热编码!你还有更好的选择
2019-04-29
如果不能用Python执行机器学习,那该用什么呢?
2019-04-29
不论何时,互联网从业者一直幸福着~
2019-04-29
mysql用户口令中含有特殊字符@的情况下,如何正确链接数据库
2019-04-29
SpringFox接口文档API DOC
2019-04-29
netty优化策略
2019-04-29
架构师知识体系全景图
2019-04-29
guava中EventBus(事件总线)源码分析与使用
2019-04-29
程序员成神之路文章目录
2019-04-29
SASS软件的成熟度模型总结
2019-04-29
一次搞定redis使用
2019-04-29
最全架构设计实践方法论: 微服务
2019-04-29
Linux下简单几步安装AI开发环境-ROS(超有意思)
2019-04-29