# HP Forums

You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Interestingly, I found nothing in the user guide regarding this usage of a function variable:

CAS enter:
r(t):=[t-sin(t) 1-cos(t)]

Produces:
r:=(t)->BEGIN [t-sin(t),1-cos(t)]; END;
(t)->BEGIN [t-sin(t),1-cos(t)]; END;

Example:
A revolving cycloid at t=0 (rest), position r(0) => [0,0] rotates to pi radians, r(π) => [π,2], completes a full cycle at r(2*π) => [2*π,0].

Is there any further information on this?

-Dale-
You can find more info by looking at the documentation for xcas/giac.

There isn't anything special about a variable whose content is a function. It's supposed to reflect a mathematical function. So you can create functions by simply using the form:

function_name(var_name):= <expression in terms of var_name>;

This is typical for any CAS. The CAS also knows how to handle functional algebra. So you can define two functions f(x) and g(t) and ask the CAS to compute h:=f+g, and then use compute, say, h(3).
The fact that it created the function in much the same way as 'Define' might, was new to me. The 'BEGIN and END' surround wasn't something I expected, but now that I have learned of that behavior, I imagine it will become quite useful.

Thanks for the xcas/giac reference.

-Dale-
Reference URL's
• HP Forums: https://www.hpmuseum.org/forum/index.php
• :