Question: Why sin(x)/x is not considered as a function?

January 28 2013 Skyblue 10
Maple 15
1

Hello,

 

I'm going to ask an question which I think it has an easy answer. However, I can't figure it out.

I wonder why f:x->sin(x)/x is not considered as a function. When I type "type(f(x),'function')", Maple says it's false, even though I don't know why. I'm asking this because I'm making a procedure in which one of the parametres is a function and when I type

aprox:=proc(fn::function,x::realcons,iteracions::integer)

the procedure doesn't work. Here you have the procedure I have made, so you can make an idea of what I'm doing:

aprox:=proc(fn::function,x::realcons,iteracions::integer)
local i,resp;
for i from 1 to iteracions do
resp:=[x+(1/i),fn(x+(1/i))];
[resp];
end do;
end proc;
It's just a function which depends on three parametres aprox(fn,x,iteracions), in which fn can be any function, x any number and iteracions an integer. The aim of this procedure is to print/show a list of all the values with the form [x+(1/i),fn(x+(1/i)] for i=1..iteracions. 
 
Thank you very much for your appreciated attention :)
 
Have a nice day!
Please Wait...