Question

The function f(x)=xsin⁡xf(x) = x \sin x satisfies the following equation: f′′(x)+f(x)+tcos⁡x=0f''(x) + f(x) + t \cos x = 0. The value of tt is ______.

Official answer and solution
Official answer
-2
From
Official GATE 2014 answer key

Solution

Compute the second derivative of f(x)=xsin⁡xf(x) = x \sin x using the product rule and substitute into the given differential equation.

Given f(x)=xsin⁡xf(x) = x \sin x.

First derivative by the product rule:

f′(x)=ddx[xsin⁡x]=1⋅sin⁡x+x⋅cos⁡x=sin⁡x+xcos⁡xf'(x) = \frac{d}{dx}[x \sin x] = 1 \cdot \sin x + x \cdot \cos x = \sin x + x \cos x

Second derivative:

f′′(x)=ddx[sin⁡x+xcos⁡x]=cos⁡x+(1⋅cos⁡x−xsin⁡x)=2cos⁡x−xsin⁡xf''(x) = \frac{d}{dx}[\sin x + x \cos x] = \cos x + (1 \cdot \cos x - x \sin x) = 2 \cos x - x \sin x

Now substitute f(x)f(x) and f′′(x)f''(x) into the given equation:

f′′(x)+f(x)+tcos⁡x=0f''(x) + f(x) + t \cos x = 0
(2cos⁡x−xsin⁡x)+(xsin⁡x)+tcos⁡x=0(2 \cos x - x \sin x) + (x \sin x) + t \cos x = 0
2cos⁡x+tcos⁡x=02 \cos x + t \cos x = 0
(2+t)cos⁡x=0(2 + t) \cos x = 0

Since this equation must hold for all xx:

2+t=0  ⟹  t=−22 + t = 0 \implies t = -2

Thus, the value of tt is −2-2.

Final answer

-2

Common trap

Miscalculating the derivative of xcos⁡xx \cos x as −xsin⁡x-x \sin x, dropping the +cos⁡x+\cos x product term.

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2014 Computer Science and Information Technology (CS) Session 1
Question
56 of 65, printed as CS Q.46
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.