# Differentiate the following function w.r.t.$$x$$ $(x)^{\Large\cos x}+(\sin x)^{\Large\tan \: x}$

Toolbox:
• $\large\frac{dy}{dx}=\frac{du}{dx}+\frac{dv}{dx}$
• $\log m^{\large n}=n\log m$
• According to product rule we have $(uv)'=u'v+uv'$
Step 1:
$y=x^{\cos x}+\sin x^{\tan x}$
Let $y_1=x^{\cos x}$
Take $\log$ on both sides
$\log y_1=\cos x.\log x$
Diff w.r t $x$
Apply product rule
$\large\frac{1}{y_1}\frac{dy}{dx}=$$\cos x.\large\frac{1}{x}$$+\log x(-\sin x)$
$\qquad=\large\frac{\cos x}{x}$$-\sin x.\log x \therefore \large\frac{dy}{dx}=$$y_1[\large\frac{\cos x}{x}$$-\sin x\log x] \Rightarrow x^{\cos x}[\large\frac{\cos x}{x}-$$\sin x\log x]$--------(1)
Step 2:
Let $\sin x^{\tan x}=y_2$
Take $\log$ on both sides
$\log y_2=\tan x\log \sin x$
Diff.w.r.t $x$ on both sides
$\large\frac{1}{y_2}\frac{dy}{dx}=$$\tan x.\large\frac{1}{\sin x}$$\cos x+\log\sin x.\sec^2 x$
$\therefore \large\frac{dy}{dx}=$$y_2[1+\log\sin x.\sec^2x] \therefore \large\frac{dy}{dx}=$$\sin x^{\large\tan x}[1+\log\sin x.\sec^2x]$-----(2)
Step 3:
Combining equ(1) & equ(2) we get
$\large\frac{dy}{dx}$$=x^{\large\cos x}[\large\frac{\cos x}{x}$$-\sin x\log x]+\sin x^{\large\tan x}[1+\log\sin x.\sec^2x]$