Linear Algebra - Finding coordinates of a set

cscott0001
Messages
6
Reaction score
1

Homework Statement



Find the coordinates of each member of set S relative to B.
B = {1, cos(x), cos2(x), cos3(x), cos4(x), cos5(x)}
S = {1, cos(x), cos(2x), cos(3x), cos(4x), cos(5x)}

I am to do this using Mathematica software. Each spanning equation will need to be sampled at six separate points to create a 6x6 system that solves for the coordinates of each element of S.

Homework Equations



Ax = b
If I was given a simpler problem, such as "Find the coordinate vector of w = (1, 0) relative to the basis S = {u, v}, u = (2, 2) and v = (1, 1)" my equation would start:

(1, 0) = k1(2, 2) + k2(1, 1)

and I'd solve for k1 and k2

The Attempt at a Solution



I started with the equation S = kB, where k is a constant, but I was told to build a 6x6 matrix by sampling each member of B at six points, so I knew that's wasn't right. I built a 6x6 matrix from B with columns 1-6 filled with evaluations of B with x = {0, pi/6, pi/4, pi/3, pi/2, pi}, but I don't think that's right either, because I didn't create any spanning equations. I tried using a matrix {{1,0,0,0,,00},{0,cos(x),0,0,0,0}...{0,0,0,0,0,cos5(x)}}, to test for span, but that didn't feel right either. How do I create spanning equations to sample to build the matrix?
 
Physics news on Phys.org
Given that <br /> \cos (n \pm 1)x = \cos nx \cos x \mp \sin nx \sin x we obtain <br /> \cos (n+1)x = 2\cos x \cos nx - \cos(n-1)x. From this recurrence relation you can express \cos nx as a polynomial in \cos x, which gives you a matrix equation <br /> (1, \cos x, \dots, \cos 5x)^{T} = A (1, \cos x, \dots, \cos^5 x) and your problem is to invert A.
 
cscott0001 said:

Homework Statement



Find the coordinates of each member of set S relative to B.
B = {1, cos(x), cos2(x), cos3(x), cos4(x), cos5(x)}
S = {1, cos(x), cos(2x), cos(3x), cos(4x), cos(5x)}

I am to do this using Mathematica software. Each spanning equation will need to be sampled at six separate points to create a 6x6 system that solves for the coordinates of each element of S.

Homework Equations



Ax = b
If I was given a simpler problem, such as "Find the coordinate vector of w = (1, 0) relative to the basis S = {u, v}, u = (2, 2) and v = (1, 1)" my equation would start:

(1, 0) = k1(2, 2) + k2(1, 1)

and I'd solve for k1 and k2

The Attempt at a Solution



I started with the equation S = kB, where k is a constant, but I was told to build a 6x6 matrix by sampling each member of B at six points, so I knew that's wasn't right. I built a 6x6 matrix from B with columns 1-6 filled with evaluations of B with x = {0, pi/6, pi/4, pi/3, pi/2, pi}, but I don't think that's right either, because I didn't create any spanning equations. I tried using a matrix {{1,0,0,0,,00},{0,cos(x),0,0,0,0}...{0,0,0,0,0,cos5(x)}}, to test for span, but that didn't feel right either. How do I create spanning equations to sample to build the matrix?

So, what you actually need to do is write all the elements of S as linear combinations of elements of B. For example:

##1 = 1*1 + 0*cos(x) + 0*cos^2(x) + 0*cos^3(x) + 0*cos^4(x) + 0*cos^5(x)##

Thus, the coordinates of ##1## relative to ##B## is ##(1,0,0,0,0,0)##.

Another example:

##cos(2x) = cos^2(x) - sin^2(x) = cos^2(x) - (1 - cos^2(x)) = -1 + 2cos^2(x)##

Thus, the coordinates of ##cos(2x)## relative to ##B## is ##(-1,0,2,0,0,0)##

Now, try the rest of the exercise.

EDIT: I didn't read carefully about the mathematica part. You can ignore this post.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top