Question: odd function

I have a proc and I want to test if the function is odd.

The following is wrong, but could you modify it to work well?

smth:=proc(f::algebraic,x)

if  simplify( f(x)+f(-x) )=0

then print("f is odd");

end if;

end proc;

In the proc argument there is x because x is the variable of f,  for example  f  may have other

parameters,   (in mathematical notation)  f(x)=ax+3.

Thanks,       Sandor

 

 

Please Wait...