# Solve the Initial Value Problem,

Solve the initial value problem:

$$x^2 + 2xy -y^2 = (2xy - x^2 + e^y)y'$$

Where $$y(1)=1/2$$

Answer the question with the relation y as a function of x.

I've been working on the following question and can't quite seem to figure out what to do. I understand that this is a Non-linear first-order ODE, and I think that it might be separable. The thing is I don't quite know how to solve this if it is separable. I thought that maybe the first step is to divide, so it becomes:

$$(x^2 + 2xy -y^2)\div(2xy - x^2 + e^y) = y'$$

I'm not quite sure how to get it in the following form: $$dy/dx = f(x)g(y)$$ (form for seperable ODE)

Any help with this would be much appreciated.

## 1 Answer

$$x^2 + 2xy -y^2 = (2xy - x^2 + e^y)y'$$ $$(x^2 + 2xy -y^2)dx -(2xy - x^2 + e^y)dy=0$$ It's exact, we have: $$Mdx+Ndy=0 \implies \partial_y M=\partial_x N$$ You can solve this DE with exactness. Look here : Exact Differential

Another way: $$(x^2 + 2xy -y^2)dx -(2xy - x^2 + e^y)dy=0$$ Rearrange terms: $$x^2dx + (2xydx+x^2dy) -(y^2dx +2xydy)-e^ydy=0$$ $$\frac 13dx^3 + d(x^2y) -d(y^2x)-de^y=0$$ After integration: $$\frac 13x^3 + x^2y -y^2x-e^y=C$$ To find $$C$$ apply initial condition.

• Thanks for the help, however, i'm just a bit unsure about how you did the rearranging. For example, how did $(2xydx+x^2 dy)$ become $d(x^2 y)$ – N_Mathematics_B Mar 12 '20 at 6:02
• Why ? what makes you unsure ? @N_Mathematics_B Note that you can solve it with exactness as shown in the link I provided. – Aryadeva Mar 12 '20 at 6:03
• Im just unsure how $(2xydx+x^2 dy)$ became $d(x^2 y)$ in the rearranging process. – N_Mathematics_B Mar 12 '20 at 6:08
• This has nothing to do with rearranging Try to differentiate $x^2y$ that will help you @N_Mathematics_B – Aryadeva Mar 12 '20 at 6:10
• Ohhh, I understand, thanks for all the help – N_Mathematics_B Mar 12 '20 at 6:12