When solving differential equations by a spectral method, it is often
convenient to shift from Chebyshev polynomials Tn(x) with coefficients
an to modified basis functions that incorporate the boundary conditions.
For homogeneous Dirichlet boundary conditions, u(±1)=0, popular choices
include the ``Chebyshev difference basis", $\varsigma_{n}(x) \equiv T_{n+2}(x)
- T_{n}(x)withcoefficientsheredenotedb_{n}$ and the ``quadratic-factor
basis functions" ϱn(x)≡(1−x2)Tn(x) with coefficients
cn. If u(x) is weakly singular at the boundaries, then an will
decrease proportionally to O(A(n)/nκ) for some positive
constant κ, where the A(n) is a logarithm or a constant. We prove that
the Chebyshev difference coefficients bn decrease more slowly by a factor
of 1/n while the quadratic-factor coefficients cn decrease more slowly
still as O(A(n)/nκ−2). The error for the unconstrained
Chebyshev series, truncated at degree n=N, is
O(∣A(N)∣/Nκ) in the interior, but is worse by one power of
N in narrow boundary layers near each of the endpoints. Despite having nearly
identical error \emph{norms}, the error in the Chebyshev basis is concentrated
in boundary layers near both endpoints, whereas the error in the
quadratic-factor and difference basis sets is nearly uniform oscillations over
the entire interval in x. Meanwhile, for Chebyshev polynomials and the
quadratic-factor basis, the value of the derivatives at the endpoints is
O(N2), but only O(N) for the difference basis.