The maximum value of a cosx+b sinx is
[MNR 1991; MP PET 1999; UPSEAT 2000]
Let f(x) = a cos x + b sin x
Suppose that a = rsinθ and b = rcosθ i.e., r = √a2+b2
Now, f(x) = rsinθcosx+rcosθsinx
= √a2+b2 {sin(θ+x)}
But −1≤sin(θ+x)≤1 ⇒ −r≤rsin(θ+x)≤r
⇒ -√a2+b2 ≤ √a2+b2 sin(θ+x) ≤ √a2+b2
Thus, maximum value of f(x) is √a2+b2.