We rearrange the given differential equation to combine all the y terms on the left side of the equation and the x terms on the right side:
[(1 + y^2) / y] dy = cos(x) dx
[(1/y) + y] dy = cos(x) dx
We integrate both sides to get
ln y + (y^2 / 2) = sin(x) + C
Then, we apply the initial condition y = 1 at x = 0 to get the value of C:
ln (1) + (1^2 / 2) = sin(0) + C
C = ln (1) + (1^2 / 2) - sin(0)
C = 1/2
Therefore, our final answer is
ln (y) + (y^2 / 2) = sin(x) + 1/2