### 数学代写|计算线性代数代写Computational Linear Algebra代考|Diagonally Dominant Tridiagonal Matrices; Three Examples

statistics-lab™ 为您的留学生涯保驾护航 在代写计算线性代数Computational Linear Algebra方面已经树立了自己的口碑, 保证靠谱, 高质且原创的统计Statistics代写服务。我们的专家在代写计算线性代数Computational Linear Algebra代写方面经验极为丰富，各种代写计算线性代数Computational Linear Algebra相关的作业也就用不着说。

• Statistical Inference 统计推断
• Statistical Computing 统计计算
• (Generalized) Linear Models 广义线性模型
• Statistical Machine Learning 统计机器学习
• Longitudinal Data Analysis 纵向数据分析
• Foundations of Data Science 数据科学基础

## 数学代写|计算线性代数代写Computational Linear Algebra代考|Piecewise Linear and Cubic Spline Interpolation

To avoid oscillations like the one in Fig. $2.1$ piecewise linear interpolation can be used. An example is shown in Fig. 2.2. The interpolant $g$ approximates the original function quite well, and for some applications, like plotting, the linear interpolant using many points is what is used. Note that $g$ is a piecewise polynomial of the form
$$g(x):= \begin{cases}p_{1}(x), & \text { if } x_{1} \leq x<x_{2} \ p_{2}(x), & \text { if } x_{2} \leq x<x_{3} \ \vdots & \ p_{n-1}(x), & \text { if } x_{n-1} \leq x<x_{n} \ p_{n}(x), & \text { if } x_{n} \leq x \leq x_{n+1}\end{cases}$$

where each $p_{i}$ is a polynomial of degree $\leq 1$. In particular, $p_{1}$ is given in (2.3) and the other polynomials $p_{i}$ are given by similar expressions.

The piecewise linear interpolant is continuous, but the first derivative will usually have jumps at the interior sites. We can obtain a smoother approximation by letting $g$ be a piecewise polynomial of higher degree. With degree 3 (cubic) we obtain continuous derivatives of order $\leq 2\left(C^{2}\right)$. We consider here the following functions giving examples of $C^{2}$ cubic spline interpolants.

Definition 2.1 (The $D_{2}-$ Spline Problem) Given $n \in \mathbb{N}$, an interval $[a, b], y \in$ $\mathbb{R}^{n+1}$, knots (sites) $x_{1}, \ldots, x_{n+1}$ given by $(2.1)$ and numbers $\mu_{1}, \mu_{n+1}$. The problem is to find a function $g:[a, b] \rightarrow \mathbb{R}$ such that

• piecewise cubic polynomial: $g$ is of the form (2.4) with each $p_{i}$ a cubic polynomial,
• smoothness: $g \in C^{2}[a, b]$, i.e., derivatives of order $\leq 2$ are continuous on $\mathbb{R}$,
• interpolation: $g\left(x_{i}\right)=y_{i}, \quad i=1,2, \ldots, n+1$,
• $D_{2}$ boundary conditions: $g^{\prime \prime}(a)=\mu_{1}, \quad g^{\prime \prime}(b)=\mu_{n+1}$.
We call $g$ a $D_{2}$-spline. It is called an $N$-spline or natural spline if $\mu_{1}=\mu_{n+1}=0$.

## 数学代写|计算线性代数代写Computational Linear Algebra代考|Give Me a Moment

Existence and uniqueness of a solution of the $D_{2}$-spline problem hinges on the nonsingularity of a linear system of equations that we now derive. The unknowns are derivatives at the knots. Here we use second derivatives which are sometimes called moments. We start with the following lemma.

Lemma $2.1$ (Representing Each $p_{i}$ Using $(0,2)$ Interpolation) Given $a<b$, $h=(b-a) / n$ with $n \geq 2, x_{i}=a+(i-1) h$, and numbers $y_{i}, \mu_{i}$ for $i=1, \ldots, n+1$. For $i=1, \ldots, n$ there are unique cubic polynomials $p_{i}$ such that
$$p_{i}\left(x_{i}\right)=y_{i}, p_{i}\left(x_{i+1}\right)=y_{i+1}, \quad p_{i}^{\prime \prime}\left(x_{i}\right)=\mu_{i}, p_{i}^{\prime \prime}\left(x_{i+1}\right)=\mu_{i+1}$$
Moreover,
$$p_{i}(x)=c_{i, 1}+c_{i, 2}\left(x-x_{i}\right)+c_{i, 3}\left(x-x_{i}\right)^{2}+c_{i, 4}\left(x-x_{i}\right)^{3} \quad i=1, \ldots, n$$
where
$$c_{i 1}=y_{i}, c_{i 2}=\frac{y_{i+1}-y_{i}}{h}-\frac{h}{3} \mu_{i}-\frac{h}{6} \mu_{i+1}, c_{i, 3}=\frac{\mu_{i}}{2}, c_{i, 4}=\frac{\mu_{i+1}-\mu_{i}}{6 h} .$$ Proof Consider $p_{i}$ in the form (2.7) for some $1 \leq i \leq n$. Evoking (2.6) we find $p_{i}\left(x_{i}\right)=c_{i, 1}=y_{i}$. Since $p_{i}^{\prime \prime}(x)=2 c_{i, 3}+6 c_{i, 4}\left(x-x_{i}\right)$ we obtain $c_{i, 3}$ from $p_{i}^{\prime \prime}\left(x_{i}\right)=$ $2 c_{i, 3}=\mu_{i}$ (a moment), and then $c_{i, 4}$ from $p_{i}^{\prime \prime}\left(x_{i+1}\right)=\mu_{i}+6 h c_{i, 4}=\mu_{i+1}$. Finally we find $c_{i, 2}$ by solving $p_{i}\left(x_{i+1}\right)=y_{i}+c_{i, 2} h+\frac{\mu_{i}}{2} h^{2}+\frac{\mu_{i+1}-\mu_{i}}{6 h} h^{3}=y_{i+1}$. For $j=0,1,2,3$ the shifted powers $\left(x-x_{i}\right)^{j}$ constitute a basis for cubic polynomials and the formulas (2.8) are unique by construction. It follows that $p_{i}$ is unique.

## 数学代写|计算线性代数代写Computational Linear Algebra代考|LU Factorization of a Tridiagonal System

To find the $D^{2}$-spline $g$ we have to solve the triangular system (2.11). Consider solving a general tridiagonal linear system $A x=b$ where $A=\operatorname{tridiag}\left(a_{i}, d_{i}, c_{i}\right) \in$ $\mathbb{C}^{n \times n}$. Instead of using Gaussian elimination directly, we can construct two matrices $\boldsymbol{L}$ and $\boldsymbol{U}$ such that $\boldsymbol{A}=\boldsymbol{L} \boldsymbol{U}$. Since $\boldsymbol{A} \boldsymbol{x}=\boldsymbol{L} \boldsymbol{U} \boldsymbol{x}=\boldsymbol{b}$ we can find $\boldsymbol{x}$ by solving two systems $\boldsymbol{L z}=\boldsymbol{b}$ and $\boldsymbol{U} \boldsymbol{x}=z$. Moreover $\boldsymbol{L}$ and $\boldsymbol{U}$ are both triangular and bidiagonal, and if in addition they are nonsingular the two systems can be solved easily without using elimination.
In our case we write the product $\boldsymbol{A}=\boldsymbol{L U}$ in the form
$$\left[\begin{array}{lllll} d_{1} & c_{1} & & & \ a_{1} & d_{2} & c_{2} & & \ & \ddots & \ddots & \ddots & \ & & a_{n-2} & d_{n-1} & c_{n-1} \ & & & a_{n-1} & d_{n} \end{array}\right]=\left[\begin{array}{cccc} 1 & & \ l_{1} & 1 & \ & \ddots & \ddots & \ & & l_{n-1} & 1 \end{array}\right]\left[\begin{array}{cccc} u_{1} & c_{1} & & \ & \ddots & \ddots & \ & & u_{n-1} & c_{n-1} \ & & & u_{n} \end{array}\right]$$
To find $\boldsymbol{L}$ and $\boldsymbol{U}$ we first consider the case $n=3$. Equation (2.15) takes the form
$$\left[\begin{array}{lll} d_{1} & c_{1} & 0 \ a_{1} & d_{2} & c_{2} \ 0 & a_{2} & d_{3} \end{array}\right]=\left[\begin{array}{ccc} 1 & 0 & 0 \ l_{1} & 1 & 0 \ 0 & l_{2} & 1 \end{array}\right]\left[\begin{array}{ccc} u_{1} & c_{1} & 0 \ 0 & u_{2} & c_{2} \ 0 & 0 & u_{3} \end{array}\right]=\left[\begin{array}{ccc} u_{1} & c_{1} & 0 \ l_{1} u_{1} l_{1} c_{1}+u_{2} & c_{2} \ 0 & l_{2} u_{2} & l_{2} c_{2}+u_{3} \end{array}\right],$$
and the systems $\boldsymbol{L z}=\boldsymbol{b}$ and $\boldsymbol{U} \boldsymbol{x}=z$ can be written
$$\left[\begin{array}{lll} 1 & 0 & 0 \ l_{1} & 1 & 0 \ 0 & l_{2} & 1 \end{array}\right]\left[\begin{array}{l} z_{1} \ z_{2} \ z_{3} \end{array}\right]=\left[\begin{array}{l} b_{1} \ b_{2} \ b_{3} \end{array}\right],\left[\begin{array}{ccc} u_{1} & c_{1} & 0 \ 0 & u_{2} & c_{2} \ 0 & 0 & u_{3} \end{array}\right]\left[\begin{array}{l} x_{1} \ x_{2} \ x_{3} \end{array}\right]=\left[\begin{array}{l} z_{1} \ z_{2} \ z_{3} \end{array}\right]$$
Comparing elements we find
\begin{aligned} &u_{1}=d_{1}, \quad l_{1}=a_{1} / u_{1}, \quad u_{2}=d_{2}-l_{1} c_{1}, \quad l_{2}=a_{2} / u_{2}, \quad u_{3}=d_{3}-l_{2} c_{2}, \ &z_{1}=b_{1}, \quad z_{2}=b_{2}-l_{1} z_{1}, \quad z_{3}=b_{3}-l_{2} z_{2} \ &x_{3}=z_{3} / u_{3}, \quad x_{2}=\left(z_{2}-c_{2} x_{3}\right) / u_{2}, \quad x_{1}=\left(z_{1}-c_{1} x_{2}\right) / u_{1} \end{aligned}
In general, if
$$u_{1}=d_{1}, \quad l_{k}=a_{k} / u_{k}, \quad u_{k+1}=d_{k+1}-l_{k} c_{k}, \quad k=1,2, \ldots, n-1,$$
then $\boldsymbol{A}=\boldsymbol{L} \boldsymbol{U}$. If $u_{1}, u_{2}, \ldots, u_{n-1}$ are nonzero then (2.16) is well defined. If in addition $u_{n} \neq 0$ then we can solve $\boldsymbol{L} z=\boldsymbol{b}$ and $\boldsymbol{U} \boldsymbol{x}=z$ for $z$ and $\boldsymbol{x}$. We formulate this as two algorithms. In trifactor, vectors $l \in \mathbb{C}^{n-1}, \boldsymbol{u} \in \mathbb{C}^{n}$ are computed from $a, c \in \mathbb{C}^{n-1}, \boldsymbol{d} \in \mathbb{C}^{n}$. This implements the LU factorization of a tridiagonal matrix:

## 数学代写|计算线性代数代写Computational Linear Algebra代考|Piecewise Linear and Cubic Spline Interpolation

G(X):={p1(X), 如果 X1≤X<X2 p2(X), 如果 X2≤X<X3 ⋮ pn−1(X), 如果 Xn−1≤X<Xn pn(X), 如果 Xn≤X≤Xn+1

• 分段三次多项式：G是 (2.4) 的形式，每个p一世三次多项式，
• 光滑度：G∈C2[一个,b]，即阶导数≤2是连续的R,
• 插值：G(X一世)=是一世,一世=1,2,…,n+1,
• D2边界条件：G′′(一个)=μ1,G′′(b)=μn+1.
我们称之为G一个D2-样条。它被称为ñ-spline 或自然样条 ifμ1=μn+1=0.

## 数学代写|计算线性代数代写Computational Linear Algebra代考|Give Me a Moment

p一世(X一世)=是一世,p一世(X一世+1)=是一世+1,p一世′′(X一世)=μ一世,p一世′′(X一世+1)=μ一世+1

p一世(X)=C一世,1+C一世,2(X−X一世)+C一世,3(X−X一世)2+C一世,4(X−X一世)3一世=1,…,n

C一世1=是一世,C一世2=是一世+1−是一世H−H3μ一世−H6μ一世+1,C一世,3=μ一世2,C一世,4=μ一世+1−μ一世6H.证明考虑p一世以 (2.7) 的形式对某些1≤一世≤n. 唤起 (2.6) 我们发现p一世(X一世)=C一世,1=是一世. 自从p一世′′(X)=2C一世,3+6C一世,4(X−X一世)我们获得C一世,3从p一世′′(X一世)= 2C一世,3=μ一世（片刻），然后C一世,4从p一世′′(X一世+1)=μ一世+6HC一世,4=μ一世+1. 最后我们发现C一世,2通过解决p一世(X一世+1)=是一世+C一世,2H+μ一世2H2+μ一世+1−μ一世6HH3=是一世+1. 为了j=0,1,2,3转移的权力(X−X一世)j构成三次多项式的基础，并且公式（2.8）在构造上是唯一的。它遵循p一世是独特的。

## 数学代写|计算线性代数代写Computational Linear Algebra代考|LU Factorization of a Tridiagonal System

[d1C1 一个1d2C2 ⋱⋱⋱ 一个n−2dn−1Cn−1 一个n−1dn]=[1 l11 ⋱⋱ ln−11][在1C1 ⋱⋱ 在n−1Cn−1 在n]

[d1C10 一个1d2C2 0一个2d3]=[100 l110 0l21][在1C10 0在2C2 00在3]=[在1C10 l1在1l1C1+在2C2 0l2在2l2C2+在3],

[100 l110 0l21][和1 和2 和3]=[b1 b2 b3],[在1C10 0在2C2 00在3][X1 X2 X3]=[和1 和2 和3]

## 有限元方法代写

tatistics-lab作为专业的留学生服务机构，多年来已为美国、英国、加拿大、澳洲等留学热门地的学生提供专业的学术服务，包括但不限于Essay代写，Assignment代写，Dissertation代写，Report代写，小组作业代写，Proposal代写，Paper代写，Presentation代写，计算机作业代写，论文修改和润色，网课代做，exam代考等等。写作范围涵盖高中，本科，研究生等海外留学全阶段，辐射金融，经济学，会计学，审计学，管理学等全球99%专业科目。写作团队既有专业英语母语作者，也有海外名校硕博留学生，每位写作老师都拥有过硬的语言能力，专业的学科背景和学术写作经验。我们承诺100%原创，100%专业，100%准时，100%满意。

## MATLAB代写

MATLAB 是一种用于技术计算的高性能语言。它将计算、可视化和编程集成在一个易于使用的环境中，其中问题和解决方案以熟悉的数学符号表示。典型用途包括：数学和计算算法开发建模、仿真和原型制作数据分析、探索和可视化科学和工程图形应用程序开发，包括图形用户界面构建MATLAB 是一个交互式系统，其基本数据元素是一个不需要维度的数组。这使您可以解决许多技术计算问题，尤其是那些具有矩阵和向量公式的问题，而只需用 C 或 Fortran 等标量非交互式语言编写程序所需的时间的一小部分。MATLAB 名称代表矩阵实验室。MATLAB 最初的编写目的是提供对由 LINPACK 和 EISPACK 项目开发的矩阵软件的轻松访问，这两个项目共同代表了矩阵计算软件的最新技术。MATLAB 经过多年的发展，得到了许多用户的投入。在大学环境中，它是数学、工程和科学入门和高级课程的标准教学工具。在工业领域，MATLAB 是高效研究、开发和分析的首选工具。MATLAB 具有一系列称为工具箱的特定于应用程序的解决方案。对于大多数 MATLAB 用户来说非常重要，工具箱允许您学习应用专业技术。工具箱是 MATLAB 函数（M 文件）的综合集合，可扩展 MATLAB 环境以解决特定类别的问题。可用工具箱的领域包括信号处理、控制系统、神经网络、模糊逻辑、小波、仿真等。