I directed my mind to understand, to explore, to search out wisdom and explanations, and to understand the stupidity of wickedness and the folly of madness.
KJV
I applied mine heart to know, and to search, and to seek out wisdom, and the reason [of things], and to know the wickedness of folly, even of foolishness [and] madness:
ASV
I turned about, and my heart was set to know and to search out, and to seek wisdom and the reason of things, and to know that wickedness is folly, and that foolishness is madness.