Amplitude of a sin + cos expression used in SHM

In class there was a query about the form of the equation: A = BcosDx + CsinDx. This simple example allows you to change parameters A B C D and gives the value of the magnitude (Amplitude) of the resultant: A = sqrt(B^2 + D^2).