Approximating two-variable function with a product of one-variable functions

437 Views Asked by At

Suppose I have an integrable non-const function $f(x,y)$ defined on $V$. I'd like to approximate it with a product $a(x)b(y)$. How can I find such $a(x)$ and $b(y)$ that $$\tag1 \iint_V\left(f(x,y)-a(x)b(y)\right)^2\,dxdy=min$$ ? Are $a$ and $b$ unique for this problem (not distinguishing $a$ and $b$ from $ca$ and $\frac1c b$)?

I've tried taking average of $f$ in $y$ and $x$ directions and use these averages as $a$ and $b$, but I can't really say if they satisfy $(1)$, in fact I'm sure they are much worse than one could find.