$$(t+e^y) + \left(\frac{t^2}{2} + 2te^y\right)y' = 0$$
How can i solve this? I've never seen a differential equation like that.
$$(t+e^y) + \left(\frac{t^2}{2} + 2te^y\right)y' = 0$$
How can i solve this? I've never seen a differential equation like that.
$$(t+e^y)+\left(\dfrac{t^2}2+2te^y\right)\dfrac{dy}{dt}=0$$ $$\Rightarrow 2(t+e^y)dt+(t^2+4te^y)dy=0$$
$$2tdt+2e^ydt+t^2dy+4te^ydy=0$$ $$$$ On multiplying throughout by $e^y$ (to convert the ODE into an exact ODE) and subsequently rearranging, we get $$$$ $$(2te^ydt+t^2e^ydy)+ 2(2te^{2y}dy+e^{2y}dt)=0$$ $$d(t^2e^y)+d(2e^{2y}t)=0$$ $$t^2e^y+2te^{2y}=C$$ $$$$ Edit: If you (like me) dislike messy looking terms, you can substitute $u=e^y$ in the first step and modify the equation.
It is an inexact ODE. Let's write it as $$ (t+ \exp y)dt + \left(\frac{t^2}{2} + 2t \exp y \right) dy = M(t,y) dt + N(t,y) dy = 0. $$ It is an inexact differential form, because there is no function $F(t,y)$ such that $$ \frac{\partial F}{\partial t} = M, \ \ \ \frac{\partial F}{\partial y} = N, $$ which is bad, since, if there was such $F$, we could solve the ODE readly. Fortunatelly, if we multiply our ODE by any function $\mu(t,y)$, nothing happens, since the LHS is zero (thanks Dylan for the comment on the homogeneity). The details are in the provided Wikipedia link, but if $$ \frac{1}{M} \left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial t}\right) = f(y) \ \mathrm{or} \ \frac{1}{N} \left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial t}\right) = f(t), $$ pleasant things happen, because the new ODE $$ \mu M(t,y) dt + \mu N(t,y) dy = 0 $$ becames a exact differential form! If you perform the calculations, you will se that $$ \frac{1}{M} \left(\frac{\partial M}{\partial y} - \frac{\partial N}{\partial t}\right) = -1, $$ which is a function of $y$, anyway. Then, taking $\mu = \exp \int -f(y) dy = \exp y$, our new ODE is $$ \exp y(t+ \exp y)dt + \exp y\left(\frac{t^2}{2} + 2t \exp y \right) dy =0. $$ Since it is now a exact differential form, we can readly integrate this way: $$ \int \exp y(t+ \exp y)dt + \int \exp y\left(\frac{t^2}{2} + 2t \exp y \right) dy = c. $$ $$ \exp y \left(\frac{t^2}{2}+ t \exp y \right) + \left(\frac{t^2}{2} \exp y + t \exp 2y \right) = c. $$ Simplifying: $$ 2t \exp 2y + t^2 \exp y = c, $$ which you can see as a quadractic equation of $\exp y$: $$ 2t (\exp y)^2 + t^2 \exp y - c = 0, $$ using the quadractic formula: $$ \exp y = \frac{-t^2 \pm \sqrt{t^4 + 8ct}}{4t} $$ solving for $y$: $$ y = \log \frac{-t^2 \pm \sqrt{t^4 + 8ct}}{4t}. $$
PS.: See that the solution is non-unique, i.e., there are two solutions, corresponding to the $+$ and $-$ sign. If you write your equation in the standard form, $$ y' = - \frac{t+ \exp y}{\frac{t^2}{2} + 2t \exp y} = F(t,y), $$ you can see that $F(t,y)$ is not Lipschitz continuous, i.e., the derivative of $F(t,y)$ in relation to $y$ gets unbounded for certain values of $t$. Therefore, the Picard-Lindenlöf theorem can not ensure the uniqueness of the solution (nor the existence, but we constructed a solution for it).