# Homework Help: Problem with visualizing splines

1. Mar 13, 2013

### Srumix

Hi Folks!

Let A be the space of splines of degree one that have only one interior knot, at the point x = 0. Or in other words: A is the 3 dimensional space of linear polynomials on [-1,1] that consists for straight line segments joined at x = 0.

How exactly do I visualize this space? The problem I'm working on assumes that I have run into splines before, but as a matter of fact I haven't. I have tried looking online for examples but not been able to find one.

Can anyone give me some pointers on how for example to find the basis for this space but also how a typical element of this space looks (since it's degree is one I assume that it is of the form p(x)=a+b*x).

2. Mar 13, 2013

### Dick

Well, p(x) is really defined by two linear functions, yes? One on [-1,0] and one on [0,1] and they have to have the same value at x=0. Then the spline is defined by three numbers (a,b,c) where a=p(-1), b=p(0) and c=p(1). That's a three dimensional space. Can you choose a basis?

3. Mar 13, 2013

### Srumix

Hi Dick!

Yeah I thought along those lines as well. But I could only come up with a basis sort of like {p(0),p(1),p(-1)} but i guess that's not really right.

The basis would have to be 3 dimensional as well right? Otherwise I would have gone for {0,x} but I know that's probably not correct.

Could you give me some pointers? :)

Much appreciated!

4. Mar 13, 2013

### Dick

The basis will be three different splines. How about just (1,0,0), (0,1,0) and (0,0,1)? Where (1,0,0) means p(-1)=1, p(0)=0 and p(1)=0. So that's the function p(x)=(-x) on [-1,0] and p(x)=0 on [0,1].

Last edited: Mar 13, 2013
5. Mar 13, 2013

### Srumix

I'm not quite sure i follow the last line. Do you mean p(x) = (-x) on [-1,0], p(x) = x on [0,1]?

EDIT: Never mind. I think i understand now. So if I write 2(1,0,0) + 3(0,1,0) + 4(0,0,1) that would mean the polynomial p(-1) =2, p(0) = 3, p(1)=4. So i have to find a linear polynomial that satisfies those conditions? This polynomial would probably be made up of different linear polynomials on the interval [-1,0] [0,1] right?

Last edited: Mar 13, 2013
6. Mar 13, 2013

### Dick

Yes, that's it. If you work out the three polynomials (defined separately intervals [-1,0] and [0,1]) corresponding to (1,0,0), (0,1,0) and (0,0,1), like I did for (1,0,0), then you can get the polynomial having p(-1)=2, p(0)=3 and p(1)=4 by adding up the factors times the three basis polynomials.

7. Mar 13, 2013

### Srumix

Thank you very much for your help Dick!! :D