# Function(3, 4/3, 5/3) is not accepted

hjbortol shared this problem 2 years ago
Not a Problem

Function(3, 4/3, 5/3) generates the error message: Illegal argument x.

Function(3 + 0 x, 4/3, 5/3) is ok. 1

Try 3 ==> 3+0x

and inform us what app you are using..... 1

@hawe, the problem occurs in all plataforms. Using 3 + 0x works, but is quite unnatural. Thanks! 1

3 is a number. This represent arithmetic mode.

3+0x is a constant function. This represent algebraic mode. 1

The command is named "Function" so I think it would be easy to program it to recognize 3 in this context as a constant function instead a number. The use of 3 + 0x is not intuitive to students and other commands of GeoGebra recognizes constant functions (see, for instance, Curve(3, t, t, 0, 1)). 1

`see, for instance, Curve(3, t, t, 0, 1)`

I hope you know the difference between "curve" and "function"???

Btw:

`If(4/3 < x < 5/3, 3)`

works fine. 1

This is fine (as well as If) so probably we won't change this

```f(x)=3
Function(f, 5, 6)``` 2

`I hope you know the difference between "curve" and "function"???`

Yes, yes, I know the differences as I know the similarities: both are examples of maps (https://en.wikipedia.org/wi...).

I think I'm being misinterpreted here. I know there are workarounds to my problem but my point is the consistency of the command Function() being used with constants.

Argument 1: Function(3, x, -1, 1, y, -1, 1) works. Curve(3, 3, t, -1, 1) works also. Why does Function(3, -1, 1) generate an error?

Argument 2: I'm a translator of GeoGebra so I have access to the translation platform. There, it is written that "Function[sin(x),1,2] is now a synonym for If[1<=x<=2, sin(x)] (from version 5.0.9.0)". So, Function(3, -1, 1) should be translated to If(-1 <= x <= 1, 3) and it should work but it doesn't.

Argument 3: Is there really a good (programming, mathematical, philosophical, ...) reason to avoid constants in the Function() command? 1

`Is there really a good reason to avoid constants in the Function() command`
The question is the wrong way round. Try "Is there a good reason to add this improvement over the 1000+ other things we could do instead?" 1

Yes, this is a good reason, Michael, I see.