There are several mistakes which are probably just the result of sloppy writing, but can also lead to some wrong results:
- The function $f(x)$ is not equal to $\cos \arcsin x$. If $f(y)=\cos y$, then $f(x)=\cos x$. I believe what you want to write down is $f(y(x))$.
- Second of all, you write that the range of $\arcsin$ is $\left[-\frac\pi2, \frac\pi2\right]$ which is true, but then you say "which is also the domain of $\cos y$", and this is not true. The domain of $\cos y$ is $\mathbb R$.
Other than that, it's hard to give you a full answer because I don't understand your question. Do you want to write down the domain of the function $\cos\arcsin x$? Then that domain is equal to the domain of $\arcsin x$, which is $[-1,1]$. Or do you also want to calculate the range?
The reason for domain restrictions is mainly because we want the "trig functions" to truly be functions in the strict mathematical sense.
That means for every element in the domain the function must produce exactly one function value.
Now one thing about functions is they don't always work equally well in both directions.
The definition of a function says you can get from any point in the domain to a unique point in the range; it says nothing about going from the range to the domain.
As a real-life analogy, there are machines that can turn standing trees into wood chips, but not (yet) any machine that can turn wood chips into a standing tree.
When a function $f$ has a genuine inverse function $f^{-1},$ the inverse really does reverse the effect of the original function:
$f^{-1}(f(x)) = x$ for any $x$ in the domain of $f.$
This works only for a function that is one-to-one, that is, when each value in the range comes from just one unique value in the domain.
As soon as you find even two values in the domain of a function that give the same output value when you use them as input to your function, you know there will not be a genuine inverse function.
The best we can do in cases like that is choose part of the domain of the original function, throw the rest away, and construct a limited "inverse" function that maps the range back to that part of the original function's domain.
So it is reasonable to expect that the domain of the inverse function will be the range of the original function (it certainly cannot be more than that), but it is not reasonable to expect in general that the range of the inverse function will be the domain of the original function. That only works when the original function is one-to-one.
The sine and cosine functions are not one-to-one, so it will not be the case that the range of $\arcsin(y)$ will be the domain of $\sin(x)$
or that you will have $\arccos(\cos(x)) = x$ for every number $x.$
The solution is not to redefine the original function so that it is invertible,
such as by making $\cos(x)$ undefined except when $0 \leq x \leq \pi$
(the range of $\arccos$).
Functions like the sine and cosine are far too useful when we allow them to be many-to-one (multiple input values $x$ that can produce the same output result $f(x)$);
we'd be giving up too much to make them truly invertible.
So we put up with an asymmetric situation: $\cos(x)$ is defined for all $x,$
but $\arccos(y)$ can only "get back" to a small subset of the values for which
$\cos(x)$ is defined, and we choose that subset to be $[0,\pi].$
Best Answer
Since $f$ is a rational function, the only restriction that we need to impose on the domain of $f$ will be to exclude values of $x$ for which the denominator of $f$ is zero$\ast$, since dividing by zero is an undefined operation. The denominator equals zero when $x = -\frac{1}{2}$, so the domain of $f$ will consist of all real number except for $-\frac{1}{2}$. If we felt inclined to, we could express this domain as either of the following: $$ \left(-\infty,-\frac{1}{2}\right) \cup \left(-\frac{1}{2},\infty\right)\qquad\qquad \mathbb{R}\setminus\left\{-\frac{1}{2}\right\} $$
Now for the range of $f$, we need to find the set of all $y$ for which there exists some $x$ where $$y = \frac{x-5}{2x+1}\,.$$ We can rearrange this equation, solving for $x$ in terms of $y$, to give us an explicit formula for which $x$ will result in a given $y$. Then we can determine the range of $f$ by noting for which $y$ the formula will be undefined. $$\begin{align*} y &= \frac{x-5}{2x+1} \\[0.7em] (2x+1)y &= x-5 \\[0.7em] 2xy-x &= -5-y \\[0.7em] x &= -\frac{5+y}{2y-1} \end{align*}$$ This formula is defined for all $y \neq \frac{1}{2}$; for every other real number $y$ we can use this formula to find a corresponding $x$ such that $f(x)=y$. So $\frac{1}{2}$ is the only value which is not in the range of $f$, and we can express the range of $y$ as either of the following:
$$ \left(-\infty,\frac{1}{2}\right) \cup \left(\frac{1}{2},\infty\right)\qquad\qquad \mathbb{R}\setminus\left\{\frac{1}{2}\right\} $$
$\ast$ Thoroughly justifying this statement is kinda complicated. I wouldn't expect my precalculus class to justify this. I suppose if you really wanted to though, you could proceed by showing $f$ can be written as a composite of the functions $$ r(x) = \frac{1}{x} \qquad S_a(x) = ax \qquad T_b(x) = x+b \qquad\text{for } a,b \in \mathbb{R}\,, $$ and since $S_a$ and $T_b$ are bijective functions $\mathbb{R} \to \mathbb{R}$, so the only domain restrictions we have to impose on $f$ are those that come from the function $r$.