//======================================================
// Numerical Analysis package in java
// Gauss-Legendre integration utilizing
// user given terms, roots calculated by Legendre transform
// Dr. Turhan Coban
// =====================================================
import java.io.*;
import javax.swing.*;

public class siyah_cisim
{
public static double F(double x)
  {//Black body shape function
  double C2=1.438769e4;
  double y=C2/x;
  double total=0;
  for(int k=1;k<40;k++)
  {total+=Math.exp(-k*y)/k*(y*y*y+3.0*y*y/k+6.0*y/(k*k)+6.0/(k*k*k));}  
  double pi=Math.PI;
  total=15.0/(pi*pi*pi*pi)*total;
  return total;
  }

  
  public static void main(String args[]) throws IOException
  {
  
  double x1=Double.parseDouble(JOptionPane.showInputDialog("n*lambda*T= "));
  
  
  
  System.out.println("f(0-"+x1+") ="+F(x1));
  }
}
