#### Need solution for RD Sharma maths class 12 chapter Differentiation exercise 10.5 question 3

Answer: $(1+\cos x)^{x}\left[\left(-\frac{x \sin x}{1+\cos x}\right)+\log (1+\cos x)\right.$

Hint: Differentiate by $\cos ^{n}x$

Given: $(1+\cos x)^{x}$

Solution:Let $y=(1+\cos x)^{x}$            ...........(i)

Taking log on both the sides,

\begin{aligned} &\log y=\log (1+\cos x)^{x} \\\\ &\log y=x \log (1+\cos x) \end{aligned}

Differentiating with respect to $x$,

$\frac{1}{y} \frac{d y}{d x}=x \frac{d}{d x} \log (1+\cos x)+\log (1+\cos x) \frac{d}{d x}(x)$        [Using product rule]

\begin{aligned} &\frac{1}{y} \frac{d y}{d x}=x \frac{1}{(1+\cos x)} \frac{d}{d x}(1+\cos x)+\log (1+\cos x)(1) \\\\ &\frac{1}{y} \frac{d y}{d x}=\frac{x}{(1+\cos x)}(0-\sin x)+\log (1+\cos x) \end{aligned}

\begin{aligned} &\frac{1}{y} \frac{d y}{d x}=\log (1+\cos x)-\frac{x \operatorname{som} x}{(1+\cos x)} \\\\ &\frac{d y}{d x}=y\left[\log (1+\cos x)-\frac{x \sin x}{1+\cos x}\right] \end{aligned}

$\frac{d y}{d x}=(1+\cos x)^{x}\left[\log (1+\cos x)-\frac{x \sin x}{(1+\cos x)}\right]$        [Using equation (i)]