#NEWLINE# def fun( self , x , * args ) : #NEWLINE# #INDENT# self . nfev += 1 #NEWLINE# x = x [ 0 ] #NEWLINE# y = 0.0 #NEWLINE# for k in range ( 1 , 6 ) : #NEWLINE# #INDENT# y += ( k * cos ( ( ( ( k + 1 ) * x ) + k ) ) ) #NEWLINE# #UNINDENT# return ( - y )