problems with integration
|
01-10-2015, 03:17 PM
Post: #48
|
|||
|
|||
RE: problems with integration
I would explain the difference like this.
An expression is a symbolic value, it's almost the same as 1 or 2/3, but the value is symbolic, not numeric. x^2 is an expression. You can store an expression in a CAS variable, for example g:=x^2. You can not use g like if it was a function, g(2) is invalid, instead you must substitute x by 2 in g: subst(g,x=2) (with recent Xcas version, you can use the shortcut g(x=2)) A function is a mathematical object that eats one (or more) argument, process it then returns a value (that's why we use a ->). x->x^2 is a function. You can store a function in a CAS variable, for example f:=x->x^2 (or with the shortcut f(x):=x^2). Then f is a function, f(2) will return 4, f(x) will return the expression x^2. You can do arithmetic operations on functions, for example h:=f*f is a function such that h(x)==f(x)*f(x), you can also compose functions e.g. h:=f@f is a function such that h(x)=f(f(x)), or even give a function as argument to a CAS program. Many students are confused by the difference between function and expression, because most of the time the math teachers do not make a clear distinction between the two different mathematical objects because there is no confusion thanks to the context, but that's much harder to do that on a computer : I recently introduced some syntaxic "sugar", e.g. g(3) will evaluate to 9 in recent Xcas with a warning. That's precisely because I added this that the infinite recursion happened in the example ((x->x)+x)(3) where x has two different meanings (mute variable of the x->x function and expression). Now I fixed it in Xcas, I hope it's behind... |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)