Consider an ODE of the form
$$c_0 u + c_1 u' + c_2 u'' \enspace = \enspace f(x,u) \quad .$$
I want to solve this ODE with spectral methods. To this end, let $\{ x_k \}_{k=0}^N$ be suitable nodes, e.g. Tchebychev-Radau points $x_k = \cos\big( \tfrac{2\pi k}{2N+1} \big)$. I approximate $u$ by a series of the form
$$ u(x) \enspace = \enspace \sum_{i=0}^N u_i L_i(x) $$
with $u_i = u(x_i)$ and where $L_i(x)$ are Lagrange-Polynomials with nodes $x_k$ such that $L_i(x_k) = \delta_{ik}$.
1.)$\enspace$ Consider the linear case $f(x,u) \equiv 0$. Evaluation at the nodes $x_k$ allows rewriting the ODE as a linear system of equations
$$\sum_{j=0}^N \Big( c_0 \delta_{ij} + c_1 D_{ij} + c_2 D^2_{ij} \Big) u_j \enspace = \enspace 0 \quad , \qquad i \in \{0,\ldots, N\}$$
with $D_{ij}$ being the differentiation matrix. With given inital conditions, this can be solved.
2.)$\enspace$ However, assume now some nonlinearity, e.g. $f(x,u) = u^3$, then this ODE can be written as
$$ \sum_{j=0}^N \Big[ c_0 \delta_{ij} + c_1 D_{ij} + c_2 D_{ij}^2 \Big] u_j \enspace = \enspace u_i^3 $$
How can this ODE be solved with (pseudo-)spectral (collocation) methods? Due to the nonlinearity, inverting the matrix on the LHS is no longer an option. Any ideas?
DETAILS:
The rewritten ODE is obtained as follows: Insertion of the expansion into the ODE yields
$$ \sum_{k=0}^N \Big[ c_0 u_k + c_1 u_k' + c_2 u_k'' \Big] L_k(x) \enspace = \enspace \sum_{k=0}^N u_k^3 L_k(x)$$
where $u_i' = u'(x_i)$ and $u_i'' = u''(x_i)$. Evaluation at Tchebychev-Radau points $x_i$:
$$ c_0 u_i + c_1 u_i' + c_2 u_i'' \enspace = \enspace u_i^3 $$
since $L_k(x_i) = \delta_{ki}$. With the differentiation matrices
$$ \sum_{j=0}^N \Big[ c_0 \delta_{ij} + c_1 D_{ij} + c_2 D_{ij}^2 \Big] \enspace = \enspace u_i^3 $$