设该二元函数为g(x,y),则
g'x(x,y)=xy(x+y)-f(x)y
两边对x求积分
g(x,y)=x³y/3+x²y²/2-y∫f(x)dx
g'y(x,y)=f'(x)+x²y
两边对y求积分
g(x,y)=f'(x)y+x²y²/2+C
∴x³y/3-y∫f(x)dx=f'(x)y+C
两边对x求导
x²y-yf(x)=f''(x)y
x²-f(x)=f''(x)
f''(x)+f(x)=x²
解微分方程,得通解为
f(x)=C1*cosx+C2*sinx+x²-2
又f(0)=1,f'(0)=-1
∴C1-2=1 => C1=3
C2=-1
∴f(x)=3cosx-sinx+x²-2