(I took out the latex from the post as it doesn't seem to be working)..
When you said:
Do you mean x=Asinwt+Bcoswt+(mgl_0*sin(alpha))/lambda?
Also, don't you find B by differentiating the above with respect to t, and then equating this to your initial condition of x'=0?
i.e...