How would you solve this ODE:
$$(1 + x^{2})y’’ + 4xy’ + 2y = 1/(1+x^{2})$$
I have the answer for homogenous part of this ODE but do not know how to do this, variation of parameter is a mess at integral step when applying to this
Any help would be appreciated. Thank you very much :)
Using variation of parameters is actually not that messy.
Dividing by $(1+x^2)$, we get
$$ y'' + \frac{4x}{x^2+1}y' + \frac{2}{x^2+1} y = \frac{1}{(x^2+1)^2} $$
which has inhomogeneity of $g(x) = \frac{1}{(x^2+1)^2}$. The solutions to the homogeneous equation are $$y_1 = \frac{1}{x^2+1} \ \text{ and } \ y_2 = \frac{x}{x^2+1}$$which we can use to compute the Wronskian, $W = \frac{1}{(x^2+1)^2} \neq 0$. Then, the particular solution is $u_1y_1+u_2y_2$ where $u_1 = -\int \frac{y_2g}{W}dx$ and $u_2 = \int \frac{y_1 g}{W} dx$. The plugging in what we have,
$$ u_1 = -\int \frac{x}{x^2+1}dx = -\frac{1}{2}\log(x^2+1) $$
$$ u_2 = \int \frac{1}{x^2+1} = \tan^{-1}(x)$$
Thus, the solution is
$$ y(x) = \frac{c_1-\frac{1}{2}\log(x^2+1)+c_2x + \tan^{-1}(x)}{x^2+1} $$