Question: Problem with procedure including limit

how to make below can be successfully run?

normaldiff := proc(f1)
return limit((subs(x=x+h,f1)-f1)/h, h=0):
end if:
recurdiff := proc(f2)
if f2 = 0 then
return 0:
end if:
if f2 <> 0 then
return limit((subs(x=x+h,normaldiff(f2)+recurdiff(f2))-(normaldiff(f2)+recurdiff(f2)))/h, h=0):
end if:

f := x;
normaldiff(f)+recurdiff(f);

expect return 1, is like normal diff

 

Please Wait...