Problem 181
Medium Initial-Value Problems

Given that y_1=x^2 is a particular integral, find the…

Given that $y_1=x^2$ is a particular integral, find the general solution of $(1+x^2)y'' + 2xy' = 6x^2+2$, satisfying $y(-1)-y'(-1)=0$.

Explanation of Method

The left-hand side is the exact derivative $\tfrac{d}{dx}[(1+x^2)y']$, so two direct integrations produce the general solution before the boundary condition is even applied.

Step 1: Recognizing an exact derivative

The left-hand side is the derivative of a product. Since $\dfrac{d}{dx}\bigl[(1+x^2)y'\bigr] = (1+x^2)y'' + 2xy'$ by the product rule, the entire equation collapses to a single total derivative:

\[ \frac{d}{dx}\bigl[(1+x^2)y'\bigr] = 6x^2+2. \]

This is the key structural observation: a second-order equation whose left side is exactly $\frac{d}{dx}[(1+x^2)y']$ can be integrated directly, without needing to solve a homogeneous problem first.

Step 2: First integration

Integrating both sides in $x$: $(1+x^2)y' = \int(6x^2+2)\,dx = 2x^3+2x+C_1$.

The cubic numerator factors conveniently against the denominator: $\frac{2x^3+2x}{1+x^2} = \frac{2x(x^2+1)}{1+x^2} = 2x$.

so the constant-free part of the right side simplifies exactly, leaving

\[ y' = 2x + \frac{C_1}{1+x^2}. \]

Step 3: Second integration

Integrating once more: $y = x^2 + C_1\arctan x + C_2$.

Setting $C_1=C_2=0$ recovers exactly the given particular integral $y_1=x^2$, and setting $C_1=0$ shows that $y=1$ and $y=\arctan x$ are the two homogeneous solutions being added on top of it — consistent with $y_1=x^2$ being one particular solution of the full nonhomogeneous equation.

Step 4: Applying the condition $y(-1)-y'(-1)=0$

From Step 3, $y'=2x+C_1/(1+x^2)$. Evaluate both at $x=-1$, using $\arctan(-1)=-\pi/4$: $y(-1) = 1 - C_1\frac{\pi}{4} + C_2, \qquad y'(-1) = -2 + \frac{C_1}{2}$.

The condition $y(-1)-y'(-1)=0$ gives

\[ \left(1 - C_1\frac{\pi}{4} + C_2\right) - \left(-2+\frac{C_1}{2}\right) = 0 \;\Longrightarrow\; 3 + C_2 - C_1\left(\frac{\pi}{4}+\frac12\right) = 0. \]

Solving for $C_2$ in terms of $C_1$: \[C_2 = C_1\left(\frac{\pi}{4}+\frac12\right) - 3 = C_1\cdot\frac{\pi+2}{4} - 3.\]

Step 5: Assembling the one-parameter family

Substituting this $C_2$ back into $y=x^2+C_1\arctan x+C_2$: \[y = x^2 + C_1\arctan x + C_1\cdot\frac{\pi+2}{4} - 3 = x^2 - 3 + C_1\!\left(\arctan x + \frac{\pi+2}{4}\right).\]

Renaming $C_1\to C$, this is a one-parameter family: the boundary condition has used up one of the two free constants, leaving exactly one arbitrary constant, as expected for a condition imposed at a single point.

Step 6: Verification

The ODE. For any constants $C_1,C_2$, $y=x^2+C_1\arctan x+C_2$ satisfies the original equation term by term: the $x^2$ part reproduces the right side $6x^2+2$ exactly (as built into the construction in Steps 1–3), while $\arctan x$ and $1$ are homogeneous solutions of $(1+x^2)y''+2xy'=0$, contributing $0$ regardless of $C_1,C_2$. So the boxed family solves the ODE for every value of $C$.

The boundary condition. Evaluating the boxed formula and its derivative $y'=2x+C\big/(1+x^2)$ at $x=-1$: \[y(-1) = 1 - 3 + C\!\left(-\frac{\pi}{4}+\frac{\pi+2}{4}\right) = -2 + C\cdot\frac{2}{4} = -2+\frac{C}{2},\]

\[ y'(-1) = -2 + \frac{C}{1+1} = -2+\frac{C}{2}. \]

The two expressions are identical for every $C$, so $y(-1)-y'(-1)=\bigl(-2+\tfrac{C}{2}\bigr)-\bigl(-2+\tfrac{C}{2}\bigr)=0$ automatically — confirming that the boxed one-parameter family satisfies the given condition for any choice of $C$, exactly as it should after one constant was eliminated in Step 4.\ $\checkmark$


Result

Final answer:

\[\boxed{\,y = x^2 - 3 + C\!\left(\arctan x + \frac{\pi+2}{4}\right)\,}\]