There are some cases in which we can get the exact value of such a function. Define
If $n$ is a positive integer, then $\varphi(x,nx)=n\varphi(x)$. Note that $k$ is coprime with $x$ if and only if $k+x$ is.
If $x\ge 4$ is even, then $x/2$ is not coprime with $x$, and $k$ is coprime with $x$ if and only if $x-k$ is, so
With a similar argument we get this formula for odd $x\ge 3$:
For $x\le 2$ it is obvious that