# Homework Help: Weierstrass Theorem problem

1. Aug 5, 2008

### linearfish

This is a problem from a previous year's proficiency exam in my Master's program. I am taking this exam later this month.

1. The problem statement, all variables and given/known data
Let f be a continuous function of the interval [0,1].
(1) If
$$\int_0^1 f(x)^2 dx = 0$$
prove f(x)=0 for all x in [0,1].

(2) If
$$\int_0^1 f(x) x^n dx = 0$$
(n=0,1,2...), prove f(x)=0 for all x in [0,1].

2. Relevant equations
There is a hint for the second part. "Use the Weierstrass Theorem: the space of polynomials is dense in the space of continuous functions."

3. The attempt at a solution
I believe I have the first part pretty well figured out. Without going into all the gory details, the idea is that we assume there exist a c in [0,1] such that f(c) is not 0. Then by continuity there is an interval around c in which f(x) is positive (bounded away from 0). Thus, since f(x)2 is nonnegative on the whole interval and positive on the interval around c, the integral is positive, but this is a contradiction.

I am at a loss for the second part. It seems to me that it should be a logical step from the first part but I cannot seem to make sense of it. Also, the hint should be a big help but I don't see how. Anything to put me on the right track is appreciated.

2. Aug 5, 2008

### Dick

Approximate f(x) by a polynomial p(x) within epsilon. Now integrate f(x)*(f(x)-p(x)). What's the integral of f(x)*p(x)? Can you use that to say something about the integral of f(x)^2?

3. Aug 5, 2008

### linearfish

Let me see if I got this:

Say the integral of f is A. Then
$$\int_0^1 f(x) (f(x)-p(x)) dx \approx \epsilon * A$$
Since
$$\int_0^1 f(x)^2 dx = 0$$
Then
$$\int_0^1 f(x)p(x) dx \approx - \epsilon*A$$

Because epsilon may be made as small as we wish, this implies the last integral is 0. Then can we use the MVT for integrals to show f(x) is the zero function. Or am I looking at this wrong still?

Thanks for the help.

4. Aug 5, 2008

### Dick

No, not quite. You want to prove that the integral of f(x)^2 is zero, not use it as an assumption. Hint: the integral of f(x)*p(x) is ZERO. Can you tell me why?

5. Aug 5, 2008

### linearfish

I'm a little confused as to why we're proving that. In the first part it's given and it doesn't seem relevant in the second.

6. Aug 5, 2008

### Dick

They are two separate problems. You've already shown i) integral f(x)^2=0 implies f=0. Now you want to show ii) integral f(x)*x^n=0 implies f=0. I'm suggesting you use integral f(x)*x^n=0 to show f satisfies the premise of i). Here's another hint why integral f(x)*p(x) must be exactly zero (without assuming integral of f(x)^2 is zero). p(x) is the sum of a bunch of things like a*x^n.

7. Aug 5, 2008

### linearfish

Okay, I think I follow that. Thank you.

$$\int_0^1 f(x)p(x) dx$$
$$\int_0^1 f(x)(a_0 + a_1 x + ... + a_n x^n) dx$$
$$a_0 \int_0^1 f(x) dx + a_1 \int_0^1 f(x) x dx + ... + a_n \int_0^1 f(x) x^n dx$$

Each of these integrals is 0 by assumption since the a's are constants. Thus,

$$\int_0^1 f(x)(f(x) - p(x)) dx = \int_0^1 f(x)^2 - f(x)p(x) dx = \int_0^1 f(x)^2 = 0$$
because f(x) - p(x) is arbitrarily close to 0. Thus by part (i) f(x) = 0 for all x in [0,1].

8. Aug 5, 2008

### Dick

That's it. You can show integral of f(x)^2 is arbitrarily close to zero. Hence it is zero. Hence f=0.

9. Aug 5, 2008

### linearfish

Awesome. Thanks for the help. Now I can only hope that this problem is on this year's exam.