Problem: If $f(x,y)=\int^x_y \cos(t^2) \, dt$, find the first partial derivatives of the function.
My thoughts: By the Fundamental Theorem of Calculus, I know that $f_x=\cos(x^2)$, since $y$ is just treated as a constant.
But what about $f_y$? Am I right in assuming that it would be $-\cos(x^2)$, since $\int^x_a f(t) \, dt=-\int^a_x f(t) \, dt$? Or are things more complicated than that?
The way I would think of this (because it works better in more complicated situations where the limits are functions of $x$ and $y$) is to let $g$ be an antiderivative of $t \mapsto \cos t^2$. Then the Fundamental Theorem of Calculus tells us that $$ f(x,y)=g(x)-g(y) $$ which is easy to take partial derivatives of when you remember that $g'(t)=\cos t^2$.
But your way works too (except for the issue I mentioned in the comments).