with(linalg):f := (x,y) -> x/y: 'f(x,y)' = f(x,y); r := vector([6,-2]): v := vector([-1,3])/sqrt(10): Dvf := Limit('(f(r+h*v)-f(r))/h',h=0); p := evalm(r+h*v): Dvf := Limit((f(p[1],p[2])-f(r[1],r[2]))/h,h=0); Dvf := Limit(simplify((f(p[1],p[2])-f(r[1],r[2]))/h),h=0); Dvf := limit((f(p[1],p[2])-f(r[1],r[2]))/h,h=0); formula := innerprod(grad(f(x,y),[x,y]), v); answer := subs({x=6,y=-2},formula);