I have a second order ordinary differential equation and want to solve it numerically. Although I have specified values at the boundary, Mathematica solution does not match with boundary conditions.
h = 10.6
F = 0.001
d = 1.0
L = 100*d
phi[x_] :=
Piecewise[{{0.5*(1 - Tanh[x]),
x < L*0.5/d}, {0.5*(1 + Tanh[x - L/d]), x > L*0.5/d}}]
s = NDSolve[{u''[x] == (h)*phi[x]*phi[x]*u[x] - F*d*d*(1 - phi[x]),
u[-2.5] == 0.0, u[L + 2.5] == 0.0}, u, {x, -2.5, L + 2.5}]
vL[x_] := u[x]/(1 - phi[x])
Plot[Evaluate[{vL[x]} /. s], {x, L/d + 1.5, L/d + 2.5},
PlotRange -> All]
{u[-2.5], u[L + 2.5]} /. s
{{9.02944, -1.11442*10^-25}}
What is the correct way to set the boundary conditions?