是否有一个包可以自动排版用于计算牛顿除差算法系数的三角表?
答案1
我在互联网上找到了一个对我有用的解决方案。如果你想看看我在哪里找到的,请使用关联,这是一篇关于有限差分的文本。
\[
\begin{array}{cccccc}
x_0 & y_0 \\
& & \Delta y_0 \\
x_1 & y_1 & & \Delta^2 y_0\\
& & \Delta y_1 & & \Delta^3 y_0\\
x_2 & y_2 & & \Delta^2 y_1 & & \Delta^4 y_0\\
& & \Delta y_2 & & \Delta^3 y_1\\
x_3 & y_3 & & \Delta^2 y_2\\
& & \Delta y_3 \\
x_4 & y_4
\end{array}
\]
答案2
我今天早上也遇到了同样的问题。我用一个不太优雅的安排解决了它
\documentclass[a4paper,11pt]{article}
\usepackage{array}
\newcolumntype{C}{>{$}c<{$}}
\begin{document}
\begin{table}[h]
\centering
\begin{tabular}{C}
\begin{tabular}{C|C|C|C|C|C|C|C|C}
x_1,x_2 & x_1,x_3 & x_1,x_4 & x_1, x_5 & x_1, x_6 & x_1, x_7 & x_1, x_8 & x_1, x_9 & x_1, x_{10}
\end{tabular}
\\
\begin{tabular}{C|C|C|C|C|C|C|C}
x_2,x_3 & x_2,x_4 & x_2,x_5 & x_2,x_6 & x_2,x_7 & x_2,x_8 & x_2,x_9 & x_2,x_{10}
\end{tabular}
\\
\begin{tabular}{C|C|C|C|C|C|C}
x_3,x_4 & x_3,x_5 & x_3,x_6 & x_3,x_7 & x_3,x_8 & x_3,x_9 & x_3,x_{10}
\end{tabular}
\\
\begin{tabular}{C|C|C|C|C|C}
x_4,x_5 & x_4,x_6 & x_4,x_7 & x_4,x_8 & x_4,x_9 & x_4,x_{10}
\end{tabular}
\\
\begin{tabular}{C|C|C|C|C}
x_5,x_6 & x_5,x_7 & x_5,x_8 & x_5,x_9 & x_5,x_{10}
\end{tabular}
\\
\begin{tabular}{C|C|C|C}
x_6,x_7 & x_6,x_8 & x_6,x_9 & x_6,x_{10}
\end{tabular}
\\
\begin{tabular}{C|C|C}
x_7,x_8 & x_7,x_9 & x_7,x_{10}
\end{tabular}
\\
\begin{tabular}{C|C}
x_8,x_9 & x_8,x_{10}
\end{tabular}
\\
\begin{tabular}{C}
x_9,x_{10}
\end{tabular}
\end{tabular}
\caption{Divided Differences}
\label{table:divided_differences}
\end{table}
\end{document}