Let y = (tan x)log x + cos2\(\big(\cfrac{\pi}4\big)\)
⇒ y = a + b
where, a = (tan x)log x; b = cos2\(\big(\cfrac{\pi}4\big)\)

\(\Bigg\{\) Using chain rule, \(\cfrac{d(u +a)}{d\text x}=\cfrac{du}{d\text x}+\cfrac{da}{d\text x}\) where a and u are any variables \(\Bigg\}\)
a= (tan x)log x
Taking log both the sides:
⇒ log a= log (tan x)log x
⇒ log a= log x . log (tan x)
{log xa = a log x}
Differentiating with respect to x:

b = cos2\(\big(\cfrac{\pi}4\big)\)
Differentiating with respect to x:


