function to return the Sum of the series
def log_Expansion ( x , n ) : NEW_LINE INDENT Sum = 0 NEW_LINE i = 0 NEW_LINE for i in range ( n ) : NEW_LINE INDENT Sum = Sum + pow ( x , 2 * i ) / fact ( 2 * i ) NEW_LINE DEDENT return Sum NEW_LINE DEDENT