
function[val] = Hsup(h,unp1,x,uip1,uim1,mu,f,sig)

if mu > 0
    
    val =  sig*(uip1 - 2*x + uim1)/(h^2) + mu*(x - uim1)/h + f;
    
    
    
else
    
    
     val = sig*(uip1 - 2*x + uim1)/(h^2) + mu*(uip1 - x)/h + f;
    
    
    
end