To treat this problem in a somewhat general manner, let us assume that y's boundary values are fixed, say
[tex]y(a)=y_{a},y(b)=y_{b}[/tex]
We look then at the set of comparison functions:
[tex]Y(x,\epsilon)=y(x)+\epsilon\gamma(x),\gamma(a)=\gamma(b)=0[/tex]
That is, the [itex]\gamma[/itex]-function is arbitrary except for vanishing at the boundaries.
We have a functional,
[tex]F(\epsilon)=\frac{\int_{a}^{b}N(Y,Y^{,},x)dx}{\int_{a}^{b}D(Y,Y^{,},x)dx}[/tex]
and also define the quantities:
[tex]n=\int_{a}^{b}N(y,y^{,},x)dx, d=\int_{a}^{b}D(y,y^{,},x)dx (*)[/tex]
Now, differentiating F with respect to [itex]\epsilon[/itex] and then setting thederivative of F equal to 0 at [itex]\epsilon=0[/itex] yields, with some rearrangement:
[tex]\frac{\int_{a}^{b}(d(\frac{\partial{N}}{\partial{y}}-\frac{d}{dx}\frac{\partial{N}}{\partial{y^{,}}})-n(\frac{\partial{D}}{\partial{y}}-\frac{d}{dx}\frac{\partial{D}}{\partial{y^{,}}}))\gamma(x)dx}{d^{2}}=0[/tex]
Thus, we get the following diff.eq problem to solve:
[tex]d(\frac{\partial{N}}{\partial{y}}-\frac{d}{dx}\frac{\partial{N}}{\partial{y^{,}}})-n(\frac{\partial{D}}{\partial{y}}-\frac{d}{dx}\frac{\partial{D}}{\partial{y^{,}}})=0, y(a)=y_{a},y(b)=y_{b}[/tex]
The solution of this diff.eq problem will typically be a function of the two parameters d and n, (in addition of course, of being a function in x)!
In order to determine d and n, (*) represents a system of algebraic equations in d and n, so we solve this system to complete our solution.