# Thread: Quadratic spline interpolation: S'(x_i) = m_i + [(m_{i+1}-m_i)/h][x-x_i], x in [x_i,

1. ## Quadratic spline interpolation: S'(x_i) = m_i + [(m_{i+1}-m_i)/h][x-x_i], x in [x_i,

Hi, I have been working on this 3 hours, and I just can't figure it out. I have this article https://books.google.ee/books?id=5fxu15HQRJ0C&pg=PA60&lpg=PA60&dq=ruutspla in+pedas&source=bl&ots=8h47blCY7y&sig=ce8u4FB5U18A kvFDEyke4ChKnOw&hl=et&sa=X&ved=0ahUKEwiYjuL80dLZAh WFDCwKHf9JCPkQ6AEIJjAA#v=onepage&q=ruutsplain%20pe das&f=false and I need to derive the formula (10) from page 50. Can anyone show me how it's done?

I know that

. . . . .$S'(x_i)\,=\,m_i,\quad i\,=\,0,\,1,\,...,\,n\,-\, 1$

and

. . . . .$S'(x)\,=\,m_i\,+\, \dfrac{m_{i+1}\, -\, m_i}{h}\, (x\, -\, x_i),\quad x\, \in\, [x_i,\, x_{i+1}]$

so integrate from $x_i$ to $x$

. . . . .$S(x)\,-\,S(x_i)\, =\, m_i(x-x_i)\, +\, \dfrac{m_{i+1}\, -\, m_i}{h} \, \dfrac{(x\, -\,x_i)(x\, -\, x_i)}{2}$

2. Still haven't figured it out, can someone help me or give me a hint?

3. Sorry, my Estonian isn't too good. My Finnish is passable.

Write out the integral: $\int\limits_{x_{i}}^{x}S'(t)\;dt$

Substitute your other expression for $S'(t)$ and see where it leads.

4. It's actually in English. Just a little section in Estonian. Well, I tried but it didn't get me anywhere.

5. Originally Posted by theMR
It's actually in English. Just a little section in Estonian. Well, I tried but it didn't get me anywhere.
Nonresponsive. Show what you tried, please.

6. First of all, for me $\eta=\frac{1}{2}$ and $h_i=h$ for every $i$, so

. . . . .$(P_ny)(t)=y_{i+1}+ \left[\dfrac{h}{8}-\dfrac{(t_{i+1}-t)^2}{2h}\right]m_i+\left[\dfrac{(t-t_i)^2}{2h}-\dfrac{h}{8}\right]m_{i+1}$

I tried like this

. . . . .$S'(t)=m_i -\dfrac{m_{i+1}-m_i}{h}(t-t_i)$

now if I integrate it from $x$ to $x_i$, I get

. . . . .$S(x)=S(x_i)+m_i(x-x_i)+\dfrac{m_{i+1}-m_i}{2h}(x-x_i)(x-x_i)$

now if $x=x_{i+1}$

. . . . .$S(x_{i+1})=S(x_i)+hm_i+\dfrac{(m_{i+1}-m_i)h}{2}$

and from that

. . . . .$S(x_i)=y_{i+1}-hm_i-\dfrac{m_{i+1}-m_i}{2}h$

. . . . .$S(x)=y_{i+1}-hm_i-\dfrac{m_{i+1}-m_i}{2}h+m_i(x-x_i)+\dfrac{m_{i+1}-m_i}{2h}(x-x_i)(x-x_i)$