- #1
mathmari
Gold Member
MHB
- 5,049
- 7
Hey!
We consider the inner product $$\langle f,g\rangle:=\int_{-1}^1(1-x^2)f(x)g(x)\, dx$$ Calculate an orthonormal basis for the poynomials of degree maximum $2$.
I have applied the Gram-Schmidt algorithm as follows:
\begin{align*}\tilde{q}_1:=&1 \\ q_1:=&\frac{\tilde{q}_1}{\|\tilde{q}_1\|}=\frac{1}{\langle \tilde{q}_1, \tilde{q}_1\rangle}=\frac{1}{\int_{-1}^1(1-x^2)\cdot 1\cdot 1\, dx}=\frac{1}{\int_{-1}^1(1-x^2)\, dx}=\frac{1}{\left [x-\frac{x^3}{3}\right]_{-1}^1}=\frac{1}{\left [1-\frac{1^3}{3}\right]-\left [(-1)-\frac{(-1)^3}{3}\right ]}\\ =&\frac{1}{1-\frac{1}{3}+1-\frac{1}{3}}=\frac{1}{2-\frac{2}{3}}=\frac{1}{\frac{4}{3}}=\frac{3}{4}\end{align*}
\begin{align*}\tilde{q}_2:=&x-\langle x, q_1\rangle q_1=x-\left (\int_{-1}^1(1-x^2)\cdot x\cdot \frac{3}{4}\, dx\right )\cdot \frac{3}{4}=x-\frac{3}{4}\cdot \left (\int_{-1}^1(x-x^3)\, dx\right )\cdot \frac{3}{4}=x-\frac{9}{16}\cdot \left [\frac{x^2}{2}-\frac{x^4}{4}\right ]_{-1}^1 \\ = & x-\frac{9}{16}\cdot 0=x\\ q_2:=&\frac{\tilde{q}_2}{\|\tilde{q}_2\|}=\frac{x}{\langle \tilde{q}_2, \tilde{q}_2\rangle}=\frac{x}{\int_{-1}^1(1-x^2)\cdot x\cdot x\, dx}=\frac{x}{\int_{-1}^1(x^2-x^4)\, dx}=\frac{x}{\left [\frac{x^3}{3}-\frac{x^5}{5}\right]_{-1}^1}=\frac{x}{\left [\frac{1}{3}-\frac{1}{5}\right]-\left [-\frac{1}{3}+\frac{1}{5}\right ]}\\ =&\frac{x}{\frac{1}{3}-\frac{1}{5}+\frac{1}{3}-\frac{1}{5}}=\frac{x}{\frac{2}{3}-\frac{2}{5}}=\frac{x}{\frac{4}{15}}=\frac{15x}{4}\end{align*}
\begin{align*}\tilde{q}_3:=&x^2-\langle x^2, q_1\rangle q_1-\langle x^2, q_2\rangle q_2=x^2-\left (\int_{-1}^1(1-x^2)\cdot x^2\cdot \frac{3}{4}\, dx\right )\cdot \frac{3}{4}-\left (\int_{-1}^1(1-x^2)\cdot x^2\cdot \frac{15x}{4}\, dx\right )\cdot \frac{15x}{4}\\ =&x^2-\frac{9}{16}\cdot \int_{-1}^1(x^2-x^4)\, dx-\frac{225x}{16}\cdot \int_{-1}^1(x^3-x^5)\, dx =x^2-\frac{9}{16}\cdot \frac{4}{15}-\frac{225x}{16}\cdot 0=x^2-\frac{3}{20}\\ q_3:=&\frac{\tilde{q}_3}{\|\tilde{q}_3\|}=\frac{x^2-\frac{3}{20}}{\langle \tilde{q}_3, \tilde{q}_3\rangle}=\frac{x^2-\frac{3}{20}}{\int_{-1}^1(1-x^2)\cdot \left (x^2-\frac{3}{20}\right )\cdot \left (x^2-\frac{3}{20}\right )\, dx}=\frac{x^2-\frac{3}{20}}{\int_{-1}^1\left (-x^6+\frac{13x^4}{10}-\frac{129x^2}{400}+\frac{9}{400}\right )\, dx}=\frac{x^2-\frac{3}{20}}{\frac{9}{140}}\\ =&\frac{140}{9}\left (x^2-\frac{3}{20}\right )\end{align*} I wanted to check if I have the correct answers and I noticed (if I am not mistaken) that the polynomials that I found are not orthonormal in respect to the other terms. Have I applied a wrong formula? :unsure:
We consider the inner product $$\langle f,g\rangle:=\int_{-1}^1(1-x^2)f(x)g(x)\, dx$$ Calculate an orthonormal basis for the poynomials of degree maximum $2$.
I have applied the Gram-Schmidt algorithm as follows:
\begin{align*}\tilde{q}_1:=&1 \\ q_1:=&\frac{\tilde{q}_1}{\|\tilde{q}_1\|}=\frac{1}{\langle \tilde{q}_1, \tilde{q}_1\rangle}=\frac{1}{\int_{-1}^1(1-x^2)\cdot 1\cdot 1\, dx}=\frac{1}{\int_{-1}^1(1-x^2)\, dx}=\frac{1}{\left [x-\frac{x^3}{3}\right]_{-1}^1}=\frac{1}{\left [1-\frac{1^3}{3}\right]-\left [(-1)-\frac{(-1)^3}{3}\right ]}\\ =&\frac{1}{1-\frac{1}{3}+1-\frac{1}{3}}=\frac{1}{2-\frac{2}{3}}=\frac{1}{\frac{4}{3}}=\frac{3}{4}\end{align*}
\begin{align*}\tilde{q}_2:=&x-\langle x, q_1\rangle q_1=x-\left (\int_{-1}^1(1-x^2)\cdot x\cdot \frac{3}{4}\, dx\right )\cdot \frac{3}{4}=x-\frac{3}{4}\cdot \left (\int_{-1}^1(x-x^3)\, dx\right )\cdot \frac{3}{4}=x-\frac{9}{16}\cdot \left [\frac{x^2}{2}-\frac{x^4}{4}\right ]_{-1}^1 \\ = & x-\frac{9}{16}\cdot 0=x\\ q_2:=&\frac{\tilde{q}_2}{\|\tilde{q}_2\|}=\frac{x}{\langle \tilde{q}_2, \tilde{q}_2\rangle}=\frac{x}{\int_{-1}^1(1-x^2)\cdot x\cdot x\, dx}=\frac{x}{\int_{-1}^1(x^2-x^4)\, dx}=\frac{x}{\left [\frac{x^3}{3}-\frac{x^5}{5}\right]_{-1}^1}=\frac{x}{\left [\frac{1}{3}-\frac{1}{5}\right]-\left [-\frac{1}{3}+\frac{1}{5}\right ]}\\ =&\frac{x}{\frac{1}{3}-\frac{1}{5}+\frac{1}{3}-\frac{1}{5}}=\frac{x}{\frac{2}{3}-\frac{2}{5}}=\frac{x}{\frac{4}{15}}=\frac{15x}{4}\end{align*}
\begin{align*}\tilde{q}_3:=&x^2-\langle x^2, q_1\rangle q_1-\langle x^2, q_2\rangle q_2=x^2-\left (\int_{-1}^1(1-x^2)\cdot x^2\cdot \frac{3}{4}\, dx\right )\cdot \frac{3}{4}-\left (\int_{-1}^1(1-x^2)\cdot x^2\cdot \frac{15x}{4}\, dx\right )\cdot \frac{15x}{4}\\ =&x^2-\frac{9}{16}\cdot \int_{-1}^1(x^2-x^4)\, dx-\frac{225x}{16}\cdot \int_{-1}^1(x^3-x^5)\, dx =x^2-\frac{9}{16}\cdot \frac{4}{15}-\frac{225x}{16}\cdot 0=x^2-\frac{3}{20}\\ q_3:=&\frac{\tilde{q}_3}{\|\tilde{q}_3\|}=\frac{x^2-\frac{3}{20}}{\langle \tilde{q}_3, \tilde{q}_3\rangle}=\frac{x^2-\frac{3}{20}}{\int_{-1}^1(1-x^2)\cdot \left (x^2-\frac{3}{20}\right )\cdot \left (x^2-\frac{3}{20}\right )\, dx}=\frac{x^2-\frac{3}{20}}{\int_{-1}^1\left (-x^6+\frac{13x^4}{10}-\frac{129x^2}{400}+\frac{9}{400}\right )\, dx}=\frac{x^2-\frac{3}{20}}{\frac{9}{140}}\\ =&\frac{140}{9}\left (x^2-\frac{3}{20}\right )\end{align*} I wanted to check if I have the correct answers and I noticed (if I am not mistaken) that the polynomials that I found are not orthonormal in respect to the other terms. Have I applied a wrong formula? :unsure: