Step 1: Understanding the Concept:
Let \(F(x)=e^x\) with \(F'=f\), and \(G(x)=\cos x\) with \(G'=g\). Then \(f=e^x\) and \(g=-\sin x\).
Step 2: Rewrite the integrals:
\(\int f\cos x\,dx=\int F'G\,dx\). And \(\int g\,e^x\,dx=\int G'F\,dx\).
Step 3: Add:
\[ \int(F'G+FG')dx=\int(FG)'dx=FG+c \]
Step 4: Substitute:
\(FG=e^x\cos x\). So the sum is \(e^x\cos x+c\).
Step 5: Verify directly:
\(\int e^x\cos x\,dx+\int(-\sin x)e^x\,dx\). The first is \(\tfrac{e^x}{2}(\cos x+\sin x)\) and the second is \(-\tfrac{e^x}{2}(\sin x-\cos x)\). The sum is \(e^x\cos x\). Option (C).
Final Answer:
The sum is e^x cos x + c.
\[ \boxed{e^x\cos x+c} \]