If then and . So the E–L equation says that , or .
Now you have a simple differential equation for y, whose general solution is . The constants a and b would have to be determined by some initial conditions for the problem (such as the values of y when x=x_1 and x= x_2).
Use the same procedure that I showed for your similar question in the Calculus section (which is where this thread also belongs, Moderator!). What is ? What is ? What does the Euler–Lagrange equation say? Can you solve it?
You need to show that you have made some attempt at progress before you get any more help on this one.