I'm trying to use the solve
function recursively on my TI-89 calculator. Minimal example to demonstrate the concept:
solve( y + solve(x=2, x) = 3)
Which should give y=1
. Instead, it gives the rather unhelpful (y+x=y+2)=1
. I think this is happening because solve
returns an equality rather than a number, and my example evaluates as
solve( y + (x=2) = 3)
Instead of the intended
solve( y + 2 = 3)
How can I work around this? Is there a function that returns the value 2
from the expression x=2
? Or another way I can force solve
to do what I want? I've browsed the catalog but none of the built-in functions seem to do what I want.
Edit:
I want to do this in a single expression, not using an intermediate step.
You can define a variable as a solution to the $solve()$ function, and then plug it in another $solve()$ equation - or basically, put the solution to the $solve()$ function into a variable.
As an example, the $solve(x=2, x)$ that you've mentioned can be defined by the variable $z$ using the STO→ button on your calculator (In this case, type in $solve(x=2,x)$, then press STO → $z$, so the equation is stored in the variable, and then put in $solve(y+z=3)$, and solve for any variable you want.