Extremals - Euler - Lagrange Equation

Hello,

I don't know if someone will be able to help me with this, but I'm going to post it anyway. I'm studying a worked example, but I'm confused about a few things and was hoping someone could help me understand some steps.

Question:

Find the extremal for the following fixed-end problem

with

**Solution** (I'm going to number the steps here.

(1) Let . The Euler-Lagrange equation is

(2) which implies

(3) so where C is a constant.

(4) Then where

(5) Using we have

(6) Solving this linear system yields

(7) So the extremal is

Firstly, I don't understand how this goes from (2) to (3) i.e where , and from (3) to (4).

Can anyone please explain it?

Another example I have (which I won't post the whole thing for) is

Find the extremal of

(8) with

(9) The Euler-Lagrange equation is

(10) which implieds

(11) This implies

again, in this example I don't understand how 11 was arrived at from 10. (Note the extremal solution to this second example is