# Setting boundary conditions for a $n$-th order bivariate polynomial

I would like to know if it is possible to tweak the coefficients of an $n$-th order bivariate polynomial such that the function passes through a certain set of points on the boundary?

So if I have a function of the form:

\begin{equation} f(x,y) = \sum^{n}_{i,j} a_{ij}x^{i}y^{j} \end{equation}

that when plotted looks something like this: is it possible to choose coefficients so that along the lines $x=1$ and $x=-1$ the function is equal to some constant value?

We have \begin{align} f(1,y)&=\sum_{j=0}^n\Bigl(\sum_{i=0}^na_{ij}\Bigr)y^j\\ f(-1,y)&=\sum_{j=0}^n\Bigl(\sum_{i=0}^n(-1)^i\,a_{ij}\Bigr)y^j. \end{align} Since we want the right hand side to be constants, we are lead to a system of $2(n+1)$ equations with $(n+1)^2$ unknowns: \begin{align} \sum_{i=0}^na_{i0}&=C_1\\ \sum_{i=0}^n(-1)^i\,a_{i0}&=C_2\\ \sum_{i=0}^na_{ij}&=0,\quad 1\le j\le n\\ \sum_{i=0}^n(-1)^ia_{ij}&=0,\quad 1\le j\le n \end{align} For $n=1$, the only solution is a polynomial independent of $y$. For $n=2$ the solutions are $$f(x,y)=a_{00}+a_{10}\,x+a_{20}\,x^2+\alpha(1-x^2)y+\beta(1-x^2)y^2.$$ It is clear now that a solution for arbitrary $n>1$ is $$P(x)+(1-x^{2})Q(x)\sum_{i=0}^nb_{i}\,y^i.$$ where $P$ is a polynomial of degree $n$ and $Q$ is a polynomial of degree $n-2$.
• Thank for your answer, pardon my ignorance but I do have a few questions to follow up: I am unsure why $$\sum_{i=0}^{n} a_{ij} = 0, ~1 \leq j \leq n$$ is true or where the $(1-x^{2})$ term comes from. Furthermore I am unsure how I would be able to use the final expression that you provided to set the coefficients to give something like say $f(x,y)=100$ along the lines $x=1$ and $x=-1$ I appreciate your efforts a lot, but I fear that my grasp of the maths is perhaps less than you might think. – hahahasan Jul 5 '18 at 11:13
• When you set $x=1$ $f$ be comes a polynomial in $y$. Since it must be constant, all the coeficientes must equal 0 (except the independent one). $1-x^2$ is there because it vanishes when $x=\pm1$. – Julián Aguirre Jul 5 '18 at 15:02