Find general solution of differential equation $x\frac{dy}{dx} + y = a \sin^2x.$ and $a \in \mathbb{R}$ The real number $a$ and the differential equation are given $$x\frac{dy}{dx} + y = a \sin^2x.$$
a) Find a general solution of the equation.
b) Find all $a \in \mathbb{R}$ that solutions of $y (x)$ of the differential equation
$$\lim_{x \to \infty}y (x) = 3.$$
Which of these solutions have limited functions?
So in example a) I got function $$y(x)=\frac{a(2x-\sin2x)+4C}{4x}$$
When I calculate limit of this function I got $\frac{a}{2}$, so $a = 6$.
Is this the only solution or is some different?

$$\begin{align}x\frac{dy}{dx} + y &= a\sin^2(x) \\  x\frac{dy}{dx} + \frac{dx}{dx}y &= a\sin^2(x) \\ \frac{d}{dx}(xy) &= a\sin^2(x)\\ \therefore xy = \int a\sin^2x\ dx &= \frac{ax}{2} - \frac{a\sin(2x)}{4} + c\\ \implies y &= \frac{a}{2} - \frac{a\sin(2x)}{2x}+ \frac{c}{x}\end{align} $$
Therefore, as $ \lim_{x \to \infty} y = 3$ we have $\frac{a}{2} = 3 \implies a =6$.
