Hi people, It is very strange to me. I can not define a function vector inside a program. Take a look at the problem.
Solved! Go to Solution.
Try to define it the same way you defined the first g(x), so with an immediate array, instead of assigning expressions to the first and second elements of the array.
Your definition of A3(a) fails because x is an unknown. This may work if you include a symbolic evaluation at the definition.
(I can't try it out, because I'm limited to Prime express.)
In your application I see no need to define a local function inside the program. All you need is a vector of expressions, or functions if you will. That can also be done in mathcad 11 (where you cannot define local functions inside a program):
OK, accepted.... Mathcad appears to be able to do without just as well:
Still no need to define an internal function for the application of the OP.
The way you try to define your function in A2 would not work outside a program on worksheet level either.
You have to define your function the very same way as you defined g(x) on the very top of your sheet (as Luc and Valery already wrote/showed).
Another way which works also with numerical evaluation is shown below
Of course in this approach g is not a local function but a simple vector variable. So you can't use it as a function inside your program. Your sheet does not show if you intend to do this, though.
If this is your goal and you insist on defining the functions singly, you could use something like this: