class
pro{
public static void main(String args[]){
double a,beta,h,ks,c1,r1,k1;
double k[]=
new double
[101];
double cx[]=new double[101];
double cxs[]=new double[101];
double alpha[]=new double[101];
int nx,m,n;
double y;
double ep;
double th;
double q;
double n1;
int t;
a=0.33;
beta=0.95;
ks=Math.pow;
h=2*ks/
100;
for (n=1;n<101;n++){
k[n]=n*h;
cx[n]=Math.pow(k[n],a);
}
q=Math.PI/100;
t=0;
while(t<100){
for (m=1;m<101;m++){
y=0;
for (n=-100;n<101;n++){
th=n*q;
nx=n;
if (nx<0)nx=-nx;
y=y+cx[nx]*Math.cos(m*th)*q;
}
alpha[m]=y/Math.PI;
}
y=0;
for (n=-100;n<101;n++){
th=n*q;
nx=n;
if (nx<0)nx=-nx;
y=y+cx[nx]*q;
}
alpha[0]=0.5*y/Math.PI;
for (n=10;n<91;n++){
k1=k[n]+Math.pow(k[n],a)-cx[n];
n1=(1000*k1/h)/1000;
th=n1*q;
r1=a*Math.pow(k1,a-1);
cxs[n]=fou(alpha,th)/(beta*(1+r1));
}
ep=0;
for (n=10;n<91;n++){
ep=ep+Math.pow(cx[n]-cxs[n],2);
}
for (n=10;n<91;n++){
cx[n]=cxs[n];
}
t=t+1;
}
for (n=40;n<61;n++){
System.out.println(cx[n]);
}
}
public static double fou(double[] alpha,double th){
double f1;
int m;
f1=alpha[0];
for (m=1;m<101;m++){
f1=f1+alpha[m]*Math.cos(m*th);
}
return f1;
}
}
最終更新:2010年10月23日 03:22