fit a function to each interval |
used for large datapoints--to avoid kinks |
Linear Splines |
f(x)= f(xo) + m(x-xo) |
interval surrounds point |
issues: |
linearizing a non-linear function, oversimplifies behavior |
discontinuity at the intermediate points - slope is no the same on either side |
Quadratic Splines |
minimum of 2 intervals or 3 points |
f(x)= a1x^2 +b1x+c1 |
3n unknowns -- n is # of intervals |
(2n equations ) substitute points in formulas |
(n-1 equations) establish continuity with the slope at the intermediate points |
assumption: a1=0 |
minimal effect on other intervals |
under determined system by 1 equation |
intermediate points are not independent |
System of linear equations --do not use iterative methods (not DDS) |
all functions are dependent |
Cubic Splines |
most popular method |
minimum of 3 intervals or 4 points |
4n equations - undetermined by 2 equations |
assume 2nd derivative of outer points is 0 |
Alternative - Lagrange |
(xi - xi-1) f''(xi-1)+ 2(xi+1 -xi-1) f''(xi) +(xi+1 -xi) f''(xi+1) = (6/(xi+1 -xi)) [f(xi+1)-f(xi)] + (6/(xi - xi-1)) [f(xi-1) -f(xi)] |
f(x)= (f''(xi-1)/6(xi -xi-1)) (xi -x)^3 + (f''(xi)/6(xi- xi-1)) (x- xi-1)^3 +[ (f(xi-1)/(xi - xi-1)) - (f''(xi-1)(xi -xi-1)/6) ] (xi - x)+ [ (f(xi)/(xi -xi-1)) - (f''(xi)(xi- xi-1)/6) ] (x-xi-1) |
solve all second derivatives first |
all related by continuity |
Cheatographer
Metadata
Comments
No comments yet. Add yours below!
Add a Comment