How to change the order of integration for this? So I can change order of integration for simple functions through the use of diagram but how do i do it for $$\int_{0}^{\pi}\int_{0}^{\sin x}f(x, y)dydx?$$

So y goes from 0 to 1 but the functions needs to be split at $\pi/2$ when we consider the $x$ direction so in the $x$ direction it goes from $x=\sin^{-1}y$ to $\pi/2$ and then $\pi/2$ to $x=\sin^{-1}y$ or something? This question has been asked before but i don't think the asker does it the way i do so didn't see a good answer
 A: Here, in red is the graph of
$$ y=\pi-\arcsin(x)$$
To apply this to the problem, we need the inverse
$$ x=\pi -\arcsin(y) $$
which is 'inverse' of $y=\sin(x)$ for $\frac{\pi}{2}\le x\le\frac{3\pi}{2}$
This is the inverse function you need to integrate the other half when reversing the order of integration.

Addendum: Since you are still unsatisfied with the answers given so far, I will add the following additional bit of explanation.

Clearly, the sine function is not one-to-one on the interval $\left[0,\pi\right]$. However, it is one-to-one on the intervals $\left[0,\frac{\pi}{2}\right]$ and $\left[\frac{\pi}{2},\pi\right]$ and clearly the inverse functions on those two intervals will involve $\sin^{-1}x$.
Since the inverse function is defined only on $\left[-\frac{\pi}{2},\frac{\pi}{2}\right]$ we know that $X=\sin^{-1}$. But for $x$ in $\left[\frac{\pi}{2},\pi\right]$, this cannot be the case.
Now notice that each $x$ in the interval $\left[0,\frac{\pi}{2}\right]$ has a "mirror image" $X$ in the vertical line $x=\frac{\pi}{2}$.
Since $\frac{\pi}{2}$ is half-way between $X$ and $x$ it is their average. So
\begin{eqnarray}
\frac{X+x}{2}&=&\frac{\pi}{2}\\
X+x&=&\pi\\
x&=&\pi-X\\
x&=&\pi-\sin^{-1}y
\end{eqnarray}
So when reversing the order of integration we know that $y$ moves between the values of $0$ and $1$ and $x$ goes between the values of $\sin^{-1}y$ and $\pi-\sin^{-1}y$, giving
$$ \int_0^1\int_{\sin^{-1}y}^{\pi-\sin^{-1}y}f(x,y)\,dxdy $$
A: $$\int_{0}^{\pi}\int_{0}^{\sin x}f(x, y)dydx=\\ \int_{0}^{1}\int_{\sin^{-1} y}^{\pi /2}f(x, y)dxdy +\\    \int_{0}^{1}\int_{\pi /2}^{\pi-\sin^{-1}y}f(x, y)dxdy              $$
A: The points on the upper boundary are of the form $(x,y) =(x,\sin x)$, and when $y$ is in $[0,\frac\pi2]$ you can rewrite them as $(x,y)=(\arcsin y,y)$ because $\arcsin y$ exists there. However, you can’t use $\arcsin y$ for $y$ in $(\frac\pi2,\pi]$ because it isn’t defined there. You have to come up with your own “analytical continuation” of $\arcsin y$ for $y \in (\frac\pi2,\pi]$, which happens to be $\pi -\arcsin y$.
\begin{align} 
\int_0^\pi \int_0^{\sin x} f(x,y) \ {\rm d}y \ {\rm d}x 
&=\int_0^\frac\pi2 \int_0^{\sin x} f(x,y) \ {\rm d}y \ {\rm d}x +\int_\frac\pi2^\pi \int_0^{\sin x} f(x,y) \ {\rm d}y \ {\rm d}x \\ 
&=\int_0^1 \int_{\arcsin y}^\frac\pi2 f(x,y) \ {\rm d}x \ {\rm d}y +\int_0^1 \int_\frac\pi2^{\pi-\arcsin y} f(x,y) \ {\rm d}x \ {\rm d}y \\ 
&=\int_0^1 \int_{\arcsin y}^{\pi-\arcsin y} f(x,y) \ {\rm d}x \ {\rm d}y. 
\end{align}
Another way is to shift the whole region a little to the left. The function $\arccos y$ doesn’t exist for $y<0$ but picturing how to overcome that is kind of more intuitive: 
\begin{align}
\int_0^\pi \int_0^{\sin x} f(x,y) \ {\rm d}y \ {\rm d}x
&=\int_{-\frac\pi2}^\frac\pi2 \int_0^{\sin (x+\frac\pi2)} f(x+\tfrac\pi2,y) \ {\rm d}y \ {\rm d}x \\
&=\int_{-\frac\pi2}^\frac\pi2 \int_0^{\cos x} f(x+\tfrac\pi2,y) \ {\rm d}y \ {\rm d}x \\
&=\int_{-\frac\pi2}^0 \int_0^{\cos x} f(x+\tfrac\pi2,y) \ {\rm d}y \ {\rm d}x +\int_0^\frac\pi2 \int_0^{\cos x} f(x+\tfrac\pi2,y) \ {\rm d}y \ {\rm d}x \\
&=\int_0^1 \int_{-\arccos y}^0 f(x+\tfrac\pi2,y) \ {\rm d}x \ {\rm d}y +\int_0^1 \int_0^{\arccos y} f(x+\tfrac\pi2,y) \ {\rm d}x \ {\rm d}y \\
&=\int_0^1 \int_{-\arccos y}^{\arccos y} f(x+\tfrac\pi2,y) \ {\rm d}x \ {\rm d}y.
\end{align}
