we know that the maclaurin expansion $\sin x$ $$ \sin x = x-\frac{x^3}{3!}+\frac{x^5}{5!}+\cdots+\frac{(-1)^{(n-1)}x^{(2n+1)}}{(2n+1)!}+\cdots$$
$$\int \sin x dx=\int xdx -\int\frac{x^3}{3!}dx+\cdots $$
$$\implies \int \sin x dx=\frac{x^2}{2!}-\frac{x^4}{4!}+\cdots+(-1^{n-1})\frac{x^{2n+2}}{(2n+2)!}+\cdots$$ $$\implies \int \sin x dx= 1+ -(\cos x)$$ But isn't $\int \sin x dx=-\cos x$ Why is it incorrect, is there something we can add to taylor expansion of $\sin x$ such that it remains unaffected and this problem is solved? Thanks for the answer.
The equality$$\int\sin x\,\mathrm dx=1-\cos x$$means that $1-\cos x$ is a primitive of $\sin x$. There is no contradiction here.