krusty the clown
I am supposed to make this equation exact and then solve it. I can do the problem, but I don't understand why I am doing what I am. Is the final answer right?
cos(x) dx + (1 + \frac {2}{y}) sin(x) dy = 0
M(x,y)=cos(x)
N(x,y)=(1 + \frac{2}{y}) sin(x)
\frac{\partial M(x,y)}{\partial y} = 0
\frac{\partial N(x,y)}{\partial x} = (1 + \frac {2}{y}) cos(x)
The integration factor is then
u(x)= e^{\int\frac{(1+\frac{2}{y})cos(x)}{cos(x)}dy)}=e^{y+2\ln(y)} = y^2 e^y
Multiplying the integration factor by both sides,
y^2 e^y cos(x) dx + (y^2 e^y + 2ye^y)sin(x)dy=0
I confirmed that this was exact, the new M(x,y) and N(x,y) are
M(x,y)=y^{2}e^{y}cos(x) \ \ \ N(x,y)=ye^{y}(y+2)sin(x)
g(x,y)=\int{M(x,y)dx}+g(y)=\int{(2ye^{y}cos(x)+y^{2}e^{y}cos(x))dx}+g(y)=sin(x)2ye^{y}+sin(x)y^{2}e^{y}+g(y)
N(x,y)=\frac{\partial}{\partial y}(2ye^{y}sin(x)+y^{2}e^{y}sin(x)+g(y))
=e^{y}sin(x)(2+4y+y^{2})+g'(y)
set this equal to N(x,y), and solve for g'(x)
e^{y}sin(x)(2+4y+y^{2})+g'(y)=y^{2}e^{y}sin(x)+2ye^{y}sin(x)
g'(x)=-4e^{y}sin(x) \ \ \ \ \ \ \ \ \ \\ \ g(x)=-4e^{y}sin(x)+c
g(x,y)=e^{y}sin(x)(2y+y^{2}-4)=C
Thanks-Erik
cos(x) dx + (1 + \frac {2}{y}) sin(x) dy = 0
M(x,y)=cos(x)
N(x,y)=(1 + \frac{2}{y}) sin(x)
\frac{\partial M(x,y)}{\partial y} = 0
\frac{\partial N(x,y)}{\partial x} = (1 + \frac {2}{y}) cos(x)
The integration factor is then
u(x)= e^{\int\frac{(1+\frac{2}{y})cos(x)}{cos(x)}dy)}=e^{y+2\ln(y)} = y^2 e^y
Multiplying the integration factor by both sides,
y^2 e^y cos(x) dx + (y^2 e^y + 2ye^y)sin(x)dy=0
I confirmed that this was exact, the new M(x,y) and N(x,y) are
M(x,y)=y^{2}e^{y}cos(x) \ \ \ N(x,y)=ye^{y}(y+2)sin(x)
g(x,y)=\int{M(x,y)dx}+g(y)=\int{(2ye^{y}cos(x)+y^{2}e^{y}cos(x))dx}+g(y)=sin(x)2ye^{y}+sin(x)y^{2}e^{y}+g(y)
N(x,y)=\frac{\partial}{\partial y}(2ye^{y}sin(x)+y^{2}e^{y}sin(x)+g(y))
=e^{y}sin(x)(2+4y+y^{2})+g'(y)
set this equal to N(x,y), and solve for g'(x)
e^{y}sin(x)(2+4y+y^{2})+g'(y)=y^{2}e^{y}sin(x)+2ye^{y}sin(x)
g'(x)=-4e^{y}sin(x) \ \ \ \ \ \ \ \ \ \\ \ g(x)=-4e^{y}sin(x)+c
g(x,y)=e^{y}sin(x)(2y+y^{2}-4)=C
Thanks-Erik