SOLVER7 Study. Nothing Else.
Chapter 5 Miscellaneous Exercise Q9

Differentiate w.r.t. x the function in Exercises 1 to 11. \((sin\ x – cos\ x)^ {(sin x – cos x)},\dfrac{\pi}{4} < x < \dfrac{3\pi}{4}\)

CBSE Class 12 Maths · Continuity and Differentiability

Solution

👶 Simple Explanation

Simple Explanation

Imagine a number that is both the base and the power at the same time — like a person wearing two hats. Normal rules cannot handle two hats at once. So mathematicians use a clever trick: take the logarithm of both sides, which pulls the top hat down and turns the problem into simple multiplication. After that, ordinary differentiation does the rest. The final answer tells us exactly how fast the original expression is changing at any point.

Answer: \[ \frac{dy}{dx} = (\sin x - \cos x)^{(\sin x - \cos x)}\,(\sin x + \cos x)\big[1 + \log(\sin x - \cos x)\big]. \]

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

Detailed Explanation

When a function has the form \( y = [f(x)]^{g(x)} \), where the variable appears in BOTH the base and the exponent, we cannot use the simple power rule or the exponential rule directly. Instead, we use logarithmic differentiation. The idea is to take the natural logarithm of both sides, which brings the exponent down using the log property \( \log(a^b) = b \log a \). This converts the difficult power into a product, which we can then differentiate using the product rule and chain rule. Here \( f(x) = g(x) = \sin x - \cos x \), so both the base and exponent are the same expression. The condition \( \frac{\pi}{4} < x < \frac{3\pi}{4} \) ensures that \( \sin x - \cos x > 0 \), so the logarithm is defined.

Formula Used

If \( y = [f(x)]^{g(x)} \), then \( \log y = g(x) \log f(x) \), and differentiating gives \( \frac{1}{y}\frac{dy}{dx} = \frac{d}{dx}\big[g(x)\log f(x)\big] \).

Solution

  1. Step 1: Let the given function be \[ y = (\sin x - \cos x)^{(\sin x - \cos x)}. \] Since the variable appears in both the base and the exponent, we use logarithmic differentiation.
  2. Step 2: Take the natural logarithm of both sides: \[ \log y = \log\left[(\sin x - \cos x)^{(\sin x - \cos x)}\right]. \] Using the property \( \log(a^b) = b\log a \), we get \[ \log y = (\sin x - \cos x)\,\log(\sin x - \cos x). \]
  3. Step 3: Differentiate both sides with respect to \( x \). The left side gives \( \frac{1}{y}\frac{dy}{dx} \) by the chain rule. The right side is a product of two functions, so we apply the product rule: \[ \frac{1}{y}\frac{dy}{dx} = \frac{d}{dx}\big[(\sin x - \cos x)\big]\cdot\log(\sin x - \cos x) + (\sin x - \cos x)\cdot\frac{d}{dx}\big[\log(\sin x - \cos x)\big]. \]
  4. Step 4: Compute the individual derivatives. We know \[ \frac{d}{dx}(\sin x - \cos x) = \cos x + \sin x. \] Also, by the chain rule, \[ \frac{d}{dx}\big[\log(\sin x - \cos x)\big] = \frac{\cos x + \sin x}{\sin x - \cos x}. \]
  5. Step 5: Substitute these into the equation from Step 3: \[ \frac{1}{y}\frac{dy}{dx} = (\cos x + \sin x)\log(\sin x - \cos x) + (\sin x - \cos x)\cdot\frac{\cos x + \sin x}{\sin x - \cos x}. \] The second term simplifies because \( \sin x - \cos x \) cancels: \[ \frac{1}{y}\frac{dy}{dx} = (\cos x + \sin x)\log(\sin x - \cos x) + (\cos x + \sin x). \]
  6. Step 6: Take the common factor \( (\cos x + \sin x) \) out: \[ \frac{1}{y}\frac{dy}{dx} = (\cos x + \sin x)\big[\log(\sin x - \cos x) + 1\big]. \] Finally multiply both sides by \( y \), replacing \( y \) with the original function.

Final Answer

\[ \frac{dy}{dx} = (\sin x - \cos x)^{(\sin x - \cos x)}\,(\sin x + \cos x)\big[1 + \log(\sin x - \cos x)\big]. \]

Common Mistake

A common mistake is to treat the expression like a simple power \( u^n \) and write the derivative as \( (\sin x - \cos x)\cdot(\sin x - \cos x)^{(\sin x - \cos x - 1)} \). This is wrong because the exponent is not a constant — it also depends on \( x \). Whenever the variable is in both the base and the exponent, you MUST use logarithmic differentiation.

🪜 Step-by-step Solution

Step-by-step Solution

  1. Step 1: Write the function and note the domain: Let \[ y = (\sin x - \cos x)^{(\sin x - \cos x)}. \] Reason: We identify that the same expression \( (\sin x - \cos x) \) appears in both the base and the exponent, confirming that logarithmic differentiation is required. The given condition \( \frac{\pi}{4} < x < \frac{3\pi}{4} \) guarantees \( \sin x - \cos x > 0 \), so the logarithm will be defined.
  2. Step 2: Take the natural logarithm of both sides: Taking \( \log \) of both sides: \[ \log y = \log\!\left[(\sin x - \cos x)^{(\sin x - \cos x)}\right]. \] Applying the logarithm power rule \( \log(a^b) = b \log a \): \[ \log y = (\sin x - \cos x)\,\log(\sin x - \cos x). \] Reason: This single step is the heart of the technique — the troublesome variable exponent is brought down and turned into a coefficient, converting the problem into one involving a product of two functions.
  3. Step 3: Differentiate the left side: Differentiating \( \log y \) with respect to \( x \) using the chain rule: \[ \frac{d}{dx}(\log y) = \frac{1}{y}\,\frac{dy}{dx}. \] Reason: Since \( y \) is itself a function of \( x \), the chain rule introduces the factor \( \frac{1}{y} \) on the left side.
  4. Step 4: Differentiate the right side using the product rule: Let \( u = \sin x - \cos x \) for brevity, so the right side is \( u \log u \). Note that \( \frac{du}{dx} = \cos x + \sin x \). Applying the product rule: \[ \frac{d}{dx}\big[u \log u\big] = \frac{du}{dx} \cdot \log u + u \cdot \frac{1}{u}\cdot\frac{du}{dx}. \] Simplifying: \[ = (\cos x + \sin x)\,\log(\sin x - \cos x) + (\cos x + \sin x)\cdot 1. \] Factoring out \( (\sin x + \cos x) \): \[ = (\sin x + \cos x)\big[\log(\sin x - \cos x) + 1\big]. \] Reason: The product rule is applied to the two-factor expression \( u\,\log u \). The derivative of \( \log u \) with respect to \( x \) requires the chain rule, giving \( \frac{1}{u}\cdot\frac{du}{dx} \); the \( u \) in the numerator and denominator cancel cleanly.
  5. Step 5: Combine both sides: Equating the derivatives from Step 3 and Step 4: \[ \frac{1}{y}\,\frac{dy}{dx} = (\sin x + \cos x)\big[1 + \log(\sin x - \cos x)\big]. \] Multiplying both sides by \( y \): \[ \frac{dy}{dx} = y\,(\sin x + \cos x)\big[1 + \log(\sin x - \cos x)\big]. \] Reason: Isolating \( \frac{dy}{dx} \) by multiplying through by \( y \) is the final algebraic step before substituting the original expression for \( y \) back in.
  6. Step 6: Substitute back the original expression for y: Replacing \( y \) with \( (\sin x - \cos x)^{(\sin x - \cos x)} \): \[ \frac{dy}{dx} = (\sin x - \cos x)^{(\sin x - \cos x)}\,(\sin x + \cos x)\big[1 + \log(\sin x - \cos x)\big]. \] Reason: The answer must be expressed entirely in terms of \( x \), so we substitute the original definition of \( y \) to obtain the final closed-form derivative.

Final Answer

\[ \frac{dy}{dx} = (\sin x - \cos x)^{(\sin x - \cos x)}\,(\sin x + \cos x)\big[1 + \log(\sin x - \cos x)\big]. \]

Common Mistake

One common mistake: forgetting to apply the product rule correctly in Step 4 — students often differentiate only the leading factor \( (\sin x - \cos x) \) and ignore differentiating the \( \log(\sin x - \cos x) \) part, which causes the term \( (\sin x + \cos x)\,\log(\sin x - \cos x) \) to be missing from the final answer.

✍️ Exam-ready Answer

Exam-ready Answer

  1. Step 1: Let \ \( y = (\sin x - \cos x)^{(\sin x - \cos x)} \). Taking log of both sides: \[ \log y = (\sin x - \cos x)\,\log(\sin x - \cos x). \]
  2. Step 2: Differentiating both sides w.r.t. \( x \) using the product rule on the right side: \[ \frac{1}{y}\frac{dy}{dx} = (\sin x + \cos x)\cdot\log(\sin x - \cos x) + (\sin x - \cos x)\cdot\frac{(\sin x + \cos x)}{(\sin x - \cos x)}. \]
  3. Step 3: Simplifying the right side: \[ \frac{1}{y}\frac{dy}{dx} = (\sin x + \cos x)\big[\log(\sin x - \cos x) + 1\big]. \] Multiplying both sides by \( y = (\sin x - \cos x)^{(\sin x - \cos x)} \) gives the final answer.

Answer: \[ \frac{dy}{dx} = (\sin x - \cos x)^{(\sin x - \cos x)}\,(\sin x + \cos x)\big[1 + \log(\sin x - \cos x)\big]. \]

➕ More Examples

More Examples

Example 1

Question: Differentiate w.r.t. \( x \) the function \( y = (\sin x + \cos x)^{(\sin x + \cos x)} \), where \( 0 < x < \frac{\pi}{2} \).

Solution: Let \( y = (\sin x + \cos x)^{(\sin x + \cos x)} \). Step 1 — Take the natural logarithm of both sides: \[ \ln y = (\sin x + \cos x) \cdot \ln(\sin x + \cos x) \] Step 2 — Differentiate both sides w.r.t. \( x \). The left side gives \( \frac{1}{y}\frac{dy}{dx} \). The right side is a product, so apply the product rule with \( u = \sin x + \cos x \) and \( v = \ln(\sin x + \cos x) \): \[ \frac{1}{y}\frac{dy}{dx} = \frac{d}{dx}(\sin x + \cos x) \cdot \ln(\sin x + \cos x) + (\sin x + \cos x) \cdot \frac{d}{dx}\ln(\sin x + \cos x) \] Note that \( \frac{d}{dx}(\sin x + \cos x) = \cos x - \sin x \) and \( \frac{d}{dx}\ln(\sin x + \cos x) = \frac{\cos x - \sin x}{\sin x + \cos x} \). Substituting: \[ \frac{1}{y}\frac{dy}{dx} = (\cos x - \sin x)\ln(\sin x + \cos x) + (\sin x + \cos x)\cdot\frac{\cos x - \sin x}{\sin x + \cos x} \] Simplify the second term: \[ \frac{1}{y}\frac{dy}{dx} = (\cos x - \sin x)\ln(\sin x + \cos x) + (\cos x - \sin x) \] Factor out \( (\cos x - \sin x) \): \[ \frac{1}{y}\frac{dy}{dx} = (\cos x - \sin x)\left[1 + \ln(\sin x + \cos x)\right] \] Step 3 — Multiply both sides by \( y \): \[ \frac{dy}{dx} = (\sin x + \cos x)^{(\sin x + \cos x)} \cdot (\cos x - \sin x)\left[1 + \ln(\sin x + \cos x)\right] \]

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

Example 2

Question: Differentiate w.r.t. \( x \) the function \( y = (\tan x)^{\cos x} \), where \( 0 < x < \frac{\pi}{2} \).

Solution: Let \( y = (\tan x)^{\cos x} \). Step 1 — Take the natural logarithm of both sides: \[ \ln y = \cos x \cdot \ln(\tan x) \] Step 2 — Differentiate both sides w.r.t. \( x \) using the product rule on the right side: \[ \frac{1}{y}\frac{dy}{dx} = \frac{d}{dx}(\cos x)\cdot\ln(\tan x) + \cos x \cdot \frac{d}{dx}\ln(\tan x) \] We have \( \frac{d}{dx}(\cos x) = -\sin x \) and \( \frac{d}{dx}\ln(\tan x) = \frac{1}{\tan x}\cdot\sec^2 x = \frac{\sec^2 x}{\tan x} \). Substituting: \[ \frac{1}{y}\frac{dy}{dx} = -\sin x \cdot \ln(\tan x) + \cos x \cdot \frac{\sec^2 x}{\tan x} \] Simplify the second term. Since \( \sec^2 x = \frac{1}{\cos^2 x} \) and \( \tan x = \frac{\sin x}{\cos x} \): \[ \cos x \cdot \frac{\sec^2 x}{\tan x} = \cos x \cdot \frac{1}{\cos^2 x} \cdot \frac{\cos x}{\sin x} = \frac{1}{\sin x} = \csc x \] Therefore: \[ \frac{1}{y}\frac{dy}{dx} = -\sin x \cdot \ln(\tan x) + \csc x \] Step 3 — Multiply both sides by \( y \): \[ \frac{dy}{dx} = (\tan x)^{\cos x}\left[\csc x - \sin x \cdot \ln(\tan x)\right] \]

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

🎯 Try a Similar Question

Try a Similar Question

Question: Differentiate with respect to \( x \) the function \( y = (\cos x + \sin x)^{(\cos x + \sin x)} \), where \( 0 < x < \dfrac{\pi}{2} \).

Solution

  1. Step 1: Identify the form and take logarithm: Let \( y = (\cos x + \sin x)^{(\cos x + \sin x)} \). Since the base and exponent are the same, take the natural logarithm of both sides:
  2. Step 2: Write the log form: Taking log on both sides: \[ \log y = (\cos x + \sin x) \cdot \log(\cos x + \sin x) \]
  3. Step 3: Differentiate both sides with respect to x: Differentiate both sides with respect to \( x \). The left side gives \( \dfrac{1}{y} \dfrac{dy}{dx} \). The right side is differentiated using the product rule, with \( u = \cos x + \sin x \) and \( v = \log(\cos x + \sin x) \):
  4. Step 4: Compute the derivative of the right side: Note that \( \dfrac{d}{dx}(\cos x + \sin x) = -\sin x + \cos x = \cos x - \sin x \). Applying the product rule: \[ \frac{d}{dx}\left[(\cos x + \sin x)\log(\cos x + \sin x)\right] = (\cos x - \sin x)\log(\cos x + \sin x) + (\cos x + \sin x) \cdot \frac{\cos x - \sin x}{\cos x + \sin x} \]
  5. Step 5: Simplify the right side: The second term simplifies: \( (\cos x + \sin x) \cdot \dfrac{\cos x - \sin x}{\cos x + \sin x} = \cos x - \sin x \). So the right side becomes: \[ (\cos x - \sin x)\log(\cos x + \sin x) + (\cos x - \sin x) = (\cos x - \sin x)\left[1 + \log(\cos x + \sin x)\right] \]
  6. Step 6: Solve for dy/dx: Now multiply both sides by \( y \): \[ \frac{dy}{dx} = y \cdot (\cos x - \sin x)\left[1 + \log(\cos x + \sin x)\right] \] Substituting back \( y = (\cos x + \sin x)^{(\cos x + \sin x)} \): \[ \frac{dy}{dx} = (\cos x + \sin x)^{(\cos x + \sin x)}\,(\ cos x - \sin x)\left[1 + \log(\cos x + \sin x)\right] \]

Answer: \[ \frac{dy}{dx} = (\cos x + \sin x)^{(\cos x + \sin x)}\,(\cos x - \sin x)\left[1 + \log(\cos x + \sin 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