殚精竭虑

dān jīng jié lǜ

to exhaust one's thoughts and ingenuity (idiom); to think sth through thoroughly

to rack one's brains; to leave no stone unturned

dān

entirely

jīng

essence

jié

to exhaust

to think over