Answer: \(k=3\); \(x=\pm0.955,\ \pm2.19\); \(\frac{\mathrm dy}{\mathrm dx}=\frac{2\sqrt{x}-1}{2\sqrt{x}\cos^2(x-\sqrt{x})}\); integral \(=2\tan(x-\sqrt{x})+C\).
We start with the main method. Use the product, chain and standard trigonometric derivative rules carefully.
(a)(i) Differentiate
\(y=3\sin^2x+\cos x.\)
Then
\(\frac{\mathrm dy}{\mathrm dx}=6\sin x\cos x-\sin x.\)
Now
\(\cot x\frac{\mathrm dy}{\mathrm dx} =\frac{\cos x}{\sin x}(6\sin x\cos x-\sin x) =6\cos^2x-\cos x.\)
Therefore
\(y+\cot x\frac{\mathrm dy}{\mathrm dx} =3\sin^2x+\cos x+6\cos^2x-\cos x.\)
So
\(y+\cot x\frac{\mathrm dy}{\mathrm dx}=3\sin^2x+6\cos^2x.\)
Using \(\sin^2x=1-\cos^2x\),
\(3\sin^2x+6\cos^2x=3(1-\cos^2x)+6\cos^2x=3(1+\cos^2x).\)
Hence \(k=3\).
(a)(ii) Solve
\(3(1+\cos^2x)=4.\)
This gives
\(\cos^2x=\frac13.\)
So \(\cos x=\pm\frac1{\sqrt3}\). For \(-\pi\leq x\leq\pi\), the solutions are
\(x=\pm0.955,\quad \pm2.19\) radians.
(b)(i) For \(y=\tan(x-\sqrt{x})\), use the chain rule:
\(\frac{\mathrm dy}{\mathrm dx}=\sec^2(x-\sqrt{x})\left(1-\frac1{2\sqrt{x}}\right).\)
Thus
\(\frac{\mathrm dy}{\mathrm dx} =\frac{2\sqrt{x}-1}{2\sqrt{x}\cos^2(x-\sqrt{x})}.\)
(b)(ii) The integrand is twice the derivative found in part (b)(i):
\(\frac{2\sqrt{x}-1}{\sqrt{x}\cos^2(x-\sqrt{x})} =2\cdot\frac{2\sqrt{x}-1}{2\sqrt{x}\cos^2(x-\sqrt{x})}.\)
Therefore
\(\int\frac{2\sqrt{x}-1}{\sqrt{x}\cos^2(x-\sqrt{x})}\,\mathrm dx =2\tan(x-\sqrt{x})+C.\)
This completes the solution and gives the required result.