expression, godan verb (-su)
rack one's brains; worry over; be troubled by
Used when a problem or situation causes persistent mental distress or requires difficult thinking. Often implies the subject is struggling to find a solution.
新しい企画のアイデアが浮かばなくて、頭を悩ましている。
I'm racking my brains because I can't come up with an idea for the new project.
His irresponsible attitude gave his boss a headache.