SOLVER7 Study. Nothing Else.
Exercise 9.5 Q9

For each of the differential equations given in Exercises 1 to 12, find the general solution: \(x\dfrac{dy}{dx}+y-x+xy\ cot\ x=0(x\ne 0)\)

CBSE Class 12 Maths · Differential Equations

Solution

👶 Simple Explanation

Simple Explanation

Imagine you are trying to find a hidden number that changes as you move along. A differential equation is like a rule that tells you how fast that number changes. To find the actual number, we use a clever trick — we multiply both sides by a special helper value. This helper tidies up the messy equation into something we can easily reverse. Like using the right key to open a lock, the correct helper unlocks the answer neatly.

Answer: The general solution is \[ y\, x\sin x = \sin x - x\cos x + C, \] or equivalently \[ y = \frac{1}{x} - \cot x + \frac{C}{x\sin x}. \]

📖 Solving a Linear First-Order Differential Equation

Detailed Explanation

A first-order linear differential equation has the standard form \( \dfrac{dy}{dx} + P(x)\, y = Q(x) \), where \( P \) and \( Q \) are functions of \( x \) only. To solve it, we multiply the whole equation by an integrating factor \( \mu = e^{\int P\, dx} \). This turns the left-hand side into the derivative of a product \( \dfrac{d}{dx}(y \cdot \mu) \), which can then be integrated directly. The given equation is not yet in standard form, so our first job is to divide through by \( x \) to isolate \( \dfrac{dy}{dx} \), and then identify \( P(x) \) and \( Q(x) \).

Formula Used

Standard linear form: \( \dfrac{dy}{dx} + P(x)\, y = Q(x) \). Integrating factor: \( \text{I.F.} = e^{\int P\, dx} \). General solution: \( y \cdot \text{I.F.} = \int Q \cdot \text{I.F.}\, dx + C \).

Solution

  1. Step 1: Start with the given equation and bring it to standard form. We have \[ x\frac{dy}{dx} + y - x + xy\cot x = 0. \] Divide every term by \( x \) (allowed since \( x \ne 0 \)): \[ \frac{dy}{dx} + \frac{y}{x} - 1 + y\cot x = 0. \] Rearrange so all \( y \)-terms are together: \[ \frac{dy}{dx} + \left(\frac{1}{x} + \cot x\right) y = 1. \]
  2. Step 2: Identify \( P(x) \) and \( Q(x) \) from the standard form. Comparing with \( \dfrac{dy}{dx} + P(x)y = Q(x) \), we get \[ P(x) = \frac{1}{x} + \cot x, \qquad Q(x) = 1. \]
  3. Step 3: Find the integrating factor. We need \( \int P\, dx \): \[ \int \left(\frac{1}{x} + \cot x\right) dx = \log x + \log(\sin x) = \log(x\sin x). \] Therefore \[ \text{I.F.} = e^{\log(x\sin x)} = x\sin x. \]
  4. Step 4: Write the solution using the formula \( y \cdot \text{I.F.} = \int Q \cdot \text{I.F.}\, dx + C \). This gives \[ y \cdot x\sin x = \int 1 \cdot x\sin x\, dx + C. \] Here \( Q = 1 \), so we only need to integrate \( x\sin x \).
  5. Step 5: Evaluate \( \int x\sin x\, dx \) using integration by parts with \( u = x \) and \( dv = \sin x\, dx \), so \( du = dx \) and \( v = -\cos x \): \[ \int x\sin x\, dx = -x\cos x + \int \cos x\, dx = -x\cos x + \sin x. \]
  6. Step 6: Substitute back into the solution: \[ y\, x\sin x = -x\cos x + \sin x + C. \] Divide through by \( x\sin x \) to solve for \( y \): \[ y = -\frac{\cos x}{\sin x} + \frac{1}{x} + \frac{C}{x\sin x}. \] That is \[ y = -\cot x + \frac{1}{x} + \frac{C}{x\sin x}. \]

Final Answer

The general solution is \[ y\, x\sin x = \sin x - x\cos x + C, \] or equivalently \[ y = \frac{1}{x} - \cot x + \frac{C}{x\sin x}. \]

Common Mistake

A common mistake is forgetting to divide the whole equation by \( x \) first, which leads to a wrong \( P(x) \) and an incorrect integrating factor. Always reduce the equation to the exact form \( \dfrac{dy}{dx} + P(x)y = Q(x) \) (coefficient of \( \frac{dy}{dx} \) equal to 1) before reading off \( P \) and \( Q \).

🪜 Step-by-step Solution

Step-by-step Solution

  1. Step 1: Rewrite in Standard Linear Form: Start with the given equation \[ x\frac{dy}{dx} + y - x + xy\cot x = 0. \] Divide every term by \( x \) (valid whenever \( x \ne 0 \)) to isolate \( \frac{dy}{dx} \): \[ \frac{dy}{dx} + \frac{y}{x} - 1 + y\cot x = 0. \] Collect all terms involving \( y \) on the left and move the constant to the right: \[ \frac{dy}{dx} + \left(\frac{1}{x} + \cot x\right)y = 1. \] — Reason: The integrating-factor method requires the equation in the form \( \frac{dy}{dx} + P(x)\,y = Q(x) \) before we can proceed.
  2. Step 2: Identify P(x) and Q(x): Comparing with \( \frac{dy}{dx} + P(x)\,y = Q(x) \), we read off \[ P(x) = \frac{1}{x} + \cot x, \qquad Q(x) = 1. \] — Reason: Correctly identifying \( P \) and \( Q \) is essential; an error here propagates through every subsequent calculation.
  3. Step 3: Compute the Integrating Factor: Evaluate \( \int P(x)\,dx \): \[ \int \left(\frac{1}{x} + \cot x\right)dx = \log x + \log(\sin x) = \log(x\sin x). \] Therefore the integrating factor is \[ \text{I.F.} = e^{\log(x\sin x)} = x\sin x. \] — Reason: Multiplying the ODE by this factor will convert the left side into the derivative of the product \( y \cdot x\sin x \), making the equation directly integrable.
  4. Step 4: Multiply Through by the Integrating Factor: Multiply both sides of \( \frac{dy}{dx} + \left(\frac{1}{x} + \cot x\right)y = 1 \) by \( x\sin x \): \[ x\sin x\,\frac{dy}{dx} + (\sin x + x\cos x)\,y = x\sin x. \] The left side is now a perfect derivative: \[ \frac{d}{dx}\bigl(y \cdot x\sin x\bigr) = x\sin x. \] — Reason: The whole point of the integrating factor is to produce an exact derivative on the left, so that both sides can be integrated with respect to \( x \).
  5. Step 5: Integrate Both Sides: Integrate both sides with respect to \( x \): \[ y \cdot x\sin x = \int x\sin x\,dx + C. \] Evaluate the right-hand integral using integration by parts (let \( u = x \) and \( dv = \sin x\,dx \)): \[ \int x\sin x\,dx = -x\cos x + \int \cos x\,dx = -x\cos x + \sin x. \] Therefore \[ y \cdot x\sin x = \sin x - x\cos x + C. \] — Reason: Integration by parts is needed here because the integrand is a product of a polynomial and a trigonometric function.
  6. Step 6: Write the Explicit Solution (Optional Rearrangement): Divide both sides by \( x\sin x \) to express \( y \) explicitly: \[ y = \frac{\sin x - x\cos x + C}{x\sin x} = \frac{1}{x} - \cot x + \frac{C}{x\sin x}. \] — Reason: This form makes it easy to see the behaviour of \( y \) and to apply any given initial condition.

Final Answer

The general solution is \[ y\, x\sin x = \sin x - x\cos x + C, \] or equivalently \[ y = \frac{1}{x} - \cot x + \frac{C}{x\sin x}. \]

Common Mistake

One common mistake: forgetting to group the \( y \)-terms together before identifying \( P(x) \) — students sometimes miss the \( \cot x \) part and write \( P(x) = \frac{1}{x} \) only, leading to a wrong integrating factor and an incorrect general solution.

✍️ Exam-ready Answer

Exam-ready Answer

  1. Step 1: Standard Form: Divide \( x\dfrac{dy}{dx} + y - x + xy\cot x = 0 \) by \( x \): \[ \frac{dy}{dx} + \left(\frac{1}{x} + \cot x\right)y = 1 \] so \( P(x) = \dfrac{1}{x} + \cot x \), \( Q(x) = 1 \).
  2. Step 2: Integrating Factor: \[ \int P\, dx = \int\left(\frac{1}{x} + \cot x\right)dx = \log x + \log(\sin x) = \log(x\sin x) \] so I.F. \( = x\sin x \).
  3. Step 3: Integrate: \[ y \cdot x\sin x = \int 1 \cdot x\sin x\, dx = \int x\sin x\, dx \] Using integration by parts: \[ \int x\sin x\, dx = -x\cos x + \sin x + C \]

Answer: The general solution is \[ y\, x\sin x = \sin x - x\cos x + C, \] or equivalently \[ y = \frac{1}{x} - \cot x + \frac{C}{x\sin x}. \]

➕ More Examples

More Examples

Example 1

Question: Find the general solution of the differential equation: \[x\frac{dy}{dx} + y - x + xy\tan x = 0, \quad x \ne 0.\]

Solution: Rewrite the equation by dividing throughout by \(x\): \[\frac{dy}{dx} + \frac{y}{x} + y\tan x = 1.\] This can be written as \[\frac{dy}{dx} + y\left(\frac{1}{x} + \tan x\right) = 1.\] This is of the standard linear form \(\frac{dy}{dx} + P(x)y = Q(x)\) where \(P(x) = \frac{1}{x} + \tan x\) and \(Q(x) = 1\). Compute the integrating factor: \[\text{IF} = e^{\int P(x)\,dx} = e^{\int\left(\frac{1}{x} + \tan x\right)dx}.\] Evaluate the integral: \[\int\left(\frac{1}{x} + \tan x\right)dx = \ln|x| + \ln|\sec x| = \ln|x\sec x|.\] So the integrating factor is \[\text{IF} = e^{\ln|x\sec x|} = x\sec x.\] Multiply both sides of the standard form by \(x\sec x\): \[x\sec x\frac{dy}{dx} + y\sec x(1 + x\tan x) = x\sec x.\] The left side is exactly \(\frac{d}{dx}(y \cdot x\sec x)\), so: \[\frac{d}{dx}(xy\sec x) = x\sec x.\] Integrate both sides: \[xy\sec x = \int x\sec x\,dx.\] Use integration by parts with \(u = x\) and \(dv = \sec x\,dx\): \[\int x\sec x\,dx = x\ln|\sec x + \tan x| - \int \ln|\sec x + \tan x|\,dx.\] Keeping the result in implicit form with the constant of integration \(C\): \[xy\sec x = x\ln|\sec x + \tan x| - \int \ln|\sec x + \tan x|\,dx + C.\] Dividing throughout by \(x\sec x\) (i.e., multiplying by \(\cos x / x\)) gives the general solution in the form \[y = \cos x\ln|\sec x + \tan x| - \frac{\cos x}{x}\int \ln|\sec x + \tan x|\,dx + \frac{C\cos x}{x}.\]

Answer: \(xy\sec x = x\ln|\sec x + \tan x| - \int\ln|\sec x + \tan x|\,dx + C\)

Example 2

Question: Find the general solution of the differential equation: \[\frac{dy}{dx} + 2xy = 4x.\]

Solution: The equation is already in the standard linear form \(\frac{dy}{dx} + P(x)y = Q(x)\) with \(P(x) = 2x\) and \(Q(x) = 4x\). Compute the integrating factor: \[\text{IF} = e^{\int 2x\,dx} = e^{x^2}.\] Multiply both sides by \(e^{x^2}\): \[e^{x^2}\frac{dy}{dx} + 2x e^{x^2} y = 4x e^{x^2}.\] The left side is \(\frac{d}{dx}\left(y e^{x^2}\right)\), so: \[\frac{d}{dx}\left(y e^{x^2}\right) = 4x e^{x^2}.\] Integrate both sides: \[y e^{x^2} = \int 4x e^{x^2}\,dx.\] For the right-hand side, let \(t = x^2\) so \(dt = 2x\,dx\): \[\int 4x e^{x^2}\,dx = 2\int e^{t}\,dt = 2e^{t} + C = 2e^{x^2} + C.\] Therefore: \[y e^{x^2} = 2e^{x^2} + C.\] Dividing both sides by \(e^{x^2}\): \[y = 2 + Ce^{-x^2}.\]

Answer: \(y = 2 + Ce^{-x^2}\)

🎯 Try a Similar Question

Try a Similar Question

Question: Find the general solution of the differential equation \(x\,\frac{dy}{dx} + y - x^2 + xy\cot x = 0\), where \(x \ne 0\).

Solution

  1. Step 1: Rewrite in standard linear form: Divide every term by \(x\) (since \(x \ne 0\)): We get \(\frac{dy}{dx} + \frac{y}{x} + y\cot x = x\). Group the \(y\)-terms on the left: \[\frac{dy}{dx} + y\left(\frac{1}{x} + \cot x\right) = x\] This is of the standard form \(\frac{dy}{dx} + P(x)\,y = Q(x)\) with \(P(x) = \frac{1}{x} + \cot x\) and \(Q(x) = x\).
  2. Step 2: Compute the Integrating Factor: The integrating factor is \[\mu = e^{\int P(x)\,dx} = e^{\int\left(\frac{1}{x} + \cot x\right)dx}\] Compute the integral: \[\int\left(\frac{1}{x} + \cot x\right)dx = \ln|x| + \ln|\sin x| = \ln|x\sin x|\] Therefore, \[\mu = e^{\ln|x\sin x|} = x\sin x\]
  3. Step 3: Multiply through by the Integrating Factor: Multiply both sides of the standard-form equation by \(x\sin x\): \[x\sin x\,\frac{dy}{dx} + y\,\sin x + y\,x\cos x = x^2\sin x\] The left-hand side is exactly \(\frac{d}{dx}\left(y\,x\sin x\right)\), so we can write: \[\frac{d}{dx}\left(y\,x\sin x\right) = x^2\sin x\]
  4. Step 4: Integrate both sides: Integrate both sides with respect to \(x\): \[y\,x\sin x = \int x^2\sin x\,dx\] Use integration by parts twice for \(\int x^2\sin x\,dx\). First application — let \(u = x^2\), \(dv = \sin x\,dx\), so \(du = 2x\,dx\), \(v = -\cos x\): \[\int x^2\sin x\,dx = -x^2\cos x + 2\int x\cos x\,dx\] Second application for \(\int x\cos x\,dx\) — let \(u = x\), \(dv = \cos x\,dx\), so \(du = dx\), \(v = \sin x\): \[\int x\cos x\,dx = x\sin x - \int\sin x\,dx = x\sin x + \cos x\] Substituting back: \[\int x^2\sin x\,dx = -x^2\cos x + 2(x\sin x + \cos x) = -x^2\cos x + 2x\sin x + 2\cos x\]
  5. Step 5: Write the General Solution: Substituting the result back: \[y\,x\sin x = -x^2\cos x + 2x\sin x + 2\cos x + C\] Divide both sides by \(x\sin x\) (with \(x \ne 0\) and \(\sin x \ne 0\)) to express \(y\) explicitly: \[y = \frac{-x^2\cos x + 2x\sin x + 2\cos x + C}{x\sin x}\] This can also be written as: \[y = -x\cot x + 2 + \frac{2\cos x}{x\sin x} + \frac{C}{x\sin x}\]

Answer: The general solution is \[y\,x\sin x = -x^2\cos x + 2x\sin x + 2\cos x + C\] or equivalently \[y = \frac{-x^2\cos x + 2x\sin x + 2\cos x + C}{x\sin x}\]

Everything you get with Solver7

More questions in Differential Equations

Chapter 9 Examples Q1(i) 65/2/1 2022 / Section A Q1 Chapter 9 Examples Q1(ii) 65/2/2 2023 / Section A Q2 Chapter 9 Examples Q1(iii) 65/2/2 2023 / Section A Q3 Chapter 9 Examples Q2 Chapter 9 Examples Q3 Chapter 9 Examples Q4 Chapter 9 Examples Q5 65/1/1 2023 / Section A Q7 65/2/1 2024 / Section A Q7 65/3/1 2024 / Section A Q7 65/4/1 2022 / Section A Q5 Chapter 9 Examples Q6 65/1/1 2024 / Section A Q8 65/3/1 2023 / Section A Q8 Chapter 9 Examples Q7 65/3/1 2023 / Section A Q9 65/4/2 2024 / Section A Q9 Chapter 9 Examples Q8 65(B) 2026 / Section A Q10 65/4/1 2023 / Section A Q10 Chapter 9 Examples Q9 65(B) 2026 / Section A Q11 65/1/1 2026 / Section A Q11 65/2/1 2022 / Section B Q9 65/4/1 2023 / Section A Q11 Chapter 9 Examples Q10 65/1/1 2026 / Section A Q12 65/4/1 2026 / Section A Q12 Chapter 9 Examples Q11 65/3/1 2026 / Section A Q13 65/4/1 2026 / Section A Q13 65/4/2 2024 / Section A Q13 65/5/1 2026 / Section A Q13 Chapter 9 Examples Q12 65/1/1 2024 / Section A Q14 65/2/1 2024 / Section A Q14 65/5/1 2026 / Section A Q14 Chapter 9 Examples Q13 65/1/1 2023 / Section A Q15 65/2/3 2026 / Section A Q15 Chapter 9 Examples Q14 65/2/3 2026 / Section A Q16 65/4/1 2022 / Section C Q12(a) Chapter 9 Examples Q15 65/4/1 2022 / Section C Q12(b) Chapter 9 Examples Q16 Chapter 9 Examples Q17 65/3/1 2026 / Section A Q19 Chapter 9 Examples Q18 Chapter 9 Miscellaneous Examples Q19 Chapter 9 Miscellaneous Examples Q20 Chapter 9 Miscellaneous Examples Q21 Chapter 9 Miscellaneous Examples Q22 Exercise 9.1 Q1 Exercise 9.1 Q2 Exercise 9.1 Q3 Exercise 9.1 Q4