How to compute the integral $\int \cos x dy$? [closed]
I'm trying to find $$\int \cos x dy.$$
I know that if I have to differentiate the same "thing" w.r.t $y$, then chain rule could be used to get $$- \sin x\frac{dx}{dy}.$$
But I'm unable to find the integral w.r.t $y$.
I entered it in some online calculators, and the answer I got was $$y \cos x + C.$$
Can somebody explain how to get this?
I know this is a very elementary problem, but still I'm struggling with the answer. It would be better if you find the answer using only elementary calculus.
$\endgroup$ 12 Answers
$\begingroup$When you integrate with respect to $y$, you regard $x$ as just a constant.
It's just like how $\int 2\, dy = 2y + C$. As far as the integral is concerned, $2$ is just a constant.
Similarly, $\cos x$ is just a constant as far as $\int \cos x\, dy$ is concerned, because it's an integral with respect to $y$ and not $x$.
$\endgroup$ 0 $\begingroup$When you want to find
$$\int \cos x dy$$
the $dy$ part means you want, as you noted, to integrate with respect to $y$. That means all other variables are to be viewed, inside the integral, as constants. As you know, when integrating you can put multiplicative constants out of the integral:
$$\int af(x)\ dx = a\int f(x)\ dx$$
Therefore
$$\int \cos x dy = \int \cos x \cdot 1\ dy = \cos x\cdot\int 1dy = cos x\cdot y$$
$\endgroup$