"Does this mean that by analytical study of the material world (i.e. Science) one can attain samadhi?"
SamAdhi (liberation) can also be attained by analytical study or path of knowledge (GyAna yoga), which is known as SAmkhya. However, that analysis includes Prakruti (material world) and Purusha (consciousness) both.
Translation
BG 5.4 - The fools, not the learned ones, speak of SAmkhya (the path of Knowledge) and [Karma] yoga as different. Any one who properly resorts to even one [of them], gets the result of both.
When one attains liberation?
Until the consciousness (Purusha) is influenced by 3 modes of material nature (Prakruti), one remains in higher, middle or lower planes of the material world. When it stops getting influenced by theese 3 modes: Sattva, Rajas, Tamas, then it is said to be in the state of SamAdhi.
BG 3.27 — All actions (karma-s) are enacted in Prakruti by [3] modes (guna-s). Bewildered with ego (false identity), [true] self (Atma) believes "I am the doer".
BG 14.19 — When the witness (Purusha) looks upon none other than the [3] modes [of material nature] as the doers and knows superior upon the modes, [s]he attains 'My' nature.
SamAdhi is a state of realising the "non-doership" (akartA). Whatever actions are performed by person, are actually performed by the modes of the nature. Let it be any action: good, bad or ugly.
How "[Karma] Yogi" gives up the doership (i.e. attains SamAdhi)?
BG 5.7 — Contained with Yoga (i.e. Yogi), purified self, winner of self, winner of senses, the material self among all material selves - doesn't get tainted even performing actions.
How "SAmkhya" gives up doership (i.e. attains SamAdhi)?
BG 5.8, 5.9 — "I certainly don't do anything" is believed by knower containing fundamentals - even while seeing, hearing, touching, smelling, eating, moving, dreaming, breathing, talking, discarding, accepting, opening, closing; "Senses only are acting in the subjects of senses" - is understood.
Summary
The answer to BG 5.4 is contained within the subsequent verses BG 5.7 - 5.9.
The SAmkhya who has the knowledge of fundamentals (tattva), gives up the "doership" by understanding the fact that, everything happening around, is happening due to 3 modes only. If the person relates self with these 3 modes, then he/she may believe "I am the doer". But this [smart] analytic knows that "I am not the doer". When one doesn't associate self with the 3 modes, one is automatically associated beyond them. That's where the supreme or SamAdhi resides.
IMPO, SAmkhya should have very close relation with those who practice Advaita philosophy.