Maxima CAS: How to set domain of function's arguments and parameters?

380 Views Asked by At

How can I specify that $a>0$ and $f$ is defined on $(0,1)$ for a toy function $f(x|a)=ax$ in Maxima CAS?

f(x):=a*x;

That is $f:(0,1)\to(0,а)$

1

There are 1 best solutions below

0
On

I found assume() function in Maxima's documentation. It assumes domains (or ranges) of variables. We can also use facts() to view current assumptions. For the toy example above, we declare:

assume(a>0)$  /% $ sign suppresses the output echo %/
f(x):=a*x$    /% function declaration %/
facts();      /% prints [a>0] %/