Doubt from LCR circuits

Both circled Problems ..From fitjee mocktest.

#23
F=-\dfrac{du}{dx} find minima using ur convenience either perfect square or derivative
find force at that instant now find velocity
wrk energy conservation theoram
#24