I tend to store all of my equations as functions so that I can easily use or refer to them later if needed. However, it seems that Solve doesn't work on these.
[IN] Solve[3 x + 5 == 11, x]
[OUT] {{x -> 2}}
This is the expected behavior. But when I try to use a function,
[IN] f[x_] = 3 x + 5
f[2] (* Function is correctly definied *)
Solve[f[x] == 11, x] (* Should result in {x -> 2} *)
[OUT] 5 + 3 x
11
{}
The solution set is empty. I know there is an RSolve
but I don't think this is what I want, as I'm simply trying to substitute the equation for the function, not find a solution that is a function.
f[x]
on its own line first". Even if I evaluate the line with the function definition before using it inSolve
I get the same result. $\endgroup$f[x]
was evaluating to0
, even after I assigned it an expression. EnteringClear[f]
seemed to correct it. I'm not sure what I had done to cause me to be unable to change the expression stored inf
. Does the:=
do something different than=
?. Thanks. $\endgroup$