Is $\int_{\sin x}^{\cos x}x\, dx$ not a well-defined integral? Consider the integral
$$\int_a^bx\, dx$$
where $a=\sin x$, and $b=\cos x$. 
How can we evaluate this particular integral, if $a$ and $b$ are both functions of $x$, which is the variable with respect to which we are integrating?
 A: Here is another interpretation.
Formally if $b\geq a$ then $\int_a^bxdx$ is a notation for $\int_{-\infty}^{\infty}\mathbf1_{(a,b]}(x)xdx$.
Applying that here leads to: $$\int_{\sin x}^{\cos x}xdx=\int_{-\infty}^{\infty}\mathbf1_{(\sin x,\cos x]}(x)xdx$$
I do not dare to say that this is the correct way of interpreting, but it illustrates at least that your question is a good question.
Personally I go for the interpretation of Umberto.
A: The variable inside the integral is a "dummy" in that it could be replaced by any other symbol. I think you could interpret $$\int_{\sin x}^{\cos x} x \, dx$$ as a sloppy way of writing, but having the same meaning as, $$\int_{\sin x}^{\cos x} y \, dy.$$
A: The particular expression 
\begin{align*}
\int_{\sin x}^{\cos x}x\,dx\tag{1}
\end{align*} is not a well-defined integral, since (1) is not a valid expression.


*

*We have  inside the integral the integration variable $x$, indicated by $dx$. This kind of variable is called a bound variable, similarly as the index $i$ in $\sum_{i=0}^n i$.

*On the other hand $x$ is also used in the upper and lower limit of the integral, i.e. it is used as free variable, similarly as the variable $n$ in $\sum_{i=0}^ni$.

Since a variable can be only either bound or free within its scope (i.e. the range of validity of the variable) the expression (1) is not valid.

Hint: Based on experience we sometimes identify typos and are inclined to correct them with something meaningful. Nevertheless we have to be careful when doing so and when we are in doubt, we shouldn't do anything which can't be  justified by mathematical rules.
A: Doesn't matter. Just your final solution will also be a function of x.  
Proceed the usual way: find the indefinite integral $$\int  xdx=\frac{x^2}{2}$$
put limits: $a=\sin(x)$ and $b=\cos(x)$
$$=\frac{\cos^2x}{2}-\frac{\sin^2x}{2}$$
$$=\frac{\cos(2x)}{2}$$
A: Alternatively to Umberto P. you could also view it as:
$\int_A f(x) dx$ where $A$ is a set, for example an area or volume, that is further distorted by your function $f(x)$. 
In your case you would simply plug in your constraints: $A = \{a \in \mathbb{R} | \sin(x) \le a \le \cos(x) \}$ and for $f(x)$ you have of course: $f(x) = x$
A: With regards to actually evaluating the integral, I think that I would interpret it the same as drhab, that:
$$\int_{\sin x}^{\cos x}xdx=\int\mathbf1_{(\sin x,\cos x]}(x)xdx$$
and given that:
$$\int x\ dx \implies f(x) = F'(x) = x$$
we can then do (where $C$ is the constant of integration):
$$\int_{\sin x}^{\cos x} x \, dx = \frac{x^2}{2} + C$$
and then:
$$\frac{x^2}{2} \bigm|_{sin\ x}^{cos\ x}\ =\ \frac{(cos\ x)^2}{2}\ -\ \frac{(sin\ x)^2}{2}\ =\ \frac{(cos\ x)^2-(sin\ x)^2}{2}$$
finally, simplify:
$$\frac{(cos\ x)^2-(sin\ x)^2}{2}=\frac{cos\ 2x}{2}$$
