Solve the differential equation: `(d"y")/(d"x") - (2"x")/(1+"x"^2) "y" = "x"^2 + 2`

#### Solution

The given differential equation is

`(d"y")/(d"x") - (2"x")/(1+"x"^2) "y" = ("x"^2 + 2)`

This equation is of the form `(d"y")/(d"x") + P"y" = "Q", "where P" = (-2"x")/(1+ "x"^2) and "Q" = "x"^2 + 2`

Now, `"I.F." e^(intPd"x") = e^(int_ (-2"x")/(1+"x"^2) d"x" =e^-log(1+"x"^2) = e^log((1)/(1+"x"^2)) = (1)/(1+"x"^2)`

The general solution of the given differential equation is

`"y" xx "I.F." = int_ ("Q" xx "I.F.") d"x" + "C", "where C is an aribatry constant"`

⇒ `("y")/(1 +"x"^2) = int_ ("x"^2 + 2)/(1+ "x"^2) d"x" + "C"`

= `int_ (1 + (1)/("x"^2 + 1)) d"x" + "C"`

= `int_ d"x" + int(1)/("x"^2 + 1) d"x" + "C"`

= `"x" + tan^-1 "x" + "C"`

`"y" = (1 + "x"^2)("x" + tan^-1 "x" + "C")`