Question 348596
{{{21cos(x)+20sin(x)}}} can be written in the form {{{Asin(x+b)}}} where A>0  and {{{-pi<b<pi}}}

Cheers in advance
<pre>
Assume:

{{{A*sin(x+b) = 21cos(x)+20sin(x)}}}

{{{A(sin(x)cos(b) + cos(x)sin(b)) = 21cos(x)+20sin(x)}}}

Let {{{x = 0}}}

{{{A(sin(0)cos(b) + cos(0)sin(b)) = 21cos(0)+20sin(0)}}}

{{{A(0*cos(b)+1*sin(b)) = 21(1)+20(0)}}}

{{{A(0+sin(b))=21}}}

{{{Asin(b) = 21}}}

--------------------------------------
Now go back to:

{{{A(sin(x)cos(b) + cos(x)sin(b)) = 21cos(x)+20sin(x)}}}

And now let {{{x = pi/2}}}

{{{A(sin(pi/2)cos(b) + cos(pi/2)sin(b)) = 21cos(pi/2)+20sin(pi/2)}}}

{{{A(1*cos(b)+0*sin(b)) = 21(0)+20(1)}}}

{{{A(cos(b)+0)=0+20}}}

{{{Acos(b) = 20}}}

-------------------------

So we have this system of equations:

{{{system(Asin(b) = 21, Acos(b) = 20)}}}

Dividing equals by equals:

{{{(A(sin(b)))/(A(cos(b)))=21/20}}}

{{{(cross(A)(sin(b)))/(cross(A)(cos(b)))=21/20}}}

{{{sin(b)/cos(b)=21/20}}}

{{{tan(b)=21/20}}}

{{{b="tan"^(-1)}}}{{{(21/20)}}} 


Draw a right triangle with horizontal leg 20 and vertical leg 21,
so the angle at the bottom left will have tangent {{{21/20}}}, and
therefore be equal to b. 

{{{drawing(200,200,-1,22,-1,22, triangle(0,0,20,0,20,21),
rectangle(18,0,20,2), locate(2,2,b), locate(10,1.7,20),
locate(18,10.5,21), locate(9.6,10.5,29),
red(arc(0,0,10,-10,0,46.39718103))

)}}} and by the Pythagorean theorem {{{matrix(5,1,

hypotenuse^2=20^2+21^2,
hypotenuse^2=400+441,
hypotenuse^2=841,
hypotenuse=sqrt(841),
hypotenuse=29)}}}

Since

{{{Asin(b) = 21}}}

{{{A(21/29)=21}}}

{{{21A = 21*29}}}

{{{A = (21*29)/21}}}

{{{A = (cross(21)*29)/cross(21)}}}

{{{A = 29}}}

Therefore  {{{A=29}}} and {{{b="tan"^(-1)}}}{{{(21/20)}}}

and:

{{{21cos(x)+20sin(x)=A*sin(x+b)}}}
{{{21cos(x)+20sin(x)}}}{{{""=""}}}{{{29*"sin(x"}}}{{{""+""}}}{{{"tan"^(-1))}}}{{{21/20}}}{{{")"}}}

Edwin</pre>