How do I solve $y+x\frac{\mathrm{d} y}{\mathrm{d} x}=3\; $ given $(x=1,y=1) $ $y+x\frac{\mathrm{d} y}{\mathrm{d} x}=3\; (x=1,y=1)$
Any help would be much appreciated.
$$x\frac{\mathrm{d} y}{\mathrm{d} x}=3-y$$
$$\int \frac{1}{3-y} dy=\int\frac{1}{x}dx$$
$$3-y=x\cdot (\pm e^{C})$$
$$y=-x+3\cdot (\pm e^{C})$$
Let $(\pm e^{C}) = k$
$y=k(-x+3)$, so $ k=\frac{1}{2} from (1,1)$
$y=-\frac{1}{2}(x-3)$
Is this right?? I have no idea.
 A: It is a linear ODE:
$$\frac{dy}{dx}+\frac{y}{x}=\frac{3}{x}$$
The integrating factor $I=e^{\int 1/x ~dx}=x$
So $$y=\frac{1}{x} \int 3 dx+\frac{c}{x} \implies y=3+\frac{c}{x}$$
$y(1)=1$ gives $c=-2$.
So $$y=3-\frac{2}{x}$$
A: Hint: This is variable separable. 
$$\dfrac{\mathrm dy}{3-y}=\dfrac{\mathrm dx}{x}, \ y(1)=1$$
Can you proceed?
A: $$y+xy'=(xy)'$$ and a solution is
$$xy=3x+c,$$ with
$$1\cdot1=3\cdot1+c.$$

Alternatively, with $z:=xy$, we have pure differentials
$$dz=3\,dx$$ which integrate from $(1,1)$ to $(x,z)$ as $$z-1=xy-1=3x-3.$$

Yet alternatively:
The homogeneous equation is
$$y+xy'=0$$ or $$\frac{dx}{x}+\frac{dy}y=0$$
or
$$\log(xy)=c.$$
Now by inspection of the non-homogeneous equation, $$y=3$$ is a particular solution, and the general solution is
$$y=3+\frac cx.$$
A: You made a little mistake here :
$$\int \frac{1}{3-y} dy=\int\frac{1}{x}dx$$
You should rewrite it as:
$$-\int \frac{1}{y-3} dy=\int\frac{1}{x}dx$$
Then write it the way you did:
$$(y-3)^{-1}=kx$$
And here
$$3-y=x\cdot (\pm e^{C})$$
This should yields:
$$\implies y=3-kx$$
And not:
$$y=k(3-x)$$
