用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

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
数学解析,正确答案选择B
在这里插入图片描述

3、第三道题

在这里插入图片描述

在这里插入图片描述

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

在这里插入图片描述
总结上述只有一个极限达到无穷,另外一个没有达到无穷因此答案选择D
在这里插入图片描述

4、第四道题

在这里插入图片描述

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

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)=a

8、第八道题

在这里插入图片描述

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 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:SpringMVC快速入门(8)拦截器,拦截器案例应用,登录拦截器
下一篇:安装谷歌浏览器——测试工具(Advanced REST client)

发表评论

最新留言

不错!
[***.144.177.141]2024年04月07日 01时30分14秒