2
$\begingroup$

Consider the space of polynomials of degree less than or equal to $3$, whose value at $0$ is equal to $2$, i.e., $\{p \in P_3 : p(0) = 2\}$). Find which element of this space has the smallest length using the norm $$\|q\| = \int_{-1}^1 q^2(x) \,\mathrm d x$$

I truly have no idea on how to solve this problem. I am studying numerical analysis in the context of polynomials and orthogonal projections

$\endgroup$
  • $\begingroup$ Isn't that the squared norm? $\endgroup$ – Rodrigo de Azevedo Apr 21 at 10:36
2
+50
$\begingroup$

Every polynomial $q(x)$ of the order $3$ or less can be presented in the form of $$q(x) = c_0P_0(x) + c_1P_1(x)_+c_2P_2(x)+c_3P_3(x),\tag1$$ where $$P_0(x)=1,\quad P_1(x) = x,\quad P_2(x) = \frac12(3x^2-1),\quad P_3(x)=\frac12(5x^3-3x)\tag2$$ are the Legendre polynomials.

Easy to see that the condition $q(0)=2$ means $$c_0-\frac12c_2 = 2,$$ or $$c_2 =2(c_0--2).\tag3$$

Legendre polynomials are orthogonal: $$\int\limits_{-1}^1P_n(x)P_m(x) = \frac2{2n+1}\delta_{mn},\tag4$$ where $\delta_{mn}$ is the Kronekker symbol.

From $(1),(4)$ should $$\|q\|^2 = \sum\limits_{k=0}^3 c_k^2\int\limits_{-1}^1 P_k^2(x)\,dx + 2\sum\limits_{0\le i<j} c_k^2\int\limits_{-1}^1 P_i(x)P_j(x)\,dx,$$ $$\|q\|^2 \ge 2c_0^2+\frac25c_2^2 = \frac25(5c_0^2+4(c_0-2)^2)).\tag5$$ Taking in account $(3),$ the coefficients of the minimal polynomial can be found from the system \begin{cases} c_1=c_3 = 0\\ c_2 = 2c_0 -4\\ c_0 = \operatorname{argmin}\left(5c_0^2+4(c_0-2)^2\right).\tag6 \end{cases} Since $$\left(5c_0^2+4(c_0- 2)^2\right)'=18c_0-16,$$ then $$c_0 = \frac89,\quad c_2 = -\frac{20}9,\tag7$$ $$q(x)=-\frac89-\frac{10}9(3x^2-1),$$ $$q(x) = 2-\frac{10}3 x^2.\tag8$$ The norm is $$\|q(x)\|^2 = 2\cdot\frac{64}{81}+\frac25\cdot\frac{400}{81}= \frac{32}9.$$

$\endgroup$
  • 1
    $\begingroup$ Why did you do $2c_0^2 + \frac23 c_1^2 + \frac25 c_2^2 +\frac27c_3^2 \ge 2c_0^2+\frac25c_2^2.\tag5$? What's useful in this? $\endgroup$ – Guerlando OCs Apr 21 at 21:34
  • 1
    $\begingroup$ where did $c_0 = \operatorname{argmin}\left(5c_0^2+4(c_0-2)^2\right).\tag6$ come from? $\endgroup$ – Guerlando OCs Apr 21 at 21:44
  • $\begingroup$ @GuerlandoOCs Thanks for the comments. 1) To justify $c_1=c_3=0.$ 2) From $(3)\ c_2 = 2(c_0-2).$ $\endgroup$ – Yuri Negometyanov Apr 22 at 4:54
  • 1
    $\begingroup$ but why $c_1=c_3=0$? $\endgroup$ – Guerlando OCs Apr 22 at 5:12
  • $\begingroup$ @GuerlandoOCs Because we are looking for the minimal polynomial. On the other hand, $c_0$ and $c_2$ should provide $(3)$ and cannot be eliminated. $\endgroup$ – Yuri Negometyanov Apr 22 at 5:44
3
$\begingroup$

A generic polynomial in your space is of the form $$p(x)= a + bx + cx^2+dx^3$$ You can then impose the condition $p(0)=2$ and explicitly compute the norm. Can you take it from here?

$\endgroup$
  • 1
    $\begingroup$ Ok so $p(0) = a = 2$ so we have $p(x) = 2 + bx + cx^2 + dx^3$. Now I need to minimize $||p(x)-q(x)||$, that is, find $q(x)$ that minimize that thing. How should I proceed? $\endgroup$ – Guerlando OCs Apr 15 at 20:51
  • 1
    $\begingroup$ That's not what you need to do. Think about what you want to minimise $\endgroup$ – John Donne Apr 15 at 20:55
  • $\begingroup$ you're rigth, I want to minimize $2+bx+cx^2 + dx^3$ I guess. I see that I should take the integral of this thing squared and then find a minimum somehow. I think that I could take the derivative, even though I'm not studying calculus, I'm studying projection onto polynomial spaces, so this should be the prefered way. Do you have any idea? $\endgroup$ – Guerlando OCs Apr 15 at 21:03
1
$\begingroup$

First use the fact that $p(0)=2$ , giving : $p(x)=2+bx+cx^2+dx^3$ .
Next calculate the integral: $$ \int_{-1}^{+1} \left[ 2+bx+cx^2+dx^3 \right]^2\,dx = 8 + \frac{2}{7} d^2 + \frac{4}{5} b d + \frac{2}{5} c^2 + \frac{8}{3} c + \frac{2}{3} b^2 $$ Then make squares everywhere you can: $$ = \frac{32}{9} + \frac{2}{5}\left(c+\frac{10}{3}\right)^2 + \frac{2}{7}\left(d+\frac{7}{5}b\right)^2 + \frac{8}{75}b^2 $$ Now it's easy to see that this expression is minimal for $b=d=0$ and $c=-10/3$ .
So here comes the polynomial that is asked for (with norm squared $=32/9$) : $$ p(x)=2-\frac{10}{3}x^2 $$

$\endgroup$
  • $\begingroup$ Nice, it does not involve calculus. However, I'm studying linear algebra (numerical methods) and it doesn't look like linear algebra to me. I'll stick to this answer but do you know any way to solve this that would involve projection onto subspaces generated by polynomials? $\endgroup$ – Guerlando OCs Apr 15 at 23:16
  • 1
    $\begingroup$ Minor remark: your argument finds the polynomial that minimizes the square of the norm (there is a square missing in the OP's post). A quick and easy argument is needed to show that the same polynomial also minimizes the norm itself. $\endgroup$ – Alex M. Apr 16 at 11:54
  • $\begingroup$ @AlexM. Can you explain me how there is a square missing in the OP's integral $||q|| = \int_{-1}^1 q^2(x) dx$ ? $\endgroup$ – Han de Bruijn Apr 16 at 13:53
  • $\begingroup$ @GuerlandoOCs. Sorry, but I do not see how an integral does not involve calculus. $\endgroup$ – Han de Bruijn Apr 16 at 13:56
  • 1
    $\begingroup$ @HandeBruijn: Yes, but the polynomial minimizing the norm is the same one minimizing its square; the argument is straightforward. $\endgroup$ – Alex M. Apr 16 at 18:06
0
$\begingroup$

Use cauchy sqwarz ineq. on an inner product space(i.e 《v,w》<=||v|| ||w||) where equality holds iff v=£w for some scalar £...here put v=q and w=1....and the minimal length is achieved only when q=2

$\endgroup$
  • 2
    $\begingroup$ Could you explain it better? I couldn't understand $\endgroup$ – Guerlando OCs Apr 14 at 20:10
  • 1
    $\begingroup$ Which part u didn't understand? $\endgroup$ – Sagnik Dutta Apr 15 at 7:27
  • 1
    $\begingroup$ Having checked your profile, I have no doubt that you know some mathematics. However, your editing abilities definitely need improvement. Please learn some MathJax , like everybody here does. Otherwise, your answers (line this one) will be close to unreadable for others. $\endgroup$ – Han de Bruijn Apr 15 at 20:50
  • 1
    $\begingroup$ More helpful (I hope) : MathJax basic tutorial and quick reference $\endgroup$ – Han de Bruijn Apr 15 at 20:59
0
$\begingroup$

There is a way to do this using only elementary linear algebra. First note that your set of polynomials is a subset of the inner product space $(\mathcal{P}_3,\langle\cdot,\cdot\rangle)$, where $\mathcal{P}_3$ is the vector space of polynomials of maximum degree $3$ and $$\langle p_1,p_2\rangle=\int_{-1}^{1}p_1(x)\cdot p_2(x)dx.$$ You are interested in the following set $H = \{p \in \mathcal{P}_3:p(0)=2\}$. I claim that the set $H$ forms a hyperplane inside $\mathcal{P}_3$. To see this note that every element of $H$ can be written as $u+2$, where $u$ is an element of $U = \{p \in \mathcal{P}_3:p(0)=0\}$, which is clearly a linear subspace of $\mathcal{P}_3$ of codimension $1$, i.e., $\dim(\mathcal{P}_3)=4$ and $\dim(U)=3$. This means that there exists some $q \in \mathcal{P}_3$ such that we can write $$H = \{p \in \mathcal{P}_3: \langle p,q\rangle = 1\}.$$ This $q$ must be orthogonal to every element of $U$. Such a $q$ can be found in many ways with simple linear algebra. I will use $\{1,x,x^2,x^3\}$ as a basis for $\mathcal{P}_3$. Note that $\{x,x^2,x^3\}$ spans $U$. Consider the map $M: \mathcal{P}_3 \to \mathbb{R}^3$ given by $p \mapsto \left(\langle p,x\rangle,\langle p,x^2\rangle,\langle p,x^3\rangle\right)^T$, in the basis above it is easy to calculate that $$M = \left( \begin{array}{cccc} 0 & \frac{2}{3} & 0 & \frac{2}{5} \\ \frac{2}{3} & 0 & \frac{2}{5} & 0 \\ 0 & \frac{2}{5} & 0 & \frac{2}{7} \\ \end{array} \right).$$ To find an element in the kernel of $M$ we can use standard methods to find that for example $q' = 5 x^2 - 3$ satisfies $Mq' = 0$ (in fact this is very easy to see by just eyeballing $M$). To find the correct scalar multiple of $q'$ take an easy element of $H$, for example the element $2$, and we solve the following for $\lambda$: $\langle 2, \lambda \cdot q' \rangle = 1$. We get that $$q = \frac{9}{16}-\frac{15 x^2}{16}.$$

Now we can use the following lemma.

Lemma: Let $V$ be an an inner product space and $H$ be a hyperplane inside this inner product space given by $v \in V$ for which $\langle v, w\rangle = 1$ for some given $w$. Then the element of $H$ that minimizes the distance to the origin is given by the unique scalar multiple of $w$ that lies inside $H$.

The proof of this lemma is not hard and I will leave it to you. We just have to find a scalar multiple of $q$ that lies in $H$. Since $q(0)= 9/16$, we see that we need to multiply by $32/9$ to get the correct answer of $$2-\frac{10}{3}x^2.$$ Note that to find the correct answer we only needed to find $q$ up to a scalar multiple and thus we could have just used the $q'$ we found above in this last step.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.