# are the two polynomials the same?

If you have three polynomials $f, g$ and $h$. And the following is true:$\int^{1}_{-1}f\cdot g=\int^{1}_{-1}f\cdot h$. Does this directly imply that $h=g$ (assuming $f$ is not the zero polynomial)? I think it does imply, but I am not sure. Thanks.

-
You need to assume that $f$ is not the zero polynomial. – Paul Dec 19 '12 at 13:19
@Paul thanks, i edited it. – Badshah Dec 19 '12 at 13:20
Even constants are bad - if $f$ is any constant then taking $g=x$ and $h=-x$ will give a contradiction. – Matthew Pressland Dec 19 '12 at 13:20
For every given $f$ and $g$, the set of polynomials $h$ such that the equality occurs is an infinite dimensional affine subspace of the space of polynomials. – Did Dec 19 '12 at 13:21
What part of For every given f and g is not clear enough? – Did Dec 19 '12 at 13:48

Let $f(x)=x$, $g(x)=1$ and $h(x)=1+x^2$. Then $$\int_{-1}^1 f(g-h) = -\int_{-1}^1 x^3\, dx =0.$$

-
and is it also not true if $g=f'$? – Badshah Dec 19 '12 at 13:29
To generalize, because the integral is over an interval of the form $[-a,a]$, any $f$, $g$, and $h$ for which $f(g-h)$ has only odd exponents will work. – Zimul8r Dec 19 '12 at 13:48
@Badshah: The example in the answer is such that $g=f'$. – Did Dec 19 '12 at 13:50
Roughly speaking, $g-h$ is orthogonal in $L^2(-1,1)$ to $f$. So your question is whether the orthogonality of a polynomial to a single polynomial implies that the first polynomial is zero. This is hopeless, since the vector space of all polynomials has infinite dimension. – Siminore Dec 19 '12 at 14:05

No. Take $f(x)=x$, $g(x)=1$, $h(x)=0$.

-

The following might be interesting to you: http://en.wikipedia.org/wiki/Legendre_polynomials#Orthogonality

You expand your $f, g, h$ in terms of these polynomials and use their orthogonality to easily see and predict the outcome of the integral. Note that the Legendre polynomials can represent any power of an arbitrary polynomial.

-

Two diff polynomials can yield same integral value(we can also say it as grazed same area) in same given limits(a,b) in this case (-1,1)

it doesnt mean both polynomials are same.

let f.g=k,f.h=l

and integral k in -1 to 1 =integral l in -1 to 1.

it doesnt mean k and l are same.

-