Class 12 Maths, Worked in Full Past papersGet updates
Chapter 9 · Differential Equations

Exercise 9.2 · Q6: y=xsin⁡xy = x\sin x solves xy′=y+xx2−y2xy' = y + x\sqrt{x^2 - y^2}

Exercise 9.2Verifying a solution · Section 9.3
The question

In each of the Exercises 1 to 10 verify that the given functions (explicit or implicit) is a solution of the corresponding differential equation:

6. y=xsin⁡xy = x\sin x  :  xy′=y+xx2−y2xy' = y + x\sqrt{x^2 - y^2} (x≠0(x \ne 0 and x>yx > y or x<−y)x < -y)

Exam answer

Given y=xsin⁡xy = x\sin x⁠. Differentiating with respect to xx (product rule),

y′=sin⁡x+xcos⁡xy' = \sin x + x\cos x L.H.S.=xy′=xsin⁡x+x2cos⁡x\begin{aligned} \text{L.H.S.} &= xy' \\ &= x\sin x + x^2\cos x \end{aligned}

Substituting yy in the R.H.S. and using 1−sin⁡2x=cos⁡2x1 - \sin^2 x = \cos^2 x⁠,

R.H.S.=y+xx2−y2=xsin⁡x+xx2−x2sin⁡2x=xsin⁡x+xx2cos⁡2x\begin{aligned} \text{R.H.S.} &= y + x\sqrt{x^2 - y^2} \\ &= x\sin x \\ &\quad + x\sqrt{x^2 - x^2\sin^2 x} \\ &= x\sin x + x\sqrt{x^2\cos^2 x} \end{aligned}

For xcos⁡x≥0x\cos x \ge 0⁠, x2cos⁡2x=xcos⁡x\sqrt{x^2\cos^2 x} = x\cos x⁠. So

R.H.S.=xsin⁡x+x2cos⁡x=L.H.S.\begin{aligned} \text{R.H.S.} &= x\sin x + x^2\cos x \\ &= \text{L.H.S.} \end{aligned}

∴\therefore y=xsin⁡xy = x\sin x is a solution of the given differential equation where xcos⁡x≥0x\cos x \ge 0⁠. Hence verified.

The step x2cos⁡2x=xcos⁡x\sqrt{x^2\cos^2 x} = x\cos x needs xcos⁡x≥0x\cos x \ge 0⁠. The printed condition (x>yx > y or x<−yx < -y⁠) does not ensure this: at x=2x = 2 it holds, yet the two sides differ.

Want the reason behind every step, the basics and the checks?

The one idea this problem is built on

Under the root, x2−y2=x2−x2sin⁡2x=x2cos⁡2xx^2 - y^2 = x^2 - x^2\sin^2 x = x^2\cos^2 x⁠. A square root returns the non-negative value, so x2cos⁡2x=∣xcos⁡x∣\sqrt{x^2\cos^2 x} = |x\cos x|⁠, not always xcos⁡xx\cos x⁠. The left side has x2cos⁡x=x⋅(xcos⁡x)x^2\cos x = x \cdot (x\cos x) and the right side has x⋅∣xcos⁡x∣x \cdot |x\cos x|⁠. They match exactly when xcos⁡x≥0x\cos x \ge 0⁠. So the verification is correct, but only on the part of the line where xcos⁡x≥0x\cos x \ge 0⁠.

Given, to find, and the plan
Given
The function y=xsin⁡xy = x\sin x and the equation xy′=y+xx2−y2xy' = y + x\sqrt{x^2 - y^2}⁠, with the printed condition x≠0x \ne 0 and x>yx > y or x<−yx < -y⁠.
To show
That the function satisfies the equation, and exactly for which xx⁠.
Plan
(1) Differentiate by the product rule. (2) Build the left side. (3) Simplify the right side, keeping the root honest. (4) Compare and find where the sides agree. (5) Test the printed condition. (6) Conclude.

Basics you need

1What a solution is

A function is a solution when substituting it for yy makes L.H.S. = R.H.S. at every point of its domain (Section 9.3). Lesson: general and particular solutions

2Product rule

(uv)′=u′v+uv′(uv)' = u'v + uv' (Chapter 5); here u=xu = x⁠, v=sin⁡xv = \sin x⁠. Basics: y′ and y″

3The square root of a square

For every real tt⁠, t2=∣t∣\sqrt{t^2} = |t|⁠: it equals tt only when t≥0t \ge 0⁠. For example (−3)2=3\sqrt{(-3)^2} = 3⁠, not −3-3⁠. Lesson: is it a solution?

Solution

  1. Differentiate by the product rule

    y′=(x)′sin⁡x+x(sin⁡x)′=sin⁡x+xcos⁡x.\begin{aligned} y' &= (x)'\sin x + x(\sin x)' \\ &= \sin x + x\cos x. \end{aligned}
    yy is a product of xx and sin⁡x\sin x⁠. The derivative of xx is 1 and the derivative of sin⁡x\sin x is cos⁡x\cos x⁠.
    Product rule (Chapter 5). Basics: y′ and y″
  2. The left side

    L.H.S.=xy′=xsin⁡x+x2cos⁡x.\text{L.H.S.} = xy' = x\sin x + x^2\cos x.
    Multiply the result of Step 1 by xx⁠, term by term.
    Substitute the derivative into the equation (Section 9.3). Lesson: is it a solution? Examples 2 and 3
  3. The right side, keeping the root honest

    Under the root:

    x2−y2=x2−x2sin⁡2x=x2(1−sin⁡2x)=x2cos⁡2x.\begin{aligned} x^2 - y^2 &= x^2 - x^2\sin^2 x \\ &= x^2(1 - \sin^2 x) = x^2\cos^2 x. \end{aligned}

    This is never negative, so the root is defined for every real xx⁠, and

    x2−y2=(xcos⁡x)2=∣xcos⁡x∣.\sqrt{x^2 - y^2} = \sqrt{(x\cos x)^2} = |x\cos x|.

    So

    R.H.S.=xsin⁡x+x ∣xcos⁡x∣.\text{R.H.S.} = x\sin x + x\,|x\cos x|.
    1−sin⁡2x=cos⁡2x1 - \sin^2 x = \cos^2 x turns the expression under the root into a perfect square. The root of a square is the absolute value, because  \sqrt{\ } always means the non-negative root.
    sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1 and t2=∣t∣\sqrt{t^2} = |t| (Class XI). Lesson: is it a solution?
  4. Compare: where are the two sides equal?

    L.H.S.−R.H.S.=x2cos⁡x−x ∣xcos⁡x∣=x (xcos⁡x−∣xcos⁡x∣).\begin{aligned} &\text{L.H.S.} - \text{R.H.S.} \\ &= x^2\cos x - x\,|x\cos x| \\ &= x\,\big(x\cos x - |x\cos x|\big). \end{aligned}

    For x≠0x \ne 0 this is 0 exactly when xcos⁡x=∣xcos⁡x∣x\cos x = |x\cos x|⁠, that is, when xcos⁡x≥0x\cos x \ge 0⁠. When xcos⁡x<0x\cos x < 0 the bracket is 2xcos⁡x≠02x\cos x \ne 0 and the sides differ.

    So the equation holds exactly at the x≠0x \ne 0 with xcos⁡x≥0x\cos x \ge 0⁠:

    for x>0x > 0⁠, where cos⁡x≥0\cos x \ge 0⁠, for example 0<x≤π20 < x \le \frac{\pi}{2} or 3π2≤x≤5π2\frac{3\pi}{2} \le x \le \frac{5\pi}{2}⁠;

    for x<0x < 0⁠, where cos⁡x≤0\cos x \le 0⁠, for example −3π2≤x≤−π2-\frac{3\pi}{2} \le x \le -\frac{\pi}{2}⁠.

    With t=xcos⁡xt = x\cos x⁠, the difference is x(t−∣t∣)x(t - |t|)⁠, and t−∣t∣t - |t| is 0 for t≥0t \ge 0 and 2t2t for t<0t < 0⁠. On an interval inside this set, for example 0<x<π20 < x < \frac{\pi}{2}⁠, the function is a solution in the full sense: L.H.S. = R.H.S. at every point.
    ∣t∣=t|t| = t if t≥0t \ge 0⁠, and ∣t∣=−t|t| = -t if t<0t < 0⁠. Lesson: is it a solution?
  5. Test the printed condition

    The book prints the condition x≠0x \ne 0 and x>yx > y or x<−yx < -y⁠. It does not decide the sign of xcos⁡xx\cos x⁠:

    At x=2x = 2⁠: y=2sin⁡2≈1.8186<2y = 2\sin 2 \approx 1.8186 < 2⁠, so x>yx > y holds; but cos⁡2<0\cos 2 < 0⁠, so xcos⁡x<0x\cos x < 0⁠, and L.H.S. ≈0.1540\approx 0.1540 while R.H.S. ≈3.4832\approx 3.4832⁠.

    At x=−1x = -1⁠: y=sin⁡1≈0.8415y = \sin 1 \approx 0.8415⁠, so x<−yx < -y holds; but xcos⁡x≈−0.5403<0x\cos x \approx -0.5403 < 0⁠, and L.H.S. ≈1.3818\approx 1.3818 while R.H.S. ≈0.3012\approx 0.3012⁠.

    The condition under which the verification works is xcos⁡x≥0x\cos x \ge 0 (with x≠0x \ne 0⁠).

    A single point where both sides differ is enough to show that a condition does not guarantee the equation. The usual working writes x2cos⁡2x=xcos⁡x\sqrt{x^2\cos^2 x} = x\cos x⁠, which silently assumes xcos⁡x≥0x\cos x \ge 0⁠; that is the condition to state.
    A counterexample disproves a "for all" claim. Lesson: Exercise 9.2 player
  6. Conclusion

    Where xcos⁡x≥0x\cos x \ge 0 (and x≠0x \ne 0⁠), L.H.S. = R.H.S., so y=xsin⁡xy = x\sin x is a solution of xy′=y+xx2−y2xy' = y + x\sqrt{x^2 - y^2} there, for example on 0<x<π20 < x < \frac{\pi}{2}⁠. Hence verified, on that domain.

    The equation has order 1 and degree 1: the root contains xx and yy but no derivative, so the equation is a polynomial equation in y′y'⁠, with y′y' to the power 1. The function has no arbitrary constant, so it is a particular solution.

    Stating the domain is part of the answer whenever a root, log or division is involved.
    Order, degree and particular solutions (Sections 9.2 and 9.3). Basics: order n gives n constants
-2 -1 1 2 3 4 -10 5 x R.H.S. 3.4832 L.H.S. 0.1540 L.H.S. = x y′ R.H.S. x cos x ≥ 0: sides agree −π/2 π/2
Both sides for y=xsin⁡xy = x\sin x⁠, from x=−2x = -2 to x=4x = 4⁠. The dashed blue curve is xy′xy'⁠; the rose curve is y+xx2−y2y + x\sqrt{x^2 - y^2}⁠. They lie on top of each other in the green bands, where xcos⁡x≥0x\cos x \ge 0⁠, and split apart elsewhere. At x=2x = 2 the gap is from 0.1540 to 3.4832.
Result

xy′=xsin⁡x+x2cos⁡xxy' = x\sin x + x^2\cos x and y+xx2−y2=xsin⁡x+x ∣xcos⁡x∣y + x\sqrt{x^2 - y^2} = x\sin x + x\,|x\cos x|⁠. These are equal exactly where xcos⁡x≥0x\cos x \ge 0 (x≠0x \ne 0⁠), for example on 0<x≤π20 < x \le \frac{\pi}{2}⁠; there y=xsin⁡xy = x\sin x is a solution. The printed condition (x>yx > y or x<−yx < -y⁠) does not ensure this, as x=2x = 2 shows. (The answer key gives no answer for this question, since it is a verification.)

Check it with numbers

At x=1x = 1 (xcos⁡x>0x\cos x > 0⁠): sin⁡1≈0.8415\sin 1 \approx 0.8415⁠, cos⁡1≈0.5403\cos 1 \approx 0.5403⁠, so y≈0.8415y \approx 0.8415 and y′≈0.8415+0.5403=1.3818y' \approx 0.8415 + 0.5403 = 1.3818⁠, and L.H.S. =1×1.3818=1.3818= 1 \times 1.3818 = 1.3818⁠. On the right, y2≈0.7081y^2 \approx 0.7081⁠, x2−y2≈0.2919x^2 - y^2 \approx 0.2919⁠, 0.2919≈0.5403\sqrt{0.2919} \approx 0.5403⁠, and R.H.S. ≈0.8415+0.5403=1.3818\approx 0.8415 + 0.5403 = 1.3818⁠. Equal.

At x=2x = 2 (xcos⁡x<0x\cos x < 0⁠): sin⁡2≈0.9093\sin 2 \approx 0.9093⁠, 2cos⁡2≈−0.83232\cos 2 \approx -0.8323⁠, so y≈1.8186y \approx 1.8186⁠, y′≈0.9093−0.8323=0.0770y' \approx 0.9093 - 0.8323 = 0.0770⁠, and L.H.S. ≈2×0.0770=0.1540\approx 2 \times 0.0770 = 0.1540⁠. On the right, y2≈3.3073y^2 \approx 3.3073⁠, 4−y2≈0.69274 - y^2 \approx 0.6927⁠, 0.6927≈0.8323\sqrt{0.6927} \approx 0.8323⁠, and R.H.S. ≈1.8186+2×0.8323=3.4832\approx 1.8186 + 2 \times 0.8323 = 3.4832⁠. Not equal.

Common mistakes
  1. Writing x2cos⁡2x=xcos⁡x\sqrt{x^2\cos^2 x} = x\cos x without a condition. It is ∣xcos⁡x∣|x\cos x|⁠; the equality needs xcos⁡x≥0x\cos x \ge 0⁠.
  2. Forgetting the product rule and writing y′=cos⁡xy' = \cos x or y′=xcos⁡xy' = x\cos x⁠.
  3. Trusting a printed condition without testing it. One value such as x=2x = 2 settles it.
What to take away
  1. t2=∣t∣\sqrt{t^2} = |t|⁠. Whenever a root of a square appears, write the condition under which it equals tt⁠.
  2. A verification holds on a domain; find that domain from every root, log and division in the working.
  3. Compare Q4, where the quantity under the root is always positive and no restriction is needed.

Every fact used, and where it comes from

FactUsed inSource
Product rule; (sin⁡x)′=cos⁡x(\sin x)' = \cos xStep 1Chapter 5 (Basics)
A solution makes L.H.S. = R.H.S. when substitutedSteps 2, 4, 6Section 9.3 (Lesson)
sin⁡2x+cos⁡2x=1\sin^2 x + \cos^2 x = 1Step 3Class XI trigonometry
t2=∣t∣\sqrt{t^2} = |t|Steps 3, 4Class XI algebra
The printed condition x≠0x \ne 0 and x>yx > y or x<−yx < -yStep 5Exercise 9.2, Q6
Order and degree (polynomial condition); particular solutionStep 6Sections 9.2.1, 9.2.2 and 9.3 (Lesson)
Found an error, or want more?

Tell us if something on this page is wrong or unclear, or if you would like a fuller explanation, another method or a new feature. Send feedback on this problem →