We introduce a new numerical method based on machine learning to approximate the solution of elliptic partial differential equations with collocation using a set of sigmoidal functions. We show that a feedforward neural network with a single hidden layer with sigmoidal functions and fixed, random, internal weights and biases can be used to compute accurately a collocation solution. The choice to fix internal weights and bias leads to the so-called Extreme Learning Machine network. We discuss how to determine the range for both internal weights and biases in order to obtain a good underlining approximating space, and we explore the required number of collocation points. We demonstrate the efficiency of the proposed method with several one-dimensional diffusion-advection-reaction problems that exhibit steep behaviors, such as boundary layers. The boundary conditions are imposed directly as collocation equations. We point out that there is no need of training the network, as the proposed numerical approach results to a linear problem that can be easily solved using least-squares.Numerical results show that the proposed method achieves a good accuracy.Finally, we compare the proposed method with finite differences and point out the significant improvements in terms of computational cost, thus avoiding the time-consuming training phase.