Step 1: Understand the standard form for a first-order linear equation.
The given equation is in the form:
\[
(x^2 + 1) \frac{dy}{dx} + 2xy = x^2 - 1
\]
This is a first-order linear ordinary differential equation. To solve this, we need to find the integrating factor (I.F.), which is given by the formula:
\[
\text{I.F.} = e^{\int P(x) dx}
\]
where \( P(x) \) is the coefficient of \( y \) in the equation after rewriting it in standard form:
\[
\frac{dy}{dx} + P(x) y = Q(x)
\]
Step 2: Rewrite the equation in standard form.
Divide through by \( x^2 + 1 \) to put the equation in standard form:
\[
\frac{dy}{dx} + \frac{2x}{x^2 + 1} y = \frac{x^2 - 1}{x^2 + 1}
\]
Now, the coefficient of \( y \) is \( \frac{2x}{x^2 + 1} \), so:
\[
P(x) = \frac{2x}{x^2 + 1}
\]
Step 3: Find the integrating factor.
The integrating factor is:
\[
\text{I.F.} = e^{\int \frac{2x}{x^2 + 1} dx}
\]
The integral of \( \frac{2x}{x^2 + 1} \) is \( \ln(x^2 + 1) \), so:
\[
\text{I.F.} = e^{\ln(x^2 + 1)} = x^2 + 1
\]
Step 4: Conclusion.
Thus, the integrating factor for the given differential equation is \( x^2 + 1 \).