Analysis of simple RC circuit
From your comments I'm assuming you already found the differential equation to solve, so I'll start from there:

\$v_C + \frac{1}{2}\frac{dv_C}{dt} = 10 \cos(2t)\$

Finding the homogeneous solutions

\$v_C + \frac{1}{2}\frac{dv_C}{dt} = 0\$

We can find from \$1 + \frac{1}{2}\lambda = 0\$ that \$\lambda = -2\$. Our homogeneous solution will therefore be:

\$v_{C,h} = A\cdot e^{-2t}\$

Finding the particular solution

\$v_C + \frac{1}{2}\frac{dv_C}{dt} = f(t)\$ where \$f(t) = 10 \cos(2t)\$

We therefore try a particular solution of

\$v_{C,p} = B \cos(kt) + C \sin(kt) + D\$

\$\frac{dv_{C,p}}{dt} = -Bk \sin(kt) + Ck \cos(kt)\$

Now we need to find out \$B, C\$ and \$D\$.

\$\left(B\cos(kt) + C\sin(kt) + D\right) + \frac{1}{2}\left(-Bk\sin(kt) + Ck\cos(kt)\right)=10\cos(2t)\$

We find that \$k = 2\$, \$B + C = 10\$, \$B - C = 0\$ and \$D = 0\$. This gives us simply:
\$k = 2, B = C = 5, D = 0\$.

Finding the total solution

The total solution is the sum of the homogeneous and the particular solution. We also still need to match the initial conditions. We find that

\$v_C = v_{C,h} + v_{C,p} = Ae^{-2t} + 5\cos(2t) + 5\sin(2t)\$

To find \$A\$ we can plug in our initial condition for \$v_C\$:

\$v_C(t=0) = A + 5 = 0 \Rightarrow A = -5\$.

So the final solution is

\$v_C = -5e^{-2t} + 5\cos(2t) + 5\sin(2t)\$