D. Euler-Lagrange equations in semi-infinite system Our goal is to determine the shape of the ion number and charge density profiles near the charged wall, therefore we need to consider the Euler-Lagrange (EL) equations corresponding to the minimum of the functional (26). From δ L /δφ ( z ) = 0 we obtain where Note that − 1 < g ( z ) < 1. From the above we can obtain ψ as a Taylor series in φ and η , of odd orders in φ . The charge density can be eliminated by using (39), and after some algebra we obtain three EL equations for ϑ , η and g : where and 14 φ ( z ) = − ρ$_{c}$ ( z ) g ( z ) , (39) g ( z ) = tanh( βeψ ( z ) / 2) . (40) J ( ϑ ′′ + 6 ϑ ) = k$_{B}$T 2 [ ( J$_{ρρ}$ + J$_{ρs}$ ) ln(1 − ρ$_{c}$ + s ) + ( J$_{ρs}$ − J$_{ρρ}$ ) ln(1 − ρ$_{c}$ − s ) (41) − 2 J$_{ρs}$ ln( ρ$_{c}$ ) − J$_{ρs}$ ln(1 − g $^{2}$) − J$_{ρρ}$ Δ¯ µ + J$_{sρ}$ Δ¯ µ$_{c}$ ] J ( η ′′ + 6 η ) = − k$_{B}$T 2 [ ( J$_{ρs}$ + J$_{ss}$ ) ln(1 − ρ$_{c}$ + s ) + ( J$_{ss}$ − J$_{ρs}$ ) ln(1 − ρ$_{c}$ − s ) (42) − 2 J$_{ss}$ ln( ρ$_{c}$ ) − J$_{ss}$ ln(1 − g $^{2}$) + J$_{sρ}$ Δ¯ µ − J$_{ss}$ Δ¯ µ$_{c}$ ] − g ′′ ( ¯ ϵ + ϵ$_{ϑ}$ϑ − ϵ$_{η}$η ) + g $^{′}$g e k$_{B}$T [ (¯ ϵ + ϵ$_{ϑ}$ϑ ′ − ϵ$_{η}$η ′ ] − 2 πe ( e k$_{B}$T ) 2 (1 − g $^{2}$) g $^{2}$ρ$_{c}$ = 0 , (43) Δ¯ µ = Δ µ + 6 J$_{ss}$ ¯ s + 6 J$_{ρs}$ ¯ ρ$_{c}$ = − k$_{B}$T 2 ln [ 1 − ¯ ρ$_{c}$ + ¯ s 1 − ¯ ρ$_{c}$ − ¯ s ] (44) Δ¯ µ$_{c}$ = Δ µ$_{c}$ + 6 J$_{ρρ}$ ¯ ρ$_{c}$ + 6 J$_{ρs}$ ¯ s = − k$_{B}$T 2 ln [ ¯ ρ 2 c (1 − ¯ ρ$_{c}$ ) 2 − ¯ s 2 ] . (45)