Wikipedia:Reference desk/Archives/Mathematics/2016 September 5

From Wikipedia, the free encyclopedia
Mathematics desk
< September 4 << Aug | September | Oct >> September 6 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


September 5[edit]

piecewise polynomial least squares, the sequel[edit]

See Wikipedia:Reference desk/Archives/Mathematics/2015 November 15#piecewise polynomial least squares. Thanks again to Meni for the answer there. Now: sometimes I want to put other constraints on the fit. (You may assume, for simplicity and also because it's what I'm most likely doing, that my function is piecewise quadratic, discontinuous only in the second derivative.)

  • How can I make it periodic, i.e. and ?
  • How can I fix and arbitrarily?
  • How can I specify that both end segments are linear? (It's easy to make the first segment linear, by not including as a basis function; or to do the same for the last, by turning things around. Not obvious how I can so constrain both.)

Tamfang (talk) 08:30, 5 September 2016 (UTC)[reply]

An approach would be the following:
For a set of breakpoints , and adjustable parameters , let , with
Continuity then requires:
First order differentiable requires:
Periodic requires:
Linear ends requires:
Etc. Dragons flight (talk) 07:42, 6 September 2016 (UTC)[reply]
I hate to seem ungrateful but have you done anything here other than express my desiderata more formally? I already have a program that does a least squares fit with basis functions
(Continuity comes from having no for . For this project, .) What I don't know is how to choose weights consistent with the least squares principle and the other constraints. —Tamfang (talk) 09:48, 7 September 2016 (UTC)[reply]
I assumed you knew how to do the fit since you already said you are doing the fit.
Given a target function ,
(Here I assuming you want to measure the fit by moving uniformly in x, if instead you want to measure the fit by moving uniformly along the path length of g(x), then you would need to modify the definition of and adjust the following equations accordingly.)
For this project x is path length, so no worries! —Tamfang (talk) 10:22, 8 September 2016 (UTC)[reply]
This is minimized by solving the system of equation generated by:
For every choice of i and j you have one equation and one unknown, , so it is simply a matter of solving the resulting matrix equation to find the unknown parameters.
The above describes the general version, with no constraints, not even including continuity. To add constraints, you take the constraint equations mentioned above and use them to replace unknowns in your matrix equation with the corresponding constraints expressed in other variables. After replacement, you simply solve for the remaining unknowns to get your answer. Dragons flight (talk) 11:34, 7 September 2016 (UTC)[reply]
Okay, I need to absorb this some. —Tamfang (talk) 18:13, 7 September 2016 (UTC)[reply]
  • I crossed out the linear constraint because, for the project I have in mind, I thought of how to do (better) without it. —Tamfang (talk) 18:13, 7 September 2016 (UTC)[reply]

For the periodic case, the basis functions can be 1 and

For most of my other constrained cases, I can use a three-part quadratic with double roots at and breaks at . —Tamfang (talk) 04:14, 11 September 2016 (UTC)[reply]

solutions[edit]

Eventually I did find a systematic way to cope with all sorts of boundary constraints. For the periodic case, start with piecewise basis functions

for 0 ≤ p < n, where solves for 0 ≤ k < n, where n-1 is the required degree of continuity; for other kinds of end constraints, find any function that fits those constraints and subtract it from the "input" function. In any case, use as basis functions a family of (n+1)-piece solitons with . —Tamfang (talk) 04:09, 25 September 2016 (UTC)[reply]

Compactness Theorem and Model theory:[edit]

Can one prove, that every set - being a model of every finite sub-class of a given class of first-order axioms - is a model of that class?

Please notice that Compactness Theorem is not of help here. HOTmag (talk) 11:27, 5 September 2016 (UTC)[reply]

Modeling a collection of axioms is defined as modeling each individual axiom. So it's a triviality.--2406:E006:384B:1:2DF4:6B68:2A07:A694 (talk) 09:07, 6 September 2016 (UTC)[reply]