Java program demonstrating calculation of this complex function.