Find $\frac{\mathrm{dy}}{\mathrm{dx}}$, when
$y=(\tan x)^{\log x}+\cos ^{2}\left(\frac{\pi}{4}\right)$
Let $y=(\tan x)^{\log x}+\cos ^{2}\left(\frac{\pi}{4}\right)$
$\Rightarrow y=a+b$
where, $a=(\tan x)^{\log x} ; b=\cos ^{2}\left(\frac{\pi}{4}\right)$
$\frac{\mathrm{dy}}{\mathrm{dx}}=\frac{\mathrm{da}}{\mathrm{dx}}+\frac{\mathrm{db}}{\mathrm{dx}}$
$\left\{\right.$ Using chain rule, $\frac{\mathrm{d}(\mathrm{u}+\mathrm{a})}{\mathrm{dx}}=\frac{\mathrm{du}}{\mathrm{dx}}+\frac{\mathrm{da}}{\mathrm{dx}}$ where $\mathrm{a}$ and $\mathrm{u}$ are any variables $\}$
$a=(\tan x)^{\log x}$
Taking log both the sides:
$\Rightarrow \log a=\log (\tan x)^{\log x}$
$\Rightarrow \log a=\log x \cdot \log (\tan x)$
$\left\{\log x^{a}=a \log x\right\}$
Differentiating with respect to $\mathrm{x}$ :
$\Rightarrow \frac{\mathrm{d}(\log \mathrm{a})}{\mathrm{dx}}=\frac{\mathrm{d}(\log \mathrm{x} \log (\tan \mathrm{x}))}{\mathrm{dx}}$
$\Rightarrow \frac{\mathrm{d}(\log \mathrm{a})}{\mathrm{dx}}=\log \mathrm{x} \times \frac{\mathrm{d}(\log (\tan \mathrm{x}))}{\mathrm{dx}}+\log (\tan \mathrm{x}) \times \frac{\mathrm{d}(\log \mathrm{x})}{\mathrm{dx}}$
$\left\{\right.$ Using product rule, $\left.\frac{\mathrm{d}(\mathrm{uv})}{\mathrm{dx}}=\mathrm{u} \frac{\mathrm{dv}}{\mathrm{dx}}+\mathrm{v} \frac{\mathrm{du}}{\mathrm{dx}}\right\}$
$\Rightarrow \frac{1}{a} \frac{d a}{d x}=\log x \times \frac{1}{\tan x} \frac{d(\tan x)}{d x}+\log (\tan x)\left(\frac{1}{x} \frac{d x}{d x}\right)$
$\left\{\frac{d(\log u)}{d x}=\frac{1}{u} \frac{d u}{d x} ; \frac{d(\tan x)}{d x}=\sec ^{2} x\right\}$
$\Rightarrow \frac{1}{a} \frac{d a}{d x}=\frac{\log x}{\tan x}\left(\sec ^{2} x\right)+\frac{\log (\tan x)}{x}$
$\Rightarrow \frac{1}{a} \frac{d a}{d x}=\frac{\log x \cos x}{\sin x}\left(\frac{1}{\cos ^{2} x}\right)+\frac{\log (\tan x)}{x}$
$\left\{\tan x=\frac{\sin x}{\cos x} ; \sec x=\frac{1}{\cos x}\right\}$
$\Rightarrow \frac{1}{a} \frac{d a}{d x}=\frac{\log x}{\sin x \cos x}+\frac{\log (\tan x)}{x}$
$\Rightarrow \frac{d a}{d x}=a\left\{\frac{\log x}{\sin x \cos x}+\frac{\log (\tan x)}{x}\right\}$
Put the value of $a=(\tan x)^{\log x}$ :
$\Rightarrow \frac{d a}{d x}=(\tan x)^{\log x}\left\{\frac{\log x}{\sin x \cos x}+\frac{\log (\tan x)}{x}\right\}$
$\mathrm{b}=\cos ^{2}\left(\frac{\pi}{4}\right)$
Differentiating with respect to $\mathrm{x}$ :
$\Rightarrow \frac{\mathrm{db}}{\mathrm{dx}}=\frac{\mathrm{d}\left(\cos ^{2}\left(\frac{\pi}{4}\right)\right)}{\mathrm{dx}}$
$\left\{\frac{d u}{d x}=0\right.$, where $u$ is any constant $\}$
$\Rightarrow \frac{\mathrm{db}}{\mathrm{dx}}=0$
$\left\{\begin{array}{c}\text { Here, } \cos ^{2}\left(\frac{\pi}{4}\right) \text { is a constant value } \\ \text { As, } \frac{\pi}{4}=45^{\circ} \\ \cos ^{2}\left(\frac{\pi}{4}\right)=\cos ^{2} 45^{\circ}=\left(\frac{1}{\sqrt{2}}\right)^{2}=\frac{1}{2}\end{array}\right\}$
$\frac{d y}{d x}=\frac{d a}{d x}+\frac{d b}{d x}$
$\Rightarrow \frac{d y}{d x}=(\tan x)^{\log x}\left\{\frac{\log x}{\sin x \cos x}+\frac{\log (\tan x)}{x}\right\}+0$
$\Rightarrow \frac{d y}{d x}=(\tan x)^{\log x}\left\{\frac{\log x}{\sin x \cos x}+\frac{\log (\tan x)}{x}\right\}$