Need solution for RD Sharma maths class 12 chapter Maxima and Minima exercise 17.4 question 3

Absolute maximum $=5/4$

Absolute minimum $=1$

Hint:

check the value of f(x) at end points & critical point

Given:

$f(x)=\cos ^{2} x+\sin x, x \in[0, \pi]$

Explanation:

$f^{\prime}(x)=2 \cos x(-\sin x)+\cos x$

$=\cos x(-2 \sin x+1)$

\begin{aligned} &f^{\prime}(x)=0 \\\\ &\cos x(-2 \sin x+1)=0 \\\\ &\cos x=0 \\\\ &-2 \sin x+1=0 \end{aligned}

\begin{aligned} &x=\frac{\pi}{2} \in(0, \pi) \\\\ &-2 \sin x=-1 \\\\ &\sin x=\frac{1}{2} \\\\ &x=\frac{\pi}{6}, \frac{5 \pi}{6} \in[0, \pi] \end{aligned}

Now,

\begin{aligned} &f(0)=\cos ^{2} 0+\sin 0=1 \\ &f\left(\frac{\pi}{6}\right)=\cos ^{2} \frac{\pi}{6}+\sin \frac{\pi}{6}=\left(\frac{\sqrt{3}}{2}\right)^{2}+\frac{1}{2}=\frac{3}{4}+\frac{1}{2} \\ &=\frac{5}{4} \end{aligned}

\begin{aligned} &f\left(\frac{5 \pi}{6}\right)=\cos ^{2} \frac{5 \pi}{6}+\sin \frac{5 \pi}{6} \\ &=\left(\cos \left(\pi-\frac{\pi}{6}\right)\right)^{2}+\sin \left(\pi-\frac{\pi}{6}\right) \end{aligned}

\begin{aligned} &=\cos ^{2} \frac{\pi}{6}+\sin \frac{\pi}{6} \\ &=\left(\frac{\sqrt{3}}{2}\right)^{2}+\frac{1}{2}=\frac{5}{4} \end{aligned}

$f(\pi)=\cos ^{2} \pi+\sin \pi=(-1)^{2}+0=1$

Hence,

Absolute Maximum $=5 / 4 \text { in } \pi / 6,5 \pi / 6$

Absolute minimum $=1 \text { in } 0, \pi$