To solve the differential equation \(\frac{dy}{dx} = (x^3 - 2x \tan^{-1} y)(1 + y^2)\), we will follow these steps:
### Step 1: Rewrite the Equation
We start with the given equation:
\[
\frac{dy}{dx} = (x^3 - 2x \tan^{-1} y)(1 + y^2)
\]
We can divide both sides by \(1 + y^2\):
\[
\frac{1}{1 + y^2} \frac{dy}{dx} = x^3 - 2x \tan^{-1} y
\]
### Step 2: Substitute \(z = \tan^{-1} y\)
Let \(z = \tan^{-1} y\). Then, the derivative \(\frac{dy}{dx}\) can be expressed in terms of \(z\):
\[
\frac{dz}{dx} = \frac{1}{1 + y^2} \frac{dy}{dx}
\]
Thus, we can rewrite the equation as:
\[
\frac{dz}{dx} = z + 2x z = x^3
\]
This simplifies to:
\[
\frac{dz}{dx} + 2xz = x^3
\]
### Step 3: Identify the Linear Differential Equation
This is a linear first-order differential equation in the standard form:
\[
\frac{dz}{dx} + P(x)z = Q(x)
\]
where \(P(x) = 2x\) and \(Q(x) = x^3\).
### Step 4: Find the Integrating Factor
The integrating factor \(I(x)\) is given by:
\[
I(x) = e^{\int P(x) \, dx} = e^{\int 2x \, dx} = e^{x^2}
\]
### Step 5: Multiply the Equation by the Integrating Factor
Multiply the entire differential equation by the integrating factor:
\[
e^{x^2} \frac{dz}{dx} + 2x e^{x^2} z = x^3 e^{x^2}
\]
### Step 6: Rewrite the Left Side as a Derivative
The left side can be rewritten as:
\[
\frac{d}{dx}(e^{x^2} z) = x^3 e^{x^2}
\]
### Step 7: Integrate Both Sides
Now, integrate both sides:
\[
\int \frac{d}{dx}(e^{x^2} z) \, dx = \int x^3 e^{x^2} \, dx
\]
The left side simplifies to:
\[
e^{x^2} z = \int x^3 e^{x^2} \, dx
\]
### Step 8: Solve the Right Side Integral
To solve \(\int x^3 e^{x^2} \, dx\), we can use integration by parts or substitution. Let \(u = x^2\), then \(du = 2x \, dx\) or \(dx = \frac{du}{2x}\). The integral becomes:
\[
\int x^3 e^{x^2} \, dx = \frac{1}{2} \int u e^u \, du
\]
Using integration by parts:
\[
\int u e^u \, du = u e^u - \int e^u \, du = u e^u - e^u + C
\]
Thus,
\[
\int x^3 e^{x^2} \, dx = \frac{1}{2} (x^2 e^{x^2} - e^{x^2}) + C
\]
### Step 9: Substitute Back
Substituting back, we have:
\[
e^{x^2} z = \frac{1}{2} (x^2 e^{x^2} - e^{x^2}) + C
\]
Dividing through by \(e^{x^2}\):
\[
z = \frac{1}{2} (x^2 - 1) + Ce^{-x^2}
\]
### Step 10: Substitute Back for \(y\)
Recall that \(z = \tan^{-1} y\), so:
\[
\tan^{-1} y = \frac{1}{2} (x^2 - 1) + Ce^{-x^2}
\]
Finally, taking the tangent of both sides gives us:
\[
y = \tan\left(\frac{1}{2} (x^2 - 1) + Ce^{-x^2}\right)
\]
### Final Solution
Thus, the solution to the differential equation is:
\[
y = \tan\left(\frac{1}{2} (x^2 - 1) + Ce^{-x^2}\right)
\]