Hello,

I am trying to write a small program that will give me all the partial derivatives of a function. I use the fx-CP400.

Example:

Input:

term: x^2+y-z

variables: x,y,z

Output:

function: fx(x) = 2*x; fy(y) = 1; fz(z) = -1

The problem is that I cannot define a function with a variable that stores an expression.

For Example:

Define f(x) = x^2+3

If I typ this in main:

f(x)

However, when I create a variable n that contains the expression, the function stores the variable and not the expression.

For Example:

x^2+3 => n

x^2+3

Define f(x) = n

x^2+3

so if I change the expression that the variable contains, the data content of the function is overwritten. Also, the function does not work as it should.

f(3)

x^2+3

Is there a way to create a function with an expression stored in a variable, storing the expression rather than the variable itself?

Please excuse my bad English. Hopefully you have understood my request.

Paedisc

**Edited by Paedisc, 22 May 2022 - 12:32 PM.**