Differentiation

Find $\dfrac{dy}{dx}$ if $y = \left(x\right)^{\cos x} + \left(\sin x\right)^{\tan x}$


Let $y = p\left(x\right) + q\left(x\right)$ where $p\left(x\right) = \left(x\right)^{\cos x}$ and $q\left(x\right)=\left(\sin x\right)^{\tan x}$

Then $\dfrac{dy}{dx} = \dfrac{dp}{dx} + \dfrac{dq}{dx}$

$p = \left(x\right)^{\cos x}$

$\therefore$ $\log p = \log \left(x\right)^{\cos x} = \cos x \log \left(x\right)$

$\therefore$ $\dfrac{1}{p} \dfrac{dp}{dx} = \dfrac{\cos x}{x} - \sin x \log \left(x\right)$

$\therefore$ $\dfrac{dp}{dx} = p \left[\dfrac{\cos x}{x} - \sin x \log \left(x\right)\right]$

i.e. $\dfrac{dp}{dx} = \left(x\right)^{\cos x} \left[\dfrac{\cos x}{x} - \sin x \log \left(x\right)\right]$

$q = \left(\sin x\right)^{\tan x}$

$\therefore$ $\log q = \log \left(\sin x\right)^{\tan x} = \tan x \log \left(\sin x\right)$

$\therefore$ $\dfrac{1}{q} \dfrac{dq}{dx} = \dfrac{\tan x}{\sin x} \times \cos x + \sec^2 x \log \left(\sin x\right)$

i.e. $\dfrac{1}{q} \dfrac{dq}{dx} = 1 + \sec^2 x \log \left(\sin x\right)$

$\therefore$ $\dfrac{dq}{dx} = q \left[1 + \sec^2 x \log \left(\sin x\right)\right]$

i.e. $\dfrac{dq}{dx} = \left(\sin x\right)^{\tan x} \left[1 + \sec^2 x \log \left(\sin x\right)\right]$

$\therefore$ $\dfrac{dy}{dx} = \left(x\right)^{\cos x} \left[\dfrac{\cos x}{x} - \sin x \log \left(x\right)\right] + \left(\sin x\right)^{\tan x} \left[1 + \sec^2 x \log \left(\sin x\right)\right]$