### 3.1. Necessary Optimality Conditions for Problem (1.1)

To develop the necessary conditions for the extremum for (1.1), assume that is the desired function, let , and define a family of curves since is a linear operator; then we get (1.1) in the form

and where is extremum at , we get by differentiating both sides with respect to and set , for all admissible ,

But we have (by integration by parts in classic and fractional calculus)

Substituting in (3.2), we get

Since is arbitrary, we get and which gives the fractional Euler-Lagrange equation in the form

with the natural boundary condition (transversality conditions)

If is specified, then we have , but if it is not specified, then we get the boundary condition

Remark 3.1.

These conditions are only necessary for an extremum. The question of sufficient conditions for the existence of an extremum is considered in the next section.

Special Cases

Case 1.

If is a local extremizer to

by putting and in (3.5), (3.6), and (3.7), we get the fractional Euler-Lagrange equation in the form

for all , with the boundary condition

Case 2.

If is a local extremizer to

we get similar results as in [18].

### 3.2. Necessary Optimality Conditions for Problem (1.2)

To develop the necessary conditions for the extremum for (1.2), assume that is the desired function, let , and define a family of curves since is a linear operator; then we get (1.2) in the form

and where is extremum at , we get by differentiating both sides with respect to and set , for all admissible ,

But we have (by integration by parts) that

Substituting in (3.13), we get

Since is arbitrary, we get and which gives the fractional Euler-Lagrange equation in the form

with the natural boundary condition (transversality conditions)

If is specified, then we have , but if it is not specified, then we get the boundary condition