## Astrophysics one year ago @ganeshie8

1. Astrophysics

Hey ganeshie could you just check over my work, I want to know if I'm doing this right, i have to find an integrating factor and solve the given equation, it'll take me a bit to type all this out haha, $y+(2xy-e^{-2y})y'=0$

2. Astrophysics

$ydx+(2xy-e^{-2y})dy=0$ $M(x,y) = y \implies M_y = 1$$N(x,y)=(2xy-e^{-2y})dy \implies N_y = 2y$ so this is obviously not an exact equation as$M_y \neq Nx$ So I used the following to see whether to find a integrating factor that depends on y or x, $\frac{ M_y-N_x }{ M } = \frac{ 1-2y }{ y }$ so this depends on only y, that means I can use this p = p(y). Now I multiply the entire equation by p(y) giving me $p(y)ydx+p(y)(2xy-e^{-2y})dy=0$ next I can look for my p(y) using the equation above, $M(x,y)=p(y)y \implies M_y = p'(y)y+p(y)$$N(x,y) = p(y)(2xy-e^{2y}) \implies N_x = 2p(y)y$ where $M_y=N_x$ then I get $p'y=2py-p \implies p = \frac{ p'y }{ (2y-1) }$doing integrating I got $p= e^{2y}e^{-1}e^c \frac{ 1 }{ 2y }$ and then I replaced $\frac{ e^c }{ e } = c_1$ I'm not exactly sure why we don't include the constants but then my integrating factor is $p(y) = \frac{ e^{2y} }{ 2y }$ ...haha this is pretty long

3. Astrophysics

Now I multiplied the equation but integrating factor$\left( \frac{ e^{2y} }{ 2y } \right)ydx+\left( \frac{ e^{2y} }{ 2y } \right)(2xy-e^{-2y})dy=0$which simplifies to$\frac{ e^{2y} }{ 2 }dx+(e^{2y}x-\frac{ 1 }{ 2y })dy=0$ now we check to see if it's an exact equation I got$M(x,y)=\frac{ e^{2y} }{ 2 } \implies M_y = e^{2y}$ and$N(x,y) = e^{2y}x-\frac{ 1 }{ 2y } \implies N_x = e^{2y}$ therefore $M_y=N_x \implies \text{exact}$ $\psi_x = M(x,y) = \frac{ e^{2y} }{ 2 }$$\psi_y = N(x,y) = e^{2y}x-\frac{ 1 }{ 2y }$ letting $\psi_1 = A~~~\text{and}~~~\psi_2=B$ now I'll integrate A $\psi_x = \frac{ e^{2y} }{ 2 } \implies \int\limits \frac{ e^{2y} }{ 2 }dx = \frac{ e^{2y} }{ 2 }x+g(y) = \Psi(x,y)$ now I took the derivative with respect to y, $\frac{ \partial (\frac{ e^{2y} }{ 2 }x+g(y)) }{ \partial y } = e^{2y}x+g'(y)$ comparing with B $g'(y) = -\frac{ 1 }{ 2y } \implies - \int\limits \frac{ 1 }{ 2y } dy \implies g(y) = -\frac{ 1 }{ 2 }\ln|y|+C$ which gives me $\Psi(x,y) = \frac{ e^{2y} }{ 2 }x-\frac{ 1 }{ 2 }\ln|y|$ but the general solution is $\Psi (x,y) = C \implies \frac{ e^{2y} }{ 2 }x-\frac{ 1 }{ 2 }\ln|y|=C$

4. Astrophysics

The solution does not have 1/2's, not sure where exactly my mistake is xD

5. Astrophysics

That should say $\psi_x = A ~~~\text{and}~~~\psi_y = B$

6. anonymous

So you can label your two functions anything? M and N or P and Q?

7. Astrophysics

*Scratches head* I can't find the mistake..the answer should be $xe^{2y}-\ln|y|=C$

8. Astrophysics

The M and N is just a way to find whether or not it's an exact equation

9. anonymous

@Empty

10. Astrophysics

but yeah essentially, M(x,y)dx+N(x,y)dy = 0

11. anonymous

Oh i see,kind of like test values, but instead of values you have functions.

12. Empty

I hate M and N crap, it's basically a waste of extra notation just cause 'it might not be exact' lol

13. Astrophysics

Haha, I'm just doing it the way I learnt

14. Empty

Are you familiar with second derivatives commuting? $\frac{\partial^2 f}{\partial x \partial y} = \frac{\partial^2 f}{\partial y \partial x}$

15. Astrophysics

I did that in calc 2, but omg you just gave me an idea to check my solution

16. Empty

$f(x,y(x))=C$ Chain rule: $\frac{d f}{dx} = \frac{\partial f}{\partial x} \frac{dx}{dx} + \frac{\partial f}{\partial y} \frac{dy}{dx} = 0$ Ok really $$\frac{dx}{dx}=1$$ so throw this away to get this: $\frac{\partial f}{\partial x} + \frac{\partial f}{\partial y}y' = 0$ Now we see that if something of this form is truly exact, then clearly: $\frac{\partial^2 f}{\partial x \partial y} = \frac{\partial^2 f}{\partial y \partial x}$

17. Empty

I mean you sorta explained this earlier now that I'm scrolling up so I'm kinda frightened by the fact that you said you didn't know what that meant that the second derivatives commute like that.

18. anonymous

multiply by 2 R.H.S=2C=C'

19. anonymous

C'=C=A CONSTANT.

20. Astrophysics

What do you mean @Empty Haha and if that's it...@surjithayer

21. anonymous

$xe ^{2y}-\ln y=2C=c$

22. Astrophysics

Thanks @surjithayer And yeah I see how that's done, but I don't know what you're trying to say @Empty

23. Astrophysics

ok then

24. anonymous

just multiply through by $$2$$ -- the whole point is that solutions to an exact differential equation are level sets of some potential function $$\Phi$$, i.e. $$\Phi=C$$ whether we multiply both sides by $$2)$$ doesn't make a difference, since $$2\Phi=2C\Leftrightarrow\Phi=C$$ gives the same curve

25. anonymous

the M,N stuff is just how to see whether there exists an integrating factor in one-variable so we can reduce the problem to an ODE

26. anonymous

$$y+(2xy-e^{-2y})y'=0\\y\, dx+(2xy-e^{-2y})dy=0$$so we want to know if there exists some integrating factor $$\mu$$ such that we can write the LHS as the total differential of some potnetial function $$\Phi$$, i.e. $$d\Phi=\mu y\, dx+\mu\cdot(2xy-e^{-2y})dy$$so that it reduces to $$d\Phi=0\implies \Phi(x,y)=C$$, giving the level sets of $$\Phi$$ as our solution curves

27. Astrophysics

Yes! Thanks @oldrin.bataku exactly what I was looking for, I realized when I first started exact equations they give a solution to a potential function, or are one in the same.

28. anonymous

if $$\mu y\, dx+\mu\cdot(2xy-e^{-2y})dy$$ is the total differential of some $$\Phi$$, then we'd expect $$\frac{\partial\Phi}{\partial x}=\mu y,\frac{\partial\Phi}{\partial y}=\mu\cdot(2xy-e^{-2y})$$and if these are partial derivatives of $$\Phi$$ we expect symmetry of mixed partials, i.e. $$\frac{\partial^2\Phi}{\partial y\partial x}=\frac{\partial^2\Phi}{\partial x\partial y}\\\mu+\frac{\partial \mu}{\partial y}y=\mu\cdot2y+\frac{\partial\mu}{\partial x}\cdot (2xy-e^{-2y})$$by the product rule

29. anonymous

now we're interested in seeing whether this reduces to a nice ODE if we presume, say: $$\mu=\mu(x)$$, i.e. $$\frac{\partial\mu}{\partial y}=0$$ and $$\frac{d\mu}{dx}=\frac{\partial\mu}{\partial x}$$ $$\mu=2\mu y+\frac{d\mu}{dx}(2xy-e^{-2y})\\\frac{d\mu}{dx}+\frac{2y-1}{2xy-e^{-2y}}\mu=0$$ or if we consider $$\mu=\mu(y)$$ so $$\frac{\partial\mu}{\partial x}=0,\frac{\partial\mu}{\partial\mu}=\frac{d\mu}{dy}$$ and try the other way: $$\mu+\frac{d\mu}{dy}=2y\mu$$

30. anonymous

oops, i meant to write $$\mu+y\frac{d\mu}{dy}=2y\mu$$ anyways, you don't have to be a genius to see one of those is much easier to solve than the other :-) so consider $$y\frac{d\mu}{dy}+(1-2y)\mu=0\\\frac1\mu\frac{d\mu}{dy}=\frac{2y-1}y\\\int\frac1\mu\frac{d\mu}{dy}dy=\int\left(2-\frac1y\right)\,dy\\\ln\mu=2y-\ln y+C\\\mu=Ce^{2y}/y$$

31. anonymous

so this tells us that if we multiply throughout the equation by $$\mu$$, we get a total differential of some function $$\Phi$$, so $$\frac{d\Phi}{dx}=\mu y=Ce^{2y}\\\frac{d\Phi}{dy}=\mu\cdot(2xy-e^{-2y})=2Cxe^{2y}-C/y$$integrating gives us $$\Phi=\int Ce^{2y}\, dx=Cxe^{2y}+g(y)\\\Phi=\int (2Cxe^{2y}-C/y)\,dy=Cxe^{2y}-C\ln y+f(x)\\\implies\Phi(x,y)=C_1(xe^{2y}-\ln y)+C_3$$ so our solutions are therefore level sets of $$\Phi$$, i.e. $$C(xe^{2y}-\ln y)+C_2=C_3$$ notice we have what seems to be three arbitrary constants

32. anonymous

now notice if we move them all to one side: $$xe^{2y}-\ln y=\frac{C_3-C_2}{C_1}=C$$and those arbitrary constants combine to give (drum roll...) another arbitrary constant :-) notice that we're free to pick any scalar multiple of our integration factor simply because if $$M\, dx+N\, dy=0$$ has potential function $$\Phi$$, then $$CM\, dx+CN\, dy=0$$ has potential function $$C\cdot\Phi$$ and the two solutions are 'really' the same: $$\Phi=A\implies C\cdot\Phi=CA$$ similarly, when integrating there are actually infinitely many valid potential functions up to a constant simply because the constant terms are lost when we take our total differential and once again the solutions are 'really' the same: $$\Phi=A\implies \Phi+C=A+C$$

33. anonymous

and then one of the arbitrary constants is actually a parameter for the family of solution curves to our problem, because *every* level set of $$\Phi$$ satisfies $$d\Phi=0$$. to pick a particular solution, we need some more information (like an initial value), so there's really only one degree of freedom here (the other two constants of integration we found just make our family of solutions look superficially different).

34. Astrophysics

You answered all my questions even ones I hadn't asked, thanks a lot @oldrin.bataku that was great!