
Cudgel your brains
Intensity of Effort
The phrase implies using significant mental effort to remember or solve something. 
Idiomatic Expression
It's an idiom, so don't take 'cudgel' literally; it's about mental effort, not physical. 
Slightly Informal
Mostly used in informal conversations rather than formal writing. 