Find the extremal of the functional $$J(y)=\int_a^b F(x,y,y')\,dx$$where , $F(x,y,y')=y'+y$ , for admissible functions $y$.
From Euler-Lagrange equation , $\displaystyle \frac{d}{dx}\left(\frac{\partial F}{\partial y'}\right)-\frac{\partial F}{\partial y}=0$ we get , $-1=0$ ( absurd ). So , we can conclude that the functional has NO extramal.
Again we know when $x$ is absent in $F$ , then Euler-Lagrange equation is transformed into $\displaystyle F-y'\frac{\partial F}{\partial y'}=\text{ constant }$. Since in this problem $x$ is absent in $F$ so we can use it and using we get , $y=\text{constant }$ , which is the required extremal.
Why these two process give different result ? Which is the correct answer and why ? Please explain properly.
Euler-Lagrange equation is just a necessary condition for the functional to have an extrema. This is because the Euler-Lagrange equation is derived from the following:
Suppose $y(x)$ minimizes (maximizes) the functional. Then you have $J(y+\lambda v)\ge J(y)$ for each $\lambda >0$. Now dividing by $\lambda>0$ and letting $\lambda\to 0$ you get the Euler-Lagrange equation. So the equation says that if $y$ minimizes (maximizes) the functional $\Rightarrow$ the equation is satisfied. But if the equation is satisfied for some $y(x)$ it does not mean that it is indeed a minimizer (maximizer). This is the same as for functions in one variable: if the derivative at some point $x=a$ is $0$ then this point $x=a$ is a potential extremal point (but it could be just inflex point- like $x=0$ in $f(x)=x^3$).
For your problem, $J(y)=\int\limits_{a}^{b}{(y'+y )dx}=y(b)-y(a)+\int\limits_{a}^{b}{y dx}$.
Now, no matter if the set over which you search for minimizer/ maximizer is of functions with fixed values at $x=a$ and $x=b$, the expression $J(y)=y(b)-y(a)+\int\limits_{a}^{b}{y dx}$ is unbounded from above and from below. So it can not have neither minimum nor maximum over $C^1[a,b]$ or just over the set of differentiable functions in $[a,b]$:
1)If the set consists of differentiable functions with unfixed values at $x=a$ or $x=b$, then taking the functions $y_n(x)=n=const$, then $J(y_n)\to\infty$. Taking $y_n=-n\Rightarrow J(y_n)\to -\infty$.
2) If $y(a)$ and $y(b)$ are fixed, then again you can find sequences $y_n$ for which $J(y_n)\to\pm\infty$