Skip to content
Question

Q.If y=ex2cos⁡x+(cos⁡x)xy = e^{x^2 \cos x} + (\cos x)^x, then find dydx\frac{dy}{dx}.

CBSECBSE Class XII Board 2020Subjective· 4mImportance★★★★★
🔒 Locked · start free trial →

You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.

Start your 14-day free trial to unlock the full solution →

We differentiate a sum of two functions: the first is a standard exponential requiring the chain rule, and the second is a variable-exponent power handled by logarithmic differentiation. The derivative is dydx=ex2cos⁡x⋅(2xcos⁡x−x2sin⁡x)+(cos⁡x)x(log⁡(cos⁡x)−xtan⁡x)\frac{dy}{dx} = e^{x^2 \cos x} \cdot (2x \cos x - x^2 \sin x) + (\cos x)^x \left( \log(\cos x) - x \tan x \right).

The problem gives y=ex2cos⁡x+(cos⁡x)xy = e^{x^2 \cos x} + (\cos x)^x and asks for dydx\frac{dy}{dx}. This is a sum of two very different-looking terms. The first term is an exponential function where the exponent itself is a product x2cos⁡xx^2 \cos x — that’s a straightforward chain rule job. The second term, (cos⁡x)x(\cos x)^x, has the variable xx in both the base and the exponent. That’s the classic signal for logarithmic differentiation: you cannot apply the power rule or the exponential rule directly because neither the base nor the exponent is constant.

Let’s break it into two parts, differentiate each, and add.


1. Differentiate ex2cos⁡xe^{x^2 \cos x}

Let u=x2cos⁡xu = x^2 \cos x. Then the term is eue^u, and by the chain rule:

ddxeu=eu⋅dudx.\frac{d}{dx} e^u = e^u \cdot \frac{du}{dx}.

Now find dudx\frac{du}{dx} using the product rule on u=x2⋅cos⁡xu = x^2 \cdot \cos x:

dudx=(2x)(cos⁡x)+(x2)(−sin⁡x)=2xcos⁡x−x2sin⁡x.\frac{du}{dx} = (2x)(\cos x) + (x^2)(-\sin x) = 2x \cos x - x^2 \sin x.

So:

ddx(ex2cos⁡x)=ex2cos⁡x⋅(2xcos⁡x−x2sin⁡x).\frac{d}{dx} \left( e^{x^2 \cos x} \right) = e^{x^2 \cos x} \cdot (2x \cos x - x^2 \sin x).

Tip

Notice that the derivative of cos⁡x\cos x is −sin⁡x-\sin x, so the sign in the second term is negative. A common slip is to forget that minus sign.


2. Differentiate (cos⁡x)x(\cos x)^x

Let v=(cos⁡x)xv = (\cos x)^x. Since xx appears in both the base and the exponent, take natural logs on both sides:

log⁡v=xlog⁡(cos⁡x).\log v = x \log(\cos x).

Now differentiate implicitly with respect to xx:

1v⋅dvdx=ddx[xlog⁡(cos⁡x)].\frac{1}{v} \cdot \frac{dv}{dx} = \frac{d}{dx} \big[ x \log(\cos x) \big].

The right side is a product: xx times log⁡(cos⁡x)\log(\cos x). Use the product rule:

ddx[xlog⁡(cos⁡x)]=(1)⋅log⁡(cos⁡x)+x⋅1cos⁡x⋅(−sin⁡x).\frac{d}{dx} \big[ x \log(\cos x) \big] = (1) \cdot \log(\cos x) + x \cdot \frac{1}{\cos x} \cdot (-\sin x). …

Unlock everything free for 14 days

  • Full step-by-step solutions
  • Concept-first explanations
  • Methods, shortcuts & mistakes
  • PYQ mapping + timed mock tests

Full access for 14 days. No credit card required.