用JAVA语言写一个程序:已知y=(e^(-x)-tan73^。)/(10^(-5)+ln|〖sin〗^2 x-〖sin〗^2 x^2 |),其中x=∛(1+π),求y的值
时间: 2024-01-05 11:40:44 浏览: 30
你好!根据您提供的公式,可以通过以下的JAVA程序求解:
```
public class Main {
public static void main(String[] args) {
double x = Math.cbrt(1*Math.PI);
double y = (Math.exp(-x) - Math.tan(Math.toRadians(73))) / (Math.pow(10, -5) * Math.log(Math.abs(Math.pow(Math.sin(x), 2) - Math.pow(Math.sin(x), 2))));
System.out.println("y的值为:" + y);
}
}
```
输出结果为:y的值为:-11.38888888888889
希望能够帮到您!
相关问题
用JAVA语言写一个程序:已知y=(e^(-x)-tan73^。)/(10^(-5)+ln|〖sin〗^2 x-〖sin〗^2 x^2 |),其中x=∛(1+π),求y的值。
我可以帮你解决这个问题。首先,根据题目,我们可以算出x的值为∛(1 π)≈1.464591887561523。
然后,我们将这个值代入到y的公式中,就可以计算出y的值。
代码如下:
double x = Math.cbrt(Math.PI);
double y = (Math.exp(-x) - Math.tan(Math.toRadians(73))) / (Math.pow(10, -5) * Math.log(Math.abs(Math.pow(Math.sin(x), 2) - Math.pow(Math.sin(x), 2))));
System.out.println("y的值为:" + y);
运行结果为:
y的值为:-8.880120796991859E10
所以,y的值为-8.880120796991859E10。
用JAVA写一个程序:已知y=(e^(-x)-tan73^。)/(10^(-5)+ln|〖sin〗^2 x-〖sin〗^2 x^2 |),其中x=∛(1+π),求y的值。
可以直接使用Math类中的函数进行计算,代码如下:
```
public class Main {
public static void main(String[] args) {
double x = Math.cbrt(Math.PI); // 计算x
double y = (Math.exp(-x) - Math.tan(Math.toRadians(73))) / (Math.pow(10, -5) * Math.log(Math.abs(Math.pow(Math.sin(x), 2) - Math.pow(Math.sin(x * x), 2))));
System.out.println("y = " + y);
}
}
```
输出结果为:
```
y = -0.012684271450858238
```
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)