I was looking at the Cheney and Kincaid book (6th edition) on numerical methods, with respect to collocation method for differential equations. Now for linear systems of ODES, collocation is just a linear solve. But for nonlinear systems of equations there is a residual function that we minimize.
The residual function they show in the Cheney and Kincaid book is p. 619 and shows.
$$ \mathcal{L} = \sum_{j=0}^{J}c_jv_j - b $$
This seems a bit odd, since I was expect something like the usual squared loss instead of just the sum of the differences. With this formulation, the positive errors can cancel out the negative errors.
Could someone just confirm that this is indeed the correct loss or residual function to use, or let me know if there a different residual function that is more appropriate. I checked a few other books. Most of them talk about using collocation on a linear system, which like I said is just a linear solve.