class fr extends f_x
{
public double func(double x)
{  double lambda=0;
     /*
	if(x<4000) lambda=0.2;
	else if(x>=4000 && x<40000) lambda=0.8;
	else if(x>=40000 && x<200000) lambda=0.2;
	else lambda=0;
	*/
	lambda=0.5+0.5*sin(10*x*Math.random());
	return lambda;
}	
}
public class isinim2
{
public static double F(double x)
{double C2=1.439e4; //mm/K
double ksi=C2/x;
double total=0;
for(int n=1;n<200;n++)
{total+=Math.exp(-n*ksi)/n*(ksi*ksi*ksi+3.0*ksi*ksi/n+6.0*ksi/(n*n)+6.0/(n*n*n));}
total*=15.0/(Math.PI*Math.PI*Math.PI*Math.PI);
return total;
}
public static double eps()
{double dlambda=100.0;
 double sum=0;
 fr f=new fr();
 for(double x=100.0;x<500000;x+=dlambda)
 {sum+=(F(x+dlambda)-F(x))*f.func(x);}
 return sum;
}

public static void main(String arg[])
{double x=2000.0;
fr f=new fr();
 System.out.println(F(4000)+"lambda(4000)="+f.func(4000)+"eps="+eps());
 System.out.println(F(40000)+"lambda(40000)="+f.func(40000)+"eps="+eps());
 System.out.println(F(200000)+"lambda(200000)="+f.func(200000)+"eps="+eps());
}

}