Assume the following integral:
$$\int \sin x \cos x\ \ dx $$
My understanding now is, that I can choose both for $f(x)$ and $g'(x)$ respectively, leading to different results:
$$f(x) = \sin x$$ $$g'(x) = \cos x$$ Leads to the result: $$\frac{\sin^2x}{2} + c$$
Switching it around: $$f(x) = \cos x$$ $$g'(x) = \sin x$$ Leads to: $$-\frac{\cos^2x}{2} + c$$
Now, I know that deriving both results will give $\sin x \cos x$, so I guess it is correct, but I just find it strange that there are different possible results. According to this question this is not a problem, so what I am asking here is simply:
- If I derive the result of my integration and I get back the original term, is this sufficient to know that my answer is correct or are there cases where deriving the result yields the original term but the result is still incorrect?
- (Less important) Are both my answers correct?