べく・んがため(に): the difference
べくN1
Meaning
For the purpose of, In order to, To ensure
Past papers
Tested 2 times in past papers
Example
彼は研修医となるべく、5年以上医科大学で修練しました。
In order to become a medical resident, he trained at medical school for more than five years.
んがため(に)N1
Meaning
In order to, To, For the purpose of
Past papers
Example
ソクラテス:「生きんがために食え、食わんがために生きるな」
Socrates: 'Eat to live; do not live to eat.'
How to tell them apart
「ために」: the ordinary, neutral purpose.
「べく」: written 'in order to', rational and formal.
「んがために」: full of feeling, with a resolve to sacrifice and an unshakable drive; used for life turning points, great causes and all-or-nothing efforts.