(2xydx+dy)exx =0
Couldn't fit x2 in this notation so I wrote it xx but you know its derivative is 2x. The expanded version gives you M = 2xyexx and N= exxdy. Note My = 2xexx= Nx so the equation is exact
2xyexx dx + exx dy = 0
∫2xyexxdx = yexx + h(y)
∫exxdy = yexx + g(x)
Since no extra terms show up then the integral gives
yexx + c =0 or yexx = C where c ==C is a constant.
the information y(0) = 2 makes y and explicit function of x but we don't need to rewrite the equation explicitly, just remember the information says y =2 when x = 0. Substituting we have
2 e0 =2 so yexx =2 is the solution to the equation.