I am trying to solve the free particle Schrodinger equation in 1D (hbar =1, Energy = 1, mass = 1), But specifying conditions only on x==0:
k = Sqrt[2];
op = Inactivate[Div[{{-0.5}}.Grad[u[x], {x}], {x}], Div | Grad] - u[x];
sol = NDSolveValue[{op == NeumannValue[0, x == 0],
DirichletCondition[u[x] == Cos[k x], x == 0]}, u, {x, 0, 1}]
Plot[{sol[x] , Cos[k x]}, {x, 0, 1}]
The blue line is the numeric solution, and it is obviously not the expected solution (in orange), since the derivative in x==0 is not zero. I understand that specifying the Neumann value is not needed since its default is zero, but it isn't zero here!
What is going on?