function to return the sum of the series
double log_Expansion ( double x , int n ) { double sum = 0 ; int i = 0 ; for ( i = 0 ; i < n ; i ++ ) { sum = sum + pow ( x , 2 * i ) / fact ( 2 * i ) ; } return sum ; }