Subjects functional analysis

Distance To Subspace 1Da406

Step-by-step solutions with LaTeX - clean, fast, and student-friendly.

Search Solutions

Distance To Subspace 1Da406


1. **Problem statement:** We want to find the distance from the function $f(x) = x$ to the subspace $L$ spanned by $f_0(x) = 1$, $f_1(x) = \sin x$, and $f_2(x) = \cos x$ in the space of continuous functions on $[-\pi, \pi]$ with scalar product $$(f,g) = \int_{-\pi}^{\pi} f(x)g(x) \, dx$$ and distance $$\rho(f,g) = \sqrt{(f-g,f-g)}.$$\n\n2. **Key idea:** The distance from $f$ to $L$ is the norm of the orthogonal component of $f$ relative to $L$. We find the orthogonal projection $P_L f$ of $f$ onto $L$ and then compute $$\rho(f,L) = \|f - P_L f\| = \sqrt{(f - P_L f, f - P_L f)}.$$\n\n3. **Projection onto $L$:** Since $L = \mathrm{span}\{1, \sin x, \cos x\}$, the projection has the form $$P_L f = a_0 \cdot 1 + a_1 \sin x + a_2 \cos x,$$ where coefficients $a_0, a_1, a_2$ satisfy orthogonality conditions: $$(f - P_L f, f_i) = 0 \quad \text{for } i=0,1,2.$$\n\n4. **Set up equations:** Using linearity and symmetry of the scalar product, we get the system:\n$$\begin{cases} (f,1) = a_0 (1,1) + a_1 (\sin x,1) + a_2 (\cos x,1) \\ (f,\sin x) = a_0 (1,\sin x) + a_1 (\sin x,\sin x) + a_2 (\cos x,\sin x) \\ (f,\cos x) = a_0 (1,\cos x) + a_1 (\sin x,\cos x) + a_2 (\cos x,\cos x) \end{cases}$$\n\n5. **Calculate inner products:**\n- $(1,1) = \int_{-\pi}^{\pi} 1 \cdot 1 \, dx = 2\pi$\n- $(\sin x,1) = \int_{-\pi}^{\pi} \sin x \, dx = 0$ (since $\sin x$ is odd)\n- $(\cos x,1) = \int_{-\pi}^{\pi} \cos x \, dx = 0$ (since $\cos x$ is even but integral over symmetric interval is zero)\n- $(\sin x, \sin x) = \int_{-\pi}^{\pi} \sin^2 x \, dx = \pi$\n- $(\cos x, \cos x) = \int_{-\pi}^{\pi} \cos^2 x \, dx = \pi$\n- $(\sin x, \cos x) = \int_{-\pi}^{\pi} \sin x \cos x \, dx = 0$ (orthogonal functions)\n\n6. **Calculate $(f,1)$, $(f,\sin x)$, $(f,\cos x)$:**\n- $(f,1) = \int_{-\pi}^{\pi} x \, dx = 0$ (odd function over symmetric interval)\n- $(f,\sin x) = \int_{-\pi}^{\pi} x \sin x \, dx$\n- $(f,\cos x) = \int_{-\pi}^{\pi} x \cos x \, dx$\n\n7. **Evaluate $(f,\sin x)$:** Use integration by parts:\nLet $u = x$, $dv = \sin x \, dx$, then $du = dx$, $v = -\cos x$.\n$$\int x \sin x \, dx = -x \cos x + \int \cos x \, dx = -x \cos x + \sin x + C.$$\nEvaluate from $-\pi$ to $\pi$:\n$$\int_{-\pi}^{\pi} x \sin x \, dx = [-x \cos x + \sin x]_{-\pi}^{\pi} = [-\pi \cos \pi + \sin \pi] - [-(-\pi) \cos(-\pi) + \sin(-\pi)] = [-\pi (-1) + 0] - [\pi (-1) + 0] = \pi - (-\pi) = 2\pi.$$\n\n8. **Evaluate $(f,\cos x)$:** Use integration by parts:\nLet $u = x$, $dv = \cos x \, dx$, then $du = dx$, $v = \sin x$.\n$$\int x \cos x \, dx = x \sin x - \int \sin x \, dx = x \sin x + \cos x + C.$$\nEvaluate from $-\pi$ to $\pi$:\n$$\int_{-\pi}^{\pi} x \cos x \, dx = [x \sin x + \cos x]_{-\pi}^{\pi} = [\pi \sin \pi + \cos \pi] - [-\pi \sin (-\pi) + \cos (-\pi)] = [0 -1] - [0 -1] = -1 - (-1) = 0.$$\n\n9. **Substitute values into system:**\n$$\begin{cases} 0 = a_0 (2\pi) + a_1 (0) + a_2 (0) \\ 2\pi = a_0 (0) + a_1 (\pi) + a_2 (0) \\ 0 = a_0 (0) + a_1 (0) + a_2 (\pi) \end{cases}$$\n\n10. **Solve for $a_0, a_1, a_2$:**\n- From first: $0 = 2\pi a_0 \Rightarrow a_0 = 0$\n- From second: $2\pi = \pi a_1 \Rightarrow a_1 = 2$\n- From third: $0 = \pi a_2 \Rightarrow a_2 = 0$\n\n11. **Projection:** $$P_L f = 0 \cdot 1 + 2 \sin x + 0 \cdot \cos x = 2 \sin x.$$\n\n12. **Distance:** $$\rho(f,L) = \|f - P_L f\| = \sqrt{(f - 2 \sin x, f - 2 \sin x)} = \sqrt{(f,f) - 4(f,\sin x) + 4(\sin x, \sin x)}.$$\nCalculate each term:\n- $(f,f) = \int_{-\pi}^{\pi} x^2 \, dx = 2 \int_0^{\pi} x^2 \, dx = 2 \cdot \frac{\pi^3}{3} = \frac{2 \pi^3}{3}$\n- $(f,\sin x) = 2\pi$ (from step 7)\n- $(\sin x, \sin x) = \pi$ (from step 5)\n\n13. **Substitute:**\n$$\rho(f,L) = \sqrt{\frac{2 \pi^3}{3} - 4 \cdot 2\pi + 4 \cdot \pi} = \sqrt{\frac{2 \pi^3}{3} - 8\pi + 4\pi} = \sqrt{\frac{2 \pi^3}{3} - 4\pi} = \sqrt{2\pi \left(\frac{\pi^2}{3} - 2\right)}.$$\n\n14. **Final answer:**\n$$\boxed{\rho(f,L) = \sqrt{2\pi \left(\frac{\pi^2}{3} - 2\right)}}.$$