Here is how I would do this problem:
The differential equation is \(\displaystyle L\frac{di}{dt}+ Ri= Vs sin(\omega t)\). The associated homogeneous equation is \(\displaystyle L\frac{di}{dt}+ Ri= 0\) or \(\displaystyle L\frac{di}{i}= -dt\). Integrating both sides, \(\displaystyle L ln(i)= -t+ C\) or \(\displaystyle i(t)= C'e^{-t/L}\).
To find a solution to the entire equation, we look for a solution of the form \(\displaystyle i(t)= A cos(\omega t)+ Bsin(\omega t)\) so that \(\displaystyle \frac{di}{dt}= -A\omega sin(\omega t)+ B sin(\omega t)\) and the equation becomes \(\displaystyle -AL\omega sin(\omega t)+ BL\omega cos(\omega t)+ RA cos(\omega t)+ RB sin(\omega t)= (RB- AL\omega)sin(\omega t)+ (BL\omega+ RA)cos(\omega t)= Vs sin(\omega t)\).
Your solutions don't look right to me but to answer your question, you need to use the trig identity \(\displaystyle cos(A+ B)=sin(A)cos(B)+ cos(A)sin(B)\). Then also \(\displaystyle cos(A- B)= sin(A)cos(B)- cos(A)sin(B)\) because sine is an "odd" function while cosine is an "even" function. Adding the two equations, \(\displaystyle 2sin(A)cos(B)= cos(A+ B)+ cos(A- B)\).
Here is how I would do this problem:
Your equation is \(\displaystyle L\frac{di}{dt}+ Ri= Vs sin(\omega t)\). The Associated homogeneous equation is \(\displaystyle \frac{di}{dt}= -Ri\) which can be written as \(\displaystyle \frac{di}{i}= -\frac{R}{L}dt\). Integrating both sides, \(\displaystyle ln(i(t))= -\frac{R}{L}t+ C\) or \(\displaystyle i(t)= C'e^{-\frac{R}{L}t}\).
To find a solution to the entire equation, look for a solution of the form \(\displaystyle i(t)= A sin(\omega t)+ B cos(\omega t)\). Then \(\displaystyle \frac{di}{dt}= -A\omega cos(\omega t)+ B\omega sin(\omega t)\) and the equation becomes \(\displaystyle -AL\omega cos(\omega t)+ BL\omega sin(\omega t)+ AR sin(\omega t)+ BR cos(\omega t)= (BR- AL)cos(\omega t)+ (BL+ AR) sin(\omega t)= Vs sin(\omega t)\).
In order that this be true for all t we must have the coefficients of \(\displaystyle sin(\omega t)\) and of \(\displaystyle cos(\omega t)\) the same for both sides: \(\displaystyle RB- AL\omega = Vs\) and \(\displaystyle BL+ RA= 0\). To eliminate A, multiply the first equation by R, the second equation by \(\displaystyle L\omega\) and add: \(\displaystyle R^2B- RAL= RVs\) added to \(\displaystyle BL^2\omega+ RAL= 0\) is \(\displaystyle (R^2+ L^2\omega)B= RVs\) so \(\displaystyle B= \frac{RVs}{R^2+ L^2\omega}\). Then \(\displaystyle BL+ RA= 0\) becomes \(\displaystyle RA= -BL= -\frac{RLVs}{R^2+ L^2\omega}\) and then \(\displaystyle A= -\frac{LVs}{R^2+ L^2\omega}\).
So the general solution to the differential equation is \(\displaystyle i(t)= -\frac{LVs}{R^2+ L^2\omega}cos(\omega t)+ \frac{RVs}{R^2+ L^2\omega}sin(\omega t)+ C' e^{-t/L}\).
If we also have the initial condition that i(0)= 0 then
\(\displaystyle i(o)= -\frac{LVs}{R^2+ L^2\omega}+ C'= 0\) so that \(\displaystyle C'= \frac{LVs}{R^2+ L^2\omega}\) and the solution to the initial value problem is
\(\displaystyle i(t)= -\frac{LVs}{R^2+ L^2\omega}cos(\omega t)+ \frac{RVs}{R^2+ L^2\omega}sin(\omega t)+ \left(\frac{LVs}{R^2+ L^2\omega}\right) e^{-t/L}\).