Is that how to solve inverse functions for all problems or is this a special case...

Actually, you need to show that an inverse function exists.
Then you need to show that the order is not important (mathematicians say "composition is commutative") meaning, (1) (2)
Since an inverse function exists I denote it by . Then I make condition (1) true.
Since,
I subsitute my inverse function (which is ) and have, but I need it to give so I set it equal to .
---
But for high school problems composition is always commutative (you can ignore that) and the inversibility exists. So you can just procede with that step.

Is that how to solve inverse functions for all problems or is this a special case...

This will (formally) always work. Of course we might not be actually able to solve x = f(y) and we might find that the range of f(x) does not match the domain of the inverse function (and vice-versa). It may even be possible (I don't know how likely) that the domain of the inverse function winds up being empty due to a mismatch between the range of f(x) and the domain of the inverse.

This will (formally) always work. Of course we might not be actually able to solve x = f(y) and we might find that the range of f(x) does not match the domain of the inverse function (and vice-versa)?. It may even be possible (I don't know how likely) that the domain of the inverse function winds up being empty due to a mismatch? between the range of f(x) and the domain of the inverse?.

-Dan

Another question: if we have equation could we say that f=x+(1/x) or do we alwayse have to keep f and x together?

In general consider the composition of functions f(g(x)). In order for this to exist we need to have that the range of the function y = g(x) is the same as the domain of the function z = f(y), else the expression is meaningless. For example, take (range: [1, infinity) ) and (domain: (-infinity, 0] ). Then which has the empty set as a domain, and thus is a "function" that is defined nowhere.

Another question: if we have equation could we say that f=x+(1/x) or do we alwayse have to keep f and x together?

It depends on the notation. The "f" in f(x) represents an operator. As such it needs some sort of argument (ie. x) to make sense. However, we often abbreviate the notation to just "f" if the argument is not important. However, in an equation we need to know what the argument is so f=x+(1/x) is not a valid defining statement of a function. (For a variable f, yes, a function f(x), no.)