# 数学代写|数值分析代写numerical analysis代考|CIVL5458

## 数学代写|数值分析代写numerical analysis代考|General polynomial bases

In the search for a basis for $\mathcal{P}n$ that will avoid the numerical difficulties, let the structure of the equation $\mathbf{G c}=\mathbf{b}$ be our guide. What choice of basis would make the matrix $G$, written out in (2.15), as simple as possible? If the basis vectors are orthogonal, i.e., $$\left\langle\phi_j, \phi_k\right\rangle \begin{cases}\neq 0, & j=k \ =0, & j \neq k\end{cases}$$ then $\mathbf{G}$ only has nonzeros on the main diagonal, giving the system $$\left[\begin{array}{cccc} \left\langle\phi_0, \phi_0\right\rangle & 0 & \cdots & 0 \ 0 & \left\langle\phi_1, \phi_1\right\rangle & \ddots & \vdots \ \vdots & \ddots & \ddots & 0 \ 0 & \cdots & 0 & \left\langle\phi_n, \phi_n\right\rangle \end{array}\right]\left[\begin{array}{c} c_0 \ c_1 \ \vdots \ c_n \end{array}\right]=\left[\begin{array}{c} \left\langle f, \phi_0\right\rangle \ \left\langle f, \phi_1\right\rangle \ \vdots \ \left\langle f, \phi_n\right\rangle \end{array}\right] .$$ This system decouples into $n+1$ scalar equations $\left\langle\phi_j, \phi_j\right\rangle c_j=\left\langle f, \phi_j\right\rangle$ for $j=0, \ldots, n$. Solve these scalar equations to get $$c_j=\frac{\left\langle\phi_j, \phi_j\right\rangle}{\left\langle f, \phi_j\right\rangle}, \quad j=0, \ldots, n .$$ Thus, with respect to the orthogonal basis the least squares approximation to $f$ is given by $$P*(x)=\sum_{j=0}^n c_j \phi_j(x)=\sum_{j=0}^n \frac{\left\langle f, \phi_j\right\rangle}{\left\langle\phi_j, \phi_j\right\rangle} \phi_j(x) .$$
The formula (2.17) has an outstanding property: if we wish to extend approximation from $\mathcal{P}n$ one degree higher to $\mathcal{P}{n+1}$, we simply add in one more term. If we momentarily use the notation $P_{, k}$ for the least squares approximation from $\mathcal{P}k$, then $$P{, n+1}(x)=P_{*, n}(x)+\frac{\left\langle f, \phi_{n+1}\right\rangle}{\left\langle\phi_{n+1}, \phi_{n+1}\right\rangle} \phi_{n+1}(x) .$$
In contrast, to increase the degree of the least squares approximation in the monomial basis, one would need to extend the $G$ matrix by one row and column, and re-solve form $\mathrm{Gc}=\mathbf{b}$ : increasing the degree changes all the old coefficients in the monomial basis.

## 数学代写|数值分析代写numerical analysis代考|Coda: Connection to discrete least squares

Studies of numerical linear algebra inevitably address the discrete least squares problem: Given $\mathbf{A} \in \mathbb{R}^{m \times n}$ and $\mathbf{b} \in \mathbb{R}^m$ with $m \geq n$, solve
$(2.19)$
$$\min {\mathbf{x} \in \mathbb{R}^n}|\mathbf{A x}-\mathbf{b}|_2,$$ using the Euclidean norm $|\mathbf{v}|_2=\sqrt{\mathbf{v}^* \mathbf{v}}$. One can show that the minimizing $\mathbf{x}$ solves the linear system $$\mathbf{A}^* \mathbf{A x}=\mathbf{A}^* \mathbf{b},$$ which are called the normal equations. If $\operatorname{rank}(\mathbf{A})=n$ (i.e., the columns of $\mathbf{A}$ are linearly independent), then $\mathbf{A}^* \mathbf{A} \in \mathbb{R}^{n \times n}$ is invertible, and $$\mathbf{x}=\left(\mathbf{A}^* \mathbf{A}\right)^{-1} \mathbf{A}^* \mathbf{b} .$$ One learns that, for purposes of numerical stability, it is preferable to compute the $Q R$ factorization $$\mathbf{A}=\mathbf{Q R},$$ where the columns of $\mathbf{Q} \in \mathbb{R}^{m \times n}$ are orthonormal, $\mathbf{Q}^* \mathbf{Q}=\mathbf{I}$, and $\mathbf{R} \in \mathbb{R}^{n \times n}$ is upper triangular $\left(r{j, k}=0\right.$ if $\left.j>k\right)$ and invertible if the columns of $\mathbf{A}$ are linearly independent. Substituting QR for A reduces the solution formula $(2.21)$ to
$$\mathbf{x}=\mathbf{R}^{-1} \mathbf{Q}^* \mathbf{b} .$$
How does this “least squares problem” relate to the polynomial approximation problem in this section? We consider two perspectives.

# 数值分析代考

## 数学代写|数值分析代写numerical analysis代考|General polynomial bases

$$\left\langle\phi_j, \phi_k\right\rangle{\neq 0, \quad j=k=0, \quad j \neq k$$

$$c_j=\frac{\left\langle\phi_j, \phi_j\right\rangle}{\left\langle f, \phi_j\right\rangle}, \quad j=0, \ldots, n .$$

$$P (x)=\sum_{j=0}^n c_j \phi_j(x)=\sum_{j=0}^n \frac{\left\langle f, \phi_j\right\rangle}{\left\langle\phi_j, \phi_j\right\rangle} \phi_j(x) .$$ 公式 (2.17) 有一个突出的性质：如果我们茏望将近似值从 $\mathcal{P} n$ 高一个学位 $\mathcal{P} n+1$ ，我们只需再添加一 项。如果我们暂时使用符号 $P_{, k}$ 对于最小二乘近似 $\mathcal{P} k$ ，然后 $$P, n+1(x)=P_{, n}(x)+\frac{\left\langle f, \phi_{n+1}\right\rangle}{\left\langle\phi_{n+1}, \phi_{n+1}\right\rangle} \phi_{n+1}(x) .$$

## 数学代写|数值分析代写numerical analysis代考|Coda: Connection to discrete least squares

$$\min \mathbf{x} \in \mathbb{R}^n|\mathbf{A} \mathbf{x}-\mathbf{b}|_2$$

$$\mathbf{A}^* \mathbf{A} \mathbf{x}=\mathbf{A}^* \mathbf{b}$$

$$\mathbf{x}=\left(\mathbf{A}^* \mathbf{A}\right)^{-1} \mathbf{A}^* \mathbf{b} \text {. }$$

$$\mathbf{A}=\mathbf{Q R} \text {, }$$

$$\mathbf{x}=\mathbf{R}^{-1} \mathbf{Q}^* \mathbf{b}$$

myassignments-help数学代考价格说明

1、客户需提供物理代考的网址，相关账户，以及课程名称，Textbook等相关资料~客服会根据作业数量和持续时间给您定价~使收费透明，让您清楚的知道您的钱花在什么地方。

2、数学代写一般每篇报价约为600—1000rmb，费用根据持续时间、周作业量、成绩要求有所浮动(持续时间越长约便宜、周作业量越多约贵、成绩要求越高越贵)，报价后价格觉得合适，可以先付一周的款，我们帮你试做，满意后再继续，遇到Fail全额退款。

3、myassignments-help公司所有MATH作业代写服务支持付半款，全款，周付款，周付款一方面方便大家查阅自己的分数，一方面也方便大家资金周转，注意:每周固定周一时先预付下周的定金，不付定金不予继续做。物理代写一次性付清打9.5折。

Math作业代写、数学代写常见问题

myassignments-help擅长领域包含但不是全部: