What if we add \( \baspsi_2=x^2 \) to the space \( V \)?
That is, approximating a parabola by any parabola?
(Hopefully we get the exact parabola!)
>>>fromapprox1Dimport*>>> x = sp.Symbol('x')
>>> f =10*(x-1)**2-1>>> u, c = least_squares(f=f, psi=[1, x, x**2], Omega=[1, 2])
>>>print u
10*x**2-20*x +9>>>print sp.expand(f)
10*x**2-20*x +9