Vector space of functions defined by a condition

Hall
Messages
351
Reaction score
87
Homework Statement
Main body is to be referred.
Relevant Equations
Main body should be referred.
##f : [0,2] \to R##. ##f## is continuous and is defined as follows:
$$
f = ax^2 + bx ~~~~\text{ if x belongs to [0,1]}$$
$$
f(x)= Ax^3 + Bx^2 + Cx +D ~~~~\text{if x belongs to [1,2]}$$

##V = \text{space of all such f}##

What would the basis for V? Well, for ##x \in [0,1]## the basis for ##V## (or those f’s can be constructed) is ##\{x, x^2\}##, and for ##x\in [1,2]## the basis for ##V## is ##\{x^3, x^2, x, 1\}##. I wonder how to combine it, and can I find the dimension of V without finding the basis for V?
 
  • Like
Likes Delta2
Physics news on Phys.org
To construct a basis you need to find a set of functions that belong to your vector space from which any other function in the vector space can be constructed. What have you thought of doing so far?
 
I think the basis of this V is some functions that also change formula depending on where x belongs. I got some idea but I ll explain further if this hint is not enough.
 
  • Like
Likes Hall
Hall said:
Homework Statement:: Main body is to be referred.
Relevant Equations:: Main body should be referred.

##f : [0,2] \to R##. ##f## is continuous and is defined as follows:
$$
f = ax^2 + bx ~~~~\text{ if x belongs to [0,1]}$$
$$
f(x)= Ax^3 + Bx^2 + Cx +D ~~~~\text{if x belongs to [1,2]}$$

##V = \text{space of all such f}##

What would the basis for V? Well, for ##x \in [0,1]## the basis for ##V## (or those f’s can be constructed) is ##\{x, x^2\}##, and for ##x\in [1,2]## the basis for ##V## is ##\{x^3, x^2, x, 1\}##. I wonder how to combine it, and can I find the dimension of V without finding the basis for V?

On the face of it, six real numbers are required to specify f: (a,b,A,B,C,D). But f must be continuous at 1. What condition does that impose on (a,b,A,B,C,D)?
 
pasmith said:
On the face of it, six real numbers are required to specify f: (a,b,A,B,C,D). But f must be continuous at 1. What condition does that impose on (a,b,A,B,C,D)?
##f(1)=f(1)##
##a+ b = A + B + C +D##
##a = A +B +C +D -b##
Only 5 of them are independent.
 
Delta2 said:
I think the basis of this V is some functions that also change formula depending on where x belongs. I got some idea but I ll explain further if this hint is not enough.
How about this:
$$
\text{Basis} = \{x , x^2\} ~~~~~\text{if x belongs to [0,1]}$$

$$
\text{Basis} = \{1, x, x^2, x^3\} ~~~~\text{if x belongs to [1,2]}$$
 
  • Wow
Likes PeroK and Delta2
Hall said:
How about this:
$$
\text{Basis} = \{x , x^2\} ~~~~~\text{if x belongs to [0,1]}$$

$$
\text{Basis} = \{1, x, x^2, x^3\} ~~~~\text{if x belongs to [1,2]}$$
No I don't mean that unfortunately.
I mean to define some functions like for example ##f_3:[0,2]\to R## with $$f_3(x)=0 ,x\in [0,1]$$$$f_3(x)=x^3,x\in [1,2] $$and then it is obvious at least to me that this ##f_3## is one of the basis vectors of V.
 
Delta2 said:
No I don't mean that unfortunately.
I mean to define some functions like for example ##f_3:[0,2]\to R## with $$f_3(x)=0 ,x\in [0,1]$$$$f_3(x)=x^3,x\in [1,2] $$and then it is obvious at least to me that this ##f_3## is one of the basis vectors of V.
I’m sorry I’m unable to grasp the concept, but let me try once again:
$$
f_3(x) = x^2 +x ~~~~x \in [0,1]$$
$$
f_3(x) = x^3 +x^2 +x +1 ~~~~ x\in [1,2]$$
 
Hall said:
I’m sorry I’m unable to grasp the concept, but let me try once again:
$$
f_3(x) = x^2 +x ~~~~x \in [0,1]$$
$$
f_3(x) = x^3 +x^2 +x +1 ~~~~ x\in [1,2]$$
hmm I am not sure if this ##f_3## qualifies as basis for V let me think...
 
  • #10
Well it seems that ##f_3## of yours generates a subspace of V.
 
  • Like
Likes Hall
  • #11
Can you try to write down 5 different functions that you think might be linearly independent? Try to keep them as simple as possible (e.g. monomials are better than many terms in a sum)
 
  • #12
Office_Shredder said:
Can you try to write down 5 different functions that you think might be linearly independent? Try to keep them as simple as possible (e.g. monomials are better than many terms in a sum)
##f_1(x)=1##
##f_2(x) =x##
##f_3(x) = x^2##
##f_4(x)= x^3##

Keeping the context of this question in mind, I couldn’t write the fifth one.
 
  • #13
Delta2 said:
Well it seems that ##f_3## of yours generates a subspace of V.
Not even, that function is not in ##V## because it is not continuous at x=1.
 
  • Informative
Likes Delta2
  • #14
Delta2 said:
No I don't mean that unfortunately.
I mean to define some functions like for example ##f_3:[0,2]\to R## with $$f_3(x)=0 ,x\in [0,1]$$$$f_3(x)=x^3,x\in [1,2] $$and then it is obvious at least to me that this ##f_3## is one of the basis vectors of V.
This too is not continuous at x=1.
 
  • #15
Hall said:
##f(1)=f(1)##
##a+ b = A + B + C +D##
##a = A +B +C +D -b##
Only 5 of them are independent.
So can you figure out 5 ways of assigning the independent constants such that the resulting functions are linearly independent?
 
  • #16
Hall said:
##f_1(x)=1##
##f_2(x) =x##
##f_3(x) = x^2##
##f_4(x)= x^3##

Keeping the context of this question in mind, I couldn’t write the fifth one.
The middle two are fine, but ##f_1## and ##f_3## aren't elements of your space! You have to define these piecewise.
 
  • Like
Likes Steve4Physics
  • #17
Office_Shredder said:
The middle two are fine, but ##f_1## and ##f_3## aren't elements of your space! You have to define these piecewise.
Sorry, but ##f_2## and ##f_3## are the middle ones.

Considering that you meant ##f_1## and ##f_4##, I would say
$$
f_1(x) = 1 ~~~~~~~ x \in [1,2]$$
Else,
$$
f_1(x) = 0 ~~~~~~~~ x \in [0,1]$$

Why would ##f_4(x) = x^3## not belong to V? It is the case when ##A=1, B=C=D=0##?
 
  • #18
Hall said:
Sorry, but ##f_2## and ##f_3## are the middle ones.

Considering that you meant ##f_1## and ##f_4##, I would say
$$
f_1(x) = 1 ~~~~~~~ x \in [1,2]$$
Else,
$$
f_1(x) = 0 ~~~~~~~~ x \in [0,1]$$

Why would ##f_4(x) = x^3## not belong to V? It is the case when ##A=1, B=C=D=0##?
Again, that ##f_1## is not in V because it is not continuous at x=1. Your basis functions must satisfy all requirements to be in V.

Hall said:
Why would f4(x)=x3 not belong to V? It is the case when A=1,B=C=D=0?
Because on [0,1] it is not of a correct functional form to be in V.

Please, do not overthink this and consider post #15.
 
  • #19
Orodruin said:
So can you figure out 5 ways of assigning the independent constants such that the resulting functions are linearly independent?
Yes, but it is not something I have done before so I’m unable to kinda absorb it.

I can understand, for example, that ##x^3 + 3x^2+ 5x## and ##x^3+ x^2 +x### are independent functions.
 
  • #20
Hall said:
Yes, but it is not something I have done before so I’m unable to kinda absorb it.
Well, start by writing down one such combination.
 
  • #21
Orodruin said:
Well, start by writing down one such combination.
##f_1(x) = 5 x^2 + 5x##
##f_2(x)= x^3 + 2x^2 + 3x + 4##
##f_3(x)= x^2 + 13 x##
##f_4(x)= 2x^3 +3 x^2 +4x+ 5##
##f_5{x} = x^2##
 
  • #22
Check that ##V## is a subspace.

By continuity at ##x=1## we have
<br /> a+b = A+B+C+D.<br />
The solution space for the above is of dimension ##5##. More explicitly, put
<br /> V\to \mathbb R^5,\quad \begin{cases} ax^2+bx, &amp;x\in [0,1] \\ Ax^3+Bx^2+Cx+D, &amp;x\in [0,2] \end{cases} \mapsto (A+B+C+D-b,b,A,B,C)<br />
for example and convince yourself it is an injective linear map. Since isomorphisms map bases to bases, pick your favourite basis in ##\mathbb R^5## and map it to a basis in ##V##.
 
  • Like
Likes Delta2
  • #23
Consider <br /> \begin{split}<br /> f_1 &amp;: x \mapsto \begin{cases} x &amp; x \in [0,1] \\ 1 &amp; x \in (1,2] \end{cases} \\<br /> f_2 &amp;: x \mapsto \begin{cases} 0 &amp; x \in [0,1] \\ x - 1 &amp; x \in (1,2]. \end{cases} \end{split}<br /> Then every degree 1 polynomial in V is a linear combination of f_1 and f_2.
 
  • Informative
Likes Delta2
  • #24
Hall said:
##f_1(x) = 5 x^2 + 5x##
##f_2(x)= x^3 + 2x^2 + 3x + 4##
##f_3(x)= x^2 + 13 x##
##f_4(x)= 2x^3 +3 x^2 +4x+ 5##
##f_5{x} = x^2##
This is just guessing. ##f_2## and ##f_4## are not in V. 1,3 and 5 are linearly dependent.
 
  • #25
Orodruin said:
This is just guessing
I simply took ##A = 1, B=2, C= 3, D= 4, a= 5## for ##f_1## and ##f_2##, and ##a= 1, A=2, B=3, C=4, D=5## for ##f_3## and ##f_4##.
 
  • #26
Elements of ##V## are defined piecewise. So too should your basic elements be defined as such.
 
  • Like
Likes Delta2
  • #27
Hall said:
I simply took ##A = 1, B=2, C= 3, D= 4, a= 5## for ##f_1## and ##f_2##, and ##a= 1, A=2, B=3, C=4, D=5## for ##f_3## and ##f_4##.
Why would you put all of the constants non-zero? Your interpretation of what it means becomes lacking.

Start with this: What is the function for which ##a=A=1## and ##B=C=D=0##? (The value of ##b## should follow)
 
  • #28
pasmith said:
Consider <br /> \begin{split}<br /> f_1 &amp;: x \mapsto \begin{cases} x &amp; x \in [0,1] \\ 1 &amp; x \in (1,2] \end{cases} \\<br /> f_2 &amp;: x \mapsto \begin{cases} 0 &amp; x \in [0,1] \\ x - 1 &amp; x \in (1,2]. \end{cases} \end{split}<br /> Then every degree 1 polynomial in V is a linear combination of f_1 and f_2.
$$
f_3(x)=
\begin{cases}
x^2 & x \in [0,1]\\
1 & x \in(1,2] \\
\end{cases}$$
$$
f_4(x) =
\begin{cases}
0 & x \in[0,1] \\
x^2 -1 & \in (1,2]\\
\end{cases}$$
All the second order polynomials in V are linear combinations of ##f_1, f_2, f_3## and ##f_4##?
 
  • #29
Orodruin said:
Start with this: What is the function for which a=A=1 and B=C=D=0? (The value of b should follow)
$$
f_1 =
\begin{cases}
x^2 & x \in[0,1]\\
x^3 & x \in[1,2]\\
\end{cases}$$
 
  • #30
Hall said:
$$
f_1 =
\begin{cases}
x^2 & x \in[0,1]\\
x^3 & x \in[1,2]\\
\end{cases}$$
Ok, so now, what if you pick ##A=1## and ##B=C=D=a=0##?
 
  • #31
Orodruin said:
Ok, so now, what if you pick ##A=1## and ##B=C=D=a=0##?
$$
f_2 =
\begin{cases}
x & x \in [0,1]\\
x^3 & x \in [1,2]\\
\end{cases}$$
 
  • #32
Hall said:
$$
f_2 =
\begin{cases}
x & x \in [0,1]\\
x^3 & x \in [1,2]\\
\end{cases}$$
So based on those examples, can you pick 5 independent assignments of ##a##, ##A##, ##B##, ##C## and ##D## and quote the corresponding functions?
 
  • #33
Orodruin said:
So based on those examples, can you pick 5 independent assignments of ##a##, ##A##, ##B##, ##C## and ##D## and quote the corresponding functions?
Consider, 5-tuple vector ##(A, B, C, D, a)##, its basis elements are
##(1,0,0,0,0)##
##(0,1,0,0,0)##
##(0,0,1,0,0)##
##(0,0,0,1,0)##
##(0,0,0,0,1)##
$$
f_1 =
\begin{cases}
x & x \in [0,1]\\
x^3 & x \in [1,2]\\
\end{cases}
$$

$$
f_2 =
\begin{cases}
x & x \in[0,1] \\
x^2 & x \in[1,2]\\
\end{cases}

$$
f_3 =
\begin{cases}
x & x\in [0,1]\\
x & x \in [1,2]\\
\end{cases}
$$

$$
f_4 =
\begin{cases}
x & x \in [0,1]\\
1& x \in [1,2] \\
\end{cases}
$$

$$
f_5 =
\begin{cases}
x^2 + x& x \in[0,1] \\
0& x \in [1,2] \\
\end{cases}
$$
 
  • Sad
Likes nuuskur
  • #34
Is ##f_5## continuous at x=1?
 
  • Like
Likes SammyS
  • #35
Orodruin said:
Is ##f_5## continuous at x=1?
I can fix it by changing ##(0,0,0,0,1)## to ##(1,0,0,0,1)## thus converting ##f_5## to
$$
f_5 =
\begin{cases}
x^2 & x \in [0,1]\\
x^3 & x \in [1,2]\\
\end{cases}$$
 
  • #36
Hall said:
I can fix it by changing ##(0,0,0,0,1)## to ##(1,0,0,0,1)## thus converting ##f_5## to
$$
f_5 =
\begin{cases}
x^2 & x \in [0,1]\\
x^3 & x \in [1,2]\\
\end{cases}$$
Let's see now. That gives you: ##\displaystyle f_5=\begin{cases} x^2 & x \in [0,1]\\ x^3 & x \in [1,2 ]\\ \end{cases} \ ## and ##\displaystyle \ f_1=\begin{cases} x & x \in [0,1]\\x^3 & x \in [1,2]\\\end{cases}
##So that ##\displaystyle f_5-f_1=\begin{cases} x^2-x & x \in [0,1]\\0 & x \in [1,2]\\\end{cases} ##
 
  • #37
SammyS said:
Let's see now. That gives you: ##\displaystyle f_5=\begin{cases} x^2 & x \in [0,1]\\ x^3 & x \in [1,2 ]\\ \end{cases} \ ## and ##\displaystyle \ f_1=\begin{cases} x & x \in [0,1]\\x^3 & x \in [1,2]\\\end{cases}
##So that ##\displaystyle f_5-f_1=\begin{cases} x^2-x & x \in [0,1]\\0 & x \in [1,2]\\\end{cases} ##
##f_5 - f_1## is continuous at 1, and is really the case of
$$
f(x) =
\begin{cases}
ax^2 +bx & x \in [0,1]\\
Ax^3 + Bx^2 +Cx + D & x \in [1,2]\\
\end{cases}$$
when ##a=1, b= -1, A=B=C=D=0##.
 
  • #38
Hall said:
##f_5 - f_1## is continuous at 1, and is really the case of
$$
f(x) =
\begin{cases}
ax^2 +bx & x \in [0,1]\\
Ax^3 + Bx^2 +Cx + D & x \in [1,2]\\
\end{cases}$$
when ##a=1, b= -1, A=B=C=D=0##.
Yes, it is the correct version of what you tried at first when you wanted to write (0,0,0,0,1).
 
  • #39
@Hall
What you do is propose some solutions seemingly at random. You know you are looking for a basis in a five dimensional space. When you have your five candidates in ##V## check that they are linearly independent. This is sufficient to solve the problem.
 
  • Like
Likes PeroK
  • #40
nuuskur said:
You know you are looking for a basis in a five dimensional space.
That is the issue here. I really don't know how V is five dimensional.

For upto now in my self-studies, I have determined the dimension of a vector space only by first constructing its basis and then counting the number of elements of it. But in this case the construction of basis seems tougher than determining the dimension; and that is the reason why everyone is seeming too obtuse to me.
 
  • Like
Likes Delta2
  • #41
Hall said:
That is the issue here. I really don't know how V is five dimensional.

For upto now in my self-studies, I have determined the dimension of a vector space only by first constructing its basis and then counting the number of elements of it. But in this case the construction of basis seems tougher than determining the dimension; and that is the reason why everyone is seeming too obtuse to me.
If you remove the condition of continuity, then the space is clearly six-dimensional (you pick values for 6 independent constants). Introducing the continuity condition is introducing one linear constraint, removing one from the dimensionality. Hence, five dimensions.
 
Last edited:
  • Informative
  • Like
Likes PeroK and Delta2
  • #42
Hall said:
I have determined the dimension of a vector space only by first constructing its basis and then counting the number of elements of it.
That works. You show that the subset is spanning and linearly independent. It can be quite tedious.
Hall said:
But in this case the construction of basis seems tougher than determining the dimension; and that is the reason why everyone is seeming too obtuse to me.
Indeed, which is why I proposed a much faster solution in my first post. Finite dimensional vector spaces are determined uniquely by their underlying field. So, to understand any ##n## dimensional space over ##\mathbb R##, it suffices to understand ##\mathbb R^n##.

On the topic of selfstudy I recommend G. Strang's course , complete with video lectures and problem sets & solutions. Happy hunting.
 
Last edited:
  • #43
Hall said:
That is the issue here. I really don't know how V is five dimensional
I thought at first it was 7-dimensional. I thought, 2 dimensions in [0,1] times 4 dimensions in [1,2] minus 1 for continuity. I had probably mistaken the space composition as a tensor product. It's not that strange to understand this less quickly.

It's a cartesian product of functions on [0,1] and functions on [1,2], and for cartesian products dimensions add up. Next: Every linearly independent set of n requirements removes n dimensions. We have 1 requirement, so subtract 1.
 
  • Like
Likes Delta2 and Hall
  • #44
@Hall

An important step is to verify that ##V## is a vector space. It's obvious, but you should still make it explicit. You can do that by checking all the axioms of vector spaces (tedious). Alternatively, can you name a vector space that contains ##V## as a subset?
 
  • Like
Likes WWGD and PeroK
  • #45
nuuskur said:
Alternatively, can you name a vector space that contains V as a subset?
Space of all continuous functions on interval ##[0,2]##.
Space of all continuous functions.
Space of all polynomial functions.
 
  • #46
Hall said:
Space of all continuous functions on interval ##[0,2]##.
Space of all continuous functions.
Yes. Also space of all bounded functions on ##[0,2]## is sufficient.
Hall said:
Space of all polynomial functions.
Piecewise polynomials.
 
  • Like
Likes Delta2 and Hall
  • #47
nuuskur said:
Alternatively, can you name a vector space that contains V as a subset?
Being a subset of a vector space is not sufficient. You need to confirm that it is a subspace.
 
  • Love
Likes Delta2
  • #48
Orodruin said:
Being a subset of a vector space is not sufficient. You need to confirm that it is a subspace.
I'm aware of that. I didn't claim it was sufficient, either.
 
  • Like
Likes Delta2
  • #49
nuuskur said:
I'm aware of that. I didn't claim it was sufficient, either.
Not explicitly, but reading your post it appears as an alternative to checking the vector space axioms.
 
  • Like
Likes Delta2
  • #50
@Orodruin
Students have usually no trouble verifying closure with respect to zero vector, addition and multiplication with scalar and to then declare that it's a vector space. It gets dicey when I say "you have checked it's a subspace, but in which vector space is it a subspace?"

Orodruin said:
Not explicitly, but reading your post it appears as an alternative to checking the vector space axioms.
That's exactly the point. Part of my teaching is philosophy is to Not give all the details. Consequently the student also learns to Not assume what I have Not stated.
 
  • Like
Likes Delta2
Back
Top