SOLVER7 Study. Nothing Else.
Exercise 5.5 Q9

Differentiate the functions given in Exercises 1 to 11 \(w.r.t. x.\) \( x^{sin x} + (sin x)^{cos\ x}\)

CBSE Class 12 Maths · Continuity and Differentiability

Solution

👶 Simple Explanation

Simple Explanation

Imagine you have a special number machine where the dial and the power button are both changing at the same time. Normal rules for buttons do not work here. So we use a clever trick: we take the logarithm of both sides, which brings the moving power down as a multiplier. Think of it like unfolding a tightly wrapped gift so you can see inside. We do this for each piece of the sum separately, then add the results together to get the final answer.

Answer: \[ \frac{dy}{dx} = x^{\sin x}\left( \cos x \, \ln x + \frac{\sin x}{x} \right) + (\sin x)^{\cos x}\left( \cos x \cot x - \sin x \, \ln(\sin x) \right) \]

📖 Differentiating x^(sin x) + (sin x)^(cos x)

Detailed Explanation

When a function has the variable in both its base and its exponent, like \( x^{\sin x} \), we cannot use the simple power rule or the exponential rule directly. Instead we use logarithmic differentiation: take the natural logarithm of both sides, use log properties to bring the exponent down as a coefficient, and then differentiate implicitly. Since the given expression is a sum of two such functions, we treat each part separately. Let \( y = u + v \), where \( u = x^{\sin x} \) and \( v = (\sin x)^{\cos x} \). Then \( \frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx} \), so we find each derivative using logarithmic differentiation.

Formula Used

If \( u = f(x)^{g(x)} \), then \( \ln u = g(x)\ln f(x) \) and \( \frac{1}{u}\frac{du}{dx} = \frac{d}{dx}\big(g(x)\ln f(x)\big) \). Also \( \frac{d}{dx}(\ln x) = \frac{1}{x} \) and \( \frac{d}{dx}(\ln \sin x) = \cot x \).

Solution

  1. Step 1: Split the function into two parts. Let \( y = x^{\sin x} + (\sin x)^{\cos x} \). Write \( y = u + v \) where \( u = x^{\sin x} \) and \( v = (\sin x)^{\cos x} \). Then \( \frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx} \).
  2. Step 2: Differentiate the first part \( u = x^{\sin x} \) using logarithmic differentiation. Take log on both sides: \[ \ln u = \sin x \cdot \ln x \] Differentiate both sides with respect to \( x \), using the product rule on the right: \[ \frac{1}{u}\frac{du}{dx} = \cos x \cdot \ln x + \sin x \cdot \frac{1}{x} \]
  3. Step 3: Multiply both sides by \( u = x^{\sin x} \) to isolate the derivative: \[ \frac{du}{dx} = x^{\sin x}\left( \cos x \, \ln x + \frac{\sin x}{x} \right) \]
  4. Step 4: Differentiate the second part \( v = (\sin x)^{\cos x} \) using logarithmic differentiation. Take log on both sides: \[ \ln v = \cos x \cdot \ln(\sin x) \] Differentiate both sides, using the product rule on the right. Note that \( \frac{d}{dx}\ln(\sin x) = \frac{\cos x}{\sin x} = \cot x \). \[ \frac{1}{v}\frac{dv}{dx} = -\sin x \cdot \ln(\sin x) + \cos x \cdot \cot x \]
  5. Step 5: Multiply both sides by \( v = (\sin x)^{\cos x} \): \[ \frac{dv}{dx} = (\sin x)^{\cos x}\left( -\sin x \, \ln(\sin x) + \cos x \cot x \right) \]
  6. Step 6: Add the two derivatives to get \( \frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx} \): \[ \frac{dy}{dx} = x^{\sin x}\left( \cos x \, \ln x + \frac{\sin x}{x} \right) + (\sin x)^{\cos x}\left( \cos x \cot x - \sin x \, \ln(\sin x) \right) \]

Final Answer

\[ \frac{dy}{dx} = x^{\sin x}\left( \cos x \, \ln x + \frac{\sin x}{x} \right) + (\sin x)^{\cos x}\left( \cos x \cot x - \sin x \, \ln(\sin x) \right) \]

Common Mistake

A common mistake is trying to differentiate \( x^{\sin x} \) using the power rule as \( \sin x \cdot x^{\sin x - 1} \), or using the exponential rule as \( x^{\sin x}\ln x \). Neither works because BOTH the base and the exponent are functions of \( x \). You must use logarithmic differentiation for each term.

🪜 Step-by-step Solution

Step-by-step Solution

  1. Step 1: Split the given function into two manageable parts. Write \( y = u + v \) where \( u = x^{\sin x} \) and \( v = (\sin x)^{\cos x} \). By the sum rule this gives \( \frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx} \). — Reason: Both \( u \) and \( v \) are variable-base variable-exponent expressions, so each requires its own logarithmic differentiation; separating them first keeps the working organised.
  2. Step 2: Take the natural log of \( u = x^{\sin x} \) on both sides to get \[ \ln u = \sin x \cdot \ln x. \] — Reason: The log power rule converts the exponent \( \sin x \) into a coefficient, turning a tricky exponential form into a plain product, which is much easier to differentiate.
  3. Step 3: Differentiate both sides of \( \ln u = \sin x \cdot \ln x \) with respect to \( x \). The left side uses the chain rule; the right side uses the product rule: \[ \frac{1}{u}\frac{du}{dx} = \cos x \cdot \ln x + \sin x \cdot \frac{1}{x}. \] Multiply both sides by \( u = x^{\sin x} \): \[ \frac{du}{dx} = x^{\sin x}\left(\cos x \ln x + \frac{\sin x}{x}\right). \] — Reason: Multiplying by \( u \) isolates \( \frac{du}{dx} \) and substitutes back the original expression so the derivative is in terms of \( x \) only.
  4. Step 4: Take the natural log of \( v = (\sin x)^{\cos x} \) on both sides to get \[ \ln v = \cos x \cdot \ln(\sin x). \] — Reason: Same strategy as Step 2 — the log power rule brings the exponent \( \cos x \) down as a multiplier, converting the expression into a differentiable product.
  5. Step 5: Differentiate both sides of \( \ln v = \cos x \cdot \ln(\sin x) \) with respect to \( x \). Apply the product rule on the right, using \( \frac{d}{dx}(\cos x) = -\sin x \) and \( \frac{d}{dx}(\ln \sin x) = \cot x \): \[ \frac{1}{v}\frac{dv}{dx} = -\sin x \cdot \ln(\sin x) + \cos x \cdot \cot x. \] — Reason: The chain rule on the left gives \( \frac{1}{v}\frac{dv}{dx} \), and the product rule on the right correctly handles both factors of the product \( \cos x \cdot \ln(\sin x) \).
  6. Step 6: Multiply both sides by \( v = (\sin x)^{\cos x} \) to isolate \( \frac{dv}{dx} \): \[ \frac{dv}{dx} = (\sin x)^{\cos x}\left(\cos x \cot x - \sin x \ln(\sin x)\right). \] — Reason: This substitutes back the original expression for \( v \) and expresses the derivative entirely in terms of \( x \).
  7. Step 7: Combine both derivatives using \( \frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx} \) from Step 1: \[ \frac{dy}{dx} = x^{\sin x}\left(\cos x \ln x + \frac{\sin x}{x}\right) + (\sin x)^{\cos x}\left(\cos x \cot x - \sin x \ln(\sin x)\right). \] — Reason: Summing the two separately computed derivatives gives the complete derivative of the original function \( y \).

Final Answer

\[ \frac{dy}{dx} = x^{\sin x}\left( \cos x \, \ln x + \frac{\sin x}{x} \right) + (\sin x)^{\cos x}\left( \cos x \cot x - \sin x \, \ln(\sin x) \right) \]

Common Mistake

One common mistake: forgetting to apply the product rule when differentiating \( \sin x \cdot \ln x \) or \( \cos x \cdot \ln(\sin x) \) — students often differentiate only one factor and ignore the other, which gives an incomplete (and incorrect) expression for \( \frac{1}{u}\frac{du}{dx} \) or \( \frac{1}{v}\frac{dv}{dx} \).

✍️ Exam-ready Answer

Exam-ready Answer

  1. Step 1: Let \( y = u + v \) where \( u = x^{\sin x} \) and \( v = (\sin x)^{\cos x} \), so \( \frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx} \).
  2. Step 2: For \( u = x^{\sin x} \): take log, \( \ln u = \sin x \cdot \ln x \), differentiate: \( \frac{1}{u}\frac{du}{dx} = \cos x \ln x + \frac{\sin x}{x} \), so \( \frac{du}{dx} = x^{\sin x}\\!\left(\cos x \ln x + \frac{\sin x}{x}\right) \).
  3. Step 3: For \( v = (\sin x)^{\cos x} \): take log, \( \ln v = \cos x \cdot \ln(\sin x) \), differentiate: \( \frac{1}{v}\frac{dv}{dx} = -\sin x \ln(\sin x) + \cos x \cdot \cot x \), so \( \frac{dv}{dx} = (\sin x)^{\cos x}\\!\left(\cos x \cot x - \sin x \ln(\sin x)\right) \).
  4. Step 4: Combine: \( \frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx} \).

Answer: \[ \frac{dy}{dx} = x^{\sin x}\left( \cos x \, \ln x + \frac{\sin x}{x} \right) + (\sin x)^{\cos x}\left( \cos x \cot x - \sin x \, \ln(\sin x) \right) \]

➕ More Examples

More Examples

Example 1

Question: Differentiate the following with respect to \(x\): \[y = x^{\cos x} + (\cos x)^{\sin x}\]

Solution: Let \(u = x^{\cos x}\) and \(v = (\cos x)^{\sin x}\), so \(y = u + v\). Step 1: Differentiate \(u = x^{\cos x}\). Taking the natural log: \[\ln u = \cos x \cdot \ln x\] Differentiating both sides with respect to \(x\): \[\frac{1}{u}\frac{du}{dx} = -\sin x \cdot \ln x + \cos x \cdot \frac{1}{x}\] Multiplying both sides by \(u\): \[\frac{du}{dx} = x^{\cos x}\left(\frac{\cos x}{x} - \sin x \ln x\right)\] Step 2: Differentiate \(v = (\cos x)^{\sin x}\). Taking the natural log: \[\ln v = \sin x \cdot \ln(\cos x)\] Differentiating both sides with respect to \(x\): \[\frac{1}{v}\frac{dv}{dx} = \cos x \cdot \ln(\cos x) + \sin x \cdot \frac{-\sin x}{\cos x}\] Simplifying: \[\frac{1}{v}\frac{dv}{dx} = \cos x \cdot \ln(\cos x) - \frac{\sin^2 x}{\cos x}\] Multiplying both sides by \(v\): \[\frac{dv}{dx} = (\cos x)^{\sin x}\left(\cos x \cdot \ln(\cos x) - \frac{\sin^2 x}{\cos x}\right)\] Step 3: Add the results. \[\frac{dy}{dx} = \frac{du}{dx} + \frac{dv}{dx}\] \[\frac{dy}{dx} = x^{\cos x}\left(\frac{\cos x}{x} - \sin x \ln x\right) + (\cos x)^{\sin x}\left(\cos x \cdot \ln(\cos x) - \frac{\sin^2 x}{\cos x}\right)\]

Answer: \(\dfrac{dy}{dx} = x^{\cos x}\!\left(\dfrac{\cos x}{x} - \sin x \ln x\right) + (\cos x)^{\sin x}\!\left(\cos x \cdot \ln(\cos x) - \dfrac{\sin^2 x}{\cos x}\right)\)

Example 2

Question: Differentiate the following with respect to \(x\): \[y = (\tan x)^{x} + x^{\tan x}\]

Solution: Let \(p = (\tan x)^{x}\) and \(q = x^{\tan x}\), so \(y = p + q\). Step 1: Differentiate \(p = (\tan x)^{x}\). Taking the natural log: \[\ln p = x \cdot \ln(\tan x)\] Differentiating both sides with respect to \(x\): \[\frac{1}{p}\frac{dp}{dx} = 1 \cdot \ln(\tan x) + x \cdot \frac{\sec^2 x}{\tan x}\] Note that \(\dfrac{\sec^2 x}{\tan x} = \dfrac{1}{\sin x \cos x}\). Multiplying both sides by \(p\): \[\frac{dp}{dx} = (\tan x)^{x}\left(\ln(\tan x) + \frac{x}{\sin x \cos x}\right)\] Step 2: Differentiate \(q = x^{\tan x}\). Taking the natural log: \[\ln q = \tan x \cdot \ln x\] Differentiating both sides with respect to \(x\): \[\frac{1}{q}\frac{dq}{dx} = \sec^2 x \cdot \ln x + \tan x \cdot \frac{1}{x}\] Multiplying both sides by \(q\): \[\frac{dq}{dx} = x^{\tan x}\left(\sec^2 x \cdot \ln x + \frac{\tan x}{x}\right)\] Step 3: Add the results. \[\frac{dy}{dx} = \frac{dp}{dx} + \frac{dq}{dx}\] \[\frac{dy}{dx} = (\tan x)^{x}\left(\ln(\tan x) + \frac{x}{\sin x \cos x}\right) + x^{\tan x}\left(\sec^2 x \cdot \ln x + \frac{\tan x}{x}\right)\]

Answer: \(\dfrac{dy}{dx} = (\tan x)^{x}\!\left(\ln(\tan x) + \dfrac{x}{\sin x \cos x}\right) + x^{\tan x}\!\left(\sec^2 x \cdot \ln x + \dfrac{\tan x}{x}\right)\)

🎯 Try a Similar Question

Try a Similar Question

Question: Differentiate the following function with respect to x: \[y = x^{\cos x} + (\cos x)^{\sin x}\]

Solution

  1. Step 1: Split into two parts: Let \(y = P + Q\) where \(P = x^{\cos x}\) and \(Q = (\cos x)^{\sin x}\). Then \(\frac{dy}{dx} = \frac{dP}{dx} + \frac{dQ}{dx}\).
  2. Step 2: Differentiate P using logarithmic differentiation: Take the natural log of \(P = x^{\cos x}\): \[\ln P = \cos x \cdot \ln x\] Differentiate both sides with respect to x: \[\frac{1}{P}\frac{dP}{dx} = -\sin x \cdot \ln x + \cos x \cdot \frac{1}{x}\] Therefore, \[\frac{dP}{dx} = x^{\cos x}\left(\frac{\cos x}{x} - \sin x \ln x\right)\]
  3. Step 3: Differentiate Q using logarithmic differentiation: Take the natural log of \(Q = (\cos x)^{\sin x}\): \[\ln Q = \sin x \cdot \ln(\cos x)\] Differentiate both sides with respect to x: \[\frac{1}{Q}\frac{dQ}{dx} = \cos x \cdot \ln(\cos x) + \sin x \cdot \frac{-\sin x}{\cos x}\] Simplifying the second term using \(\frac{\sin x}{\cos x} = \tan x\): \[\frac{1}{Q}\frac{dQ}{dx} = \cos x \cdot \ln(\cos x) - \sin x \tan x\] Therefore, \[\frac{dQ}{dx} = (\cos x)^{\sin x}\left(\cos x \ln(\cos x) - \sin x \tan x\right)\]
  4. Step 4: Combine results: Adding both derivatives gives the final answer: \[\frac{dy}{dx} = x^{\cos x}\left(\frac{\cos x}{x} - \sin x \ln x\right) + (\cos x)^{\sin x}\left(\cos x \ln(\cos x) - \sin x \tan x\right)\]

Answer: \[\frac{dy}{dx} = x^{\cos x}\left(\frac{\cos x}{x} - \sin x \ln x\right) + (\cos x)^{\sin x}\left(\cos x \ln(\cos x) - \sin x \tan x\right)\]

Everything you get with Solver7

More questions in Continuity and Differentiability

Chapter 5 Examples Q1 Chapter 5 Examples Q2 Chapter 5 Examples Q3 65/1/1 2024 / Section A Q3 Chapter 5 Examples Q4 65/2/1 2024 / Section A Q4 65/3/1 2024 / Section A Q4 Chapter 5 Examples Q5 65/4/1 2026 / Section A Q5 Chapter 5 Examples Q6 65(B) 2026 / Section A Q6 65/4/1 2023 / Section A Q6 65/4/2 2024 / Section A Q6 65/5/1 2026 / Section A Q6 Chapter 5 Examples Q7 65/3/1 2026 / Section A Q7 65/4/1 2023 / Section A Q7 65/4/1 2026 / Section A Q7 65/4/2 2024 / Section A Q7 Chapter 5 Examples Q8 65/4/1 2026 / Section A Q8 65/5/1 2026 / Section A Q8 Chapter 5 Examples Q9 Chapter 5 Examples Q10 Chapter 5 Examples Q11 65/2/2 2023 / Section A Q11 65/2/3 2026 / Section A Q11 Chapter 5 Examples Q12 65/2/2 2023 / Section A Q12 Chapter 5 Examples Q13 65/1/1 2023 / Section A Q13 65/1/1 2024 / Section A Q13 65/2/1 2024 / Section A Q13 Chapter 5 Examples Q14 65/3/1 2024 / Section A Q14 Chapter 5 Examples Q15 65/3/1 2023 / Section A Q15 Chapter 5 Examples Q16 65/3/1 2023 / Section A Q16 Chapter 5 Examples Q17 Chapter 5 Examples Q18 Chapter 5 Examples Q19 Chapter 5 Examples Q20 Chapter 5 Examples Q21 65/1/1 2024 / Section B Q21(a) 65/1/1 2026 / Section B Q21(a) 65/3/1 2026 / Section B Q21 Chapter 5 Examples Q22 65/1/1 2024 / Section B Q21(b) 65/1/1 2026 / Section B Q21(b) 65/3/1 2024 / Section B Q22(a) 65/4/1 2026 / Section B Q22(a) 65/5/1 2026 / Section B Q22(a) Chapter 5 Examples Q23 65/2/1 2024 / Section B Q22(a) 65/3/1 2024 / Section B Q22(b) 65/4/1 2023 / Section B Q22 65/4/1 2026 / Section B Q22(b) 65/5/1 2026 / Section B Q22(b) Chapter 5 Examples Q24