clustering – Find Smooth Functions from Discrete Datas

I’m trying to write a algorithm to solve the following problem, which I did not find any related papers:

Given a set of discrete data points generated by n unkonwn smooth functions $f_1(x), f_2(x), cdots, f_n(x)$ at $x_{1}, x_{2}, cdots ,x_{m}$, how to group these data points into $n$ arrays $a^{(n)}_{i}$ so that data points in each array comes from a single smooth function, i.e $a^{(n)}_{i}=f_{n}(x_i) forall i$.

For example, if I have a straight line and a quadratic function plotted together in a single figure, I can easily distinguish between these two functions. However, it is very difficult for computer to distinguish these patterns.

This problem seems related to the clustering analysis. However, I still didn’t find any similar research result about it.