Find the inverse of $f(x)=\sin(3x-1)$ over the domain $\left[\frac{2-\pi}{6},\frac{2+\pi}{6}\right]$ So I'm preparing for my further studies (last year of high school, preparing so I can try and join the academy that I want), and just solving problems. Got stuck on this one:

Find the inverse of $$f(x)=\sin(3x-1)$$ in the domain of $x \in \left[\dfrac{2-\pi}{6}, \dfrac{2+\pi}{6}\right]$.

What I've tried so far is:
$f(x) = y\\y=\sin(3x-1)\\y = \sin(3x)\cos(1)-\cos(3x)\sin(1)$
At this point I have no idea what to do, I thought of trying to split $3x=2x+x$ and continuing but it would be too messy.
 A: Hint: If $$y=\sin(3x-1)$$ then $$\arcsin(y)=3x-1$$
A: HINT:


*

*Rearrange the equation so you have $x$ in terms of $f(x)$

*Write down a domain for this inverse function, by considering the possible values of $\arcsin$
A: You are probably over thinking about the simple thing.
Recall the definition of Inverse of a function.

In mathematics, an inverse function (or anti-function) is a function that "reverses" another function: if the function f applied to an input x gives a result of y, then applying its inverse function g to y gives the result x, and vice versa, i.e., f(x) = y if and only if g(y) = x.

To write an inverse of a function, you have to represent the whole function of $x$ in $f(x)$ or $y$. What I mean from this is:
$f(x) = sin(3x - 1)$
You can call $f(x)$ as $y$.
$y = sin(3x - 1)$
Now write the whole function of x in terms of y.
$\sin^{-1}(y) = 3x - 1$

$(\sin^{-1}(y) + 1)/3 = x$
And this is your inverse function.

Now if you want to write it in terms of π or more precisely, you can write 1 as $(\sin^{-1}(π/2)$ and apply $sin(A) + sin(B)$.
A: The equation $\sin(3x-1)=y$ has the solutions
$$
3x-1=\arcsin y+2k\pi
\qquad\text{or}\qquad
3x-1=\pi-\arcsin y+2k\pi
$$
Since you know that $\frac{2-\pi}{6}\le x\le\frac{2+\pi}{6}$, you also have
$$
3\frac{2-\pi}{6}-1\le 3x-1\le 3\frac{2+\pi}{6}-1
$$
that is,
$$
-\frac{\pi}{2}\le 3x-1\le\frac{\pi}{2}
$$
so we have to take the solution from the first family, with $k=0$, because by definition $-\pi/2\le\arcsin y\le\pi/2$.
Thus $3x-1=\arcsin y$ and therefore
$$
x=\frac{1}{3}(1+\arcsin y)
$$
The inverse is the function, defined over $[-1,1]$,
$$
g(y)=\frac{1}{3}(1+\arcsin y)
$$
Different domains for $\sin(3x-1)$ would lead to different determinations of the family of solutions or of $k$. For instance, the inverse of $f(x)=\sin(3x-1)$ over $\bigl[\frac{\pi+2}{6},\frac{3\pi+2}{6}\bigr]$ would be
$$
g(y)=\frac{1}{3}(1+\pi-\arcsin y)
$$
