# Math Help - 1st order non-homogeneous - solve by substitution?

1. ## 1st order non-homogeneous - solve by substitution?

Hi everyone,

I'm having trouble solving this problem. I think substitution is the way to go but I haven't had a lot of luck.

y^2/2+2ye^x+(y+e^x)dy/dx = e^-x
using u=y+e^x
dy/dx=-y^2/2u-2ye^x/u+e^-x

If this is correct so far, can someone help me with the next few steps? I'm pretty lost on this one and I've been working on it for a few days

Thanks!

2. You don’t want a mixed equation with $u$ and $y$. The substitution means that replace all instances of $y$ with something involving $u$.

So if you make the substitution $u=y+e^x$, then you will note that $y=u-e^x$, so $y^2=u^2-2ue^x+e^{2x}$, and $y'=u'-e^x$.

Then, the equation $\frac{1}{2}y^2+2ye^x+(y+e^x)y'=e^{-x}$ becomes $\frac{1}{2}u^2-ue^x+\frac{1}{2}e^{2x}+2ue^x-2e^{2x}+uu'-ue^x=e^{-x}$, which simplifies to $u^2+2uu'=3e^{2x}+2e^{-x}$. If we now make another substitution, $v=u^2$, then $v'=2uu'$, so we have $v+v'=3e^{2x}+2e^{-x}$, which is linear.

3. Thank you so much for the help!!

I proceeded to solve as I would for a normal 1st order linear non-homogeneous equation. I got the following result:

y=(e^3x+2x+C)e^-x

4. That seems like the solution for $v$. In order to get $y$, you need to take $y=u-e^x$ along with $u^2=v$ to get $y=\pm\sqrt{v}-e^x$.