# Solve differential equation (2y-e^x)dx+xdy=0, x>0

First order differential equations
Solve differential equation $$(2y-e^x)dx+xdy=0$$, x>0

2020-11-11

$$(2y-e^x)dx+xdy=0$$
$$2y-e^x+x dy/dx=0$$
$$(2y)/x-e^x/x+dy/dx=0$$
$$dy/dx+(2/x)y=e^x/x$$
Above differential equation is form of $$dy/dx+Py=Q$$
Integrating factor will be
$$I.F.= e^{\int Pdx}$$
$$= e^{\int 2/x dx}$$
$$= e^{2 \ln x}$$ $$= e^{\ln x^2}$$
$$= x^2$$
Solution will be given as
$$I.F*y= \int I.F*Qdx$$
$$x^2y= \int x^2* e^2/x dx$$
$$x^2y= \int xe^x dx$$
$$x^2y= [x \int e^x dx-\int [d/dx(x) \int e^x dx]] dx$$
$$x^2y= [xe^x-e^x]+c$$
$$y=1/x^2(xe^x-e^x+c)$$