java 怎样引用构造函数中的对象

2024-11-28 10:32:51
推荐回答(2个)
回答(1):

y=(sin(x/2))^4+(cos(x/2))^4=((sin(x/2))^2+(cos(x/2))^2)^2-2*(sin(x/2))^2*(cos(x/2))^2
=1-(2*(sin(x/2)*(cos(x/2))^2/2=1-(sin(2x))^2/2
由sin(2x)∈【-1,1】得 (sin(2x))^2∈【0,1】 (sin(2x))^2/2∈【0,1/2】
所以1-(sin(2x))^2/2∈【0,1/2】即 y∈【0,1/2】函数值域为∈【0,1/2】

回答(2):

把对象放构造函数里面干嘛?