By Cauchy-Schwarz inequality, we have
(pm+qn)2⩽(sinxp+cosxq)(msinx+ncosx)
Equality holds if and only if msinxsinxp=ncosxcosxq. Hence,
tanx=mqnp
Also,
(msinx+ncosx)2=(am⋅asinx+bn⋅bcosx)2
⩽(a2m2+b2n2)(a2sinx+b2cosx)⩽(a2m2+b2n2)a4+b4
Equality holds if and only if tanx=b2a2,a2m2a2sinx=b2n2b2cosx, i.e., tanx=a4n2b4m2=b2a2. Hence,
nm=b3a3,tanx=(nm)32
And
msinx+ncosx⩽(m34+n34)43,
Thus,
(nm)32=mqnpnm=(qp)53
Let m=p53,n=q53, then
sinxp+cosxq⩾(m34+n34)43(pm+nq)2=(p54+q54)45,
Equality holds if and only if tanx=(nm)32=[(qp)53]32=(qp)52.