square cross section between two functions