Step 1: Understanding the Concept:
The given equation is a first-order linear differential equation. We can solve it by finding an integrating factor. After finding the general solution, we use the given initial condition to determine the value of the integration constant and find the particular solution.
Step 2: Key Formula or Approach:
The equation is in the standard linear form \( \frac{dy}{dx} + P(x)y = Q(x) \).
1. Identify \( P(x) \) and \( Q(x) \).
2. Calculate the Integrating Factor (I.F.): \( e^{\int P(x) dx} \).
3. The general solution is given by \( y \cdot (\text{I.F.}) = \int Q(x) \cdot (\text{I.F.}) dx + C \).
4. Use the initial condition to find C.
Step 3: Detailed Explanation or Calculation:
The given equation is \( \frac{dy}{dx} + y \cot x = 2x + x^2 \cot x \).
1. Identify P(x) and Q(x):
This is a linear differential equation with \( P(x) = \cot x \) and \( Q(x) = 2x + x^2 \cot x \).
2. Calculate the Integrating Factor (I.F.):
\[ \text{I.F.} = e^{\int \cot x dx} = e^{\ln(\sin x)} = \sin x \]
3. Find the General Solution:
\[ y \cdot (\sin x) = \int (2x + x^2 \cot x)(\sin x) dx + C \]
\[ y \sin x = \int (2x \sin x + x^2 \cot x \sin x) dx + C \]
\[ y \sin x = \int (2x \sin x + x^2 \cos x) dx + C \]
The integral \( \int (2x \sin x + x^2 \cos x) dx \) is in the form \( \int (f'(x)g(x) + f(x)g'(x)) dx \), which is the derivative of a product.
Let \( f(x) = x^2 \) and \( g(x) = \sin x \). Then \( f'(x) = 2x \) and \( g'(x) = \cos x \).
So, the integrand is the derivative of \( x^2 \sin x \).
\[ \int (2x \sin x + x^2 \cos x) dx = x^2 \sin x \]
Therefore, the general solution is:
\[ y \sin x = x^2 \sin x + C \]
4. Find the Particular Solution:
We are given the initial condition \( y=0 \) when \( x=\frac{\pi}{2} \). Substitute these values:
\[ (0) \sin\left(\frac{\pi}{2}\right) = \left(\frac{\pi}{2}\right)^2 \sin\left(\frac{\pi}{2}\right) + C \]
\[ 0 \cdot 1 = \frac{\pi^2}{4} \cdot 1 + C \]
\[ 0 = \frac{\pi^2}{4} + C → C = -\frac{\pi^2}{4} \]
Substitute the value of C back into the general solution:
\[ y \sin x = x^2 \sin x - \frac{\pi^2}{4} \]
We can express y explicitly:
\[ y = x^2 - \frac{\pi^2}{4\sin x} \]
Step 4: Final Answer:
The particular solution is \( y \sin x = x^2 \sin x - \frac{\pi^2}{4} \), or \( y = x^2 - \frac{\pi^2}{4}\csc x \).