Find the maximum value of y = sin x + 2cos x
first differentiate the function
dy/dx = cosx - 2sinx
put dy/dx = 0
cosx - 2sinx = 0
tanx = 1/2
x = tan-1 (1/2) This value of x should give you maximum value of function.
tanx = 1/2
but we have cosx and sinx in the given function, so convert tanx into them
On squaring
tan2 x = 1/4
1 + tan2 x = 1 + 1/4 = 5/4
1 + tan2 x = sec2 x = 5/4
sec x = √5/4
cos x = 2/√5
sin x = (tan x)(cosx) = (1/2) (2/√5) = 1/√5
You have both cos and sin values so substitute them in the function.
y = 1/√5 + 2x2/√5 = (1 + 4)/√5 = 5/√5 = √5
y(maximum) = √5