Answer: Verify f(x(n)) for n = -5 to 5

  • Context: High School 
  • Thread starter Thread starter RaduAndrei
  • Start date Start date
  • Tags Tags
    Function
Click For Summary

Discussion Overview

The discussion revolves around the function f(x(n)) defined as n*x(n), where x(n) is a piecewise function that takes the value 1 for n = 0, 1, 2, 3 and 0 elsewhere. Participants explore the implications of this definition, including potential contradictions and the interpretation of the function as a discrete-time system.

Discussion Character

  • Debate/contested
  • Technical explanation
  • Conceptual clarification
  • Mathematical reasoning

Main Points Raised

  • Some participants assert that f(x(n)) = n*x(n) leads to a specific output for n from -5 to 5, producing a sequence of values.
  • Others propose that the notation f(x(n)) is improper and suggest alternative formulations to clarify the function's definition.
  • A participant questions the validity of applying the function to shifted inputs, such as f(x(n-m)), and whether it maintains the same form.
  • Some express confusion regarding the linearity of the function and the application of the superposition principle, particularly in relation to the unit step function.
  • Multiple participants identify contradictions arising from evaluating f(x(n)) at specific points, leading to different results based on the input value of n.
  • There is a discussion on the interpretation of f as a function that transforms other functions, with some arguing that this perspective resolves certain contradictions.
  • One participant attempts to clarify the evaluation of f(u(n-4)) and its implications for the output of the system.

Areas of Agreement / Disagreement

Participants express disagreement on the proper notation and interpretation of the function f(x(n)). While some agree on the output for specific inputs, others challenge the assumptions leading to contradictions, indicating that the discussion remains unresolved.

Contextual Notes

Participants note limitations in the notation and assumptions made about the function's behavior, particularly regarding linearity and the treatment of inputs as functions rather than scalar values.

RaduAndrei
Messages
114
Reaction score
1
Consider that:

f(x(n)) = n*x(n)

and that x(n) is 1 for n = 0,1,2,3 and 0 everywhere else.

Thus, f(x(n)) will be for n = -5 to 5 like this:

0 0 0 0 0 0 1 2 3 0 0

Am I right?
 
Mathematics news on Phys.org
RaduAndrei said:
Consider that:

f(x(n)) = n*x(n)

and that x(n) is 1 for n = 0,1,2,3 and 0 everywhere else.

Thus, f(x(n)) will be for n = -5 to 5 like this:

0 0 0 0 0 0 1 2 3 0 0

Am I right?
Looks fine to me. It might be simpler to write this:
f(0) = 0
f(1) = 1
f(2) = 2
f(3) = 3
f(n) = 0 elsewhere
 
Thanks for the answer. So, ok.

Now, can I write that:

f(x(n-m)) = (n-m)x(n-m) ?

For example,

f(x(n-15)) = (n-15)x(n-15)
 
RaduAndrei said:
f(x(n)) = n*x(n)
That is improper notation.

Probably what you have in mind is:

Let x(n) = 1 for x in {0, 1, 2, 3} and 0 otherwise.
Let f(n) = n*x(n).
 
But I want to view this function as something that takes as input a function and returns another function.
So, is like a discrete-time system. You apply a discrete-time waveform at its input and at its output you see another discrete-time waveform which is the result of the system acting on the input.

Can't I do this?
 
RaduAndrei said:
But I want to view this function as something that takes as input a function and returns another function.
So, is like a discrete-time system. You apply a discrete-time waveform at its input and at its output you see another discrete-time waveform which is the result of the system acting on the input.
Ahh, that makes more sense then. I do not want to weigh in on the proper notation for defining functions whose domain and co-domain are both sets of functions.
 
So, the real reason why I made this post and my confusion.

I can write x(n) = u(n) - u(n-4), where u(n) is the unit step function.
Thus:

f(x(n)) = f(u(n)-u(n-4)) = f(u(n)) - f(u(n-4)) = nu(n) - (n-4)u(n-4).

And this function, plotted with wolfram alpha (x*unitstep(x)-(x-4)*unitstep(x-4)) gives the following result:

0 0 0 0 0 0 1 2 3 4 4 4 4 ...

So, this is my confusion. What am I doing wrong? That is a linear function and superposition principle applies.

If, on the other hand, I am writing:

f(x(n)) = n*x(n) = n*(u(n)-u(n-4))

it gives the same result as in the first post.
 
The problem contradicts itself, as follows:

We have f(x(n))=n x(n) and x(n)=1 for n=0,1,2,3 and zero otherwise.

Plugging in n=0, we have f(x(0))=0, so f(1)=0
Plugging in n=1, we have f(x(1))=1.x(1), so f(1)=1

Contradiction.
 
Ok, I see the contradiction.

So, I cannot write f(x(n)) = n*x(n).

But I can write y(n) = n*x(n). So, the system takes as input some discrete-time waveform x(n) and produces another discrete-time waveform y(n).

But, can you explain to me why I cannot write f(x(n)) = y(n) = n*x(n) ?

If someone could shed light on this, I would be very happy. I'm thinking about this for days now.
 
  • #10
davidmoore63@y said:
The problem contradicts itself, as follows:

We have f(x(n))=n x(n) and x(n)=1 for n=0,1,2,3 and zero otherwise.

Plugging in n=0, we have f(x(0))=0, so f(1)=0
Plugging in n=1, we have f(x(1))=1.x(1), so f(1)=1

Contradiction.
That was where I was coming from in post #4. However, since the formal parameter "x(n)" on the left hand side is being treated as a function and since the formula on the right hand side is being treated as a function definition for the resulting function, the notation is not unreasonable and not contradictory.

The intent is that it be read as:

[ Let f be a function from the set of one-parameter functions to the set of one-parameter functions such that ] f(x(n)) = [the function y defined by y(n) =] n * x(n)

We could then meaningfully ask about f(x)(n): the function y obtained by applying f to x, applied to argument n. This would produce an integer. e.g. f(x)(3) = 3.
Or we could ask about f(x(n)), treating n as a dummy variable. This result would be a function and could be presented as a list of values as was done in the original post.
 
  • #11
What about my confusion on post #7?
 
  • #12
RaduAndrei said:
What about my confusion on post #7?
The relevant definition being...
f(x(n)) = f(u(n)-u(n-4)) = f(u(n)) - f(u(n-4)) = nu(n) - (n-4)u(n-4)
I am in deep water here. Fighting to interpret the notation and understand your difficulty both. So bear with me while I try to parse this thing out.

f(x(n)) = f( u(n) - u(n-4) )​

So we have this operator f. It takes in a function x and spits out a function y. This first part of your assertion looks solid. It is mere definition.

f( u(n) - u(n-4) ) = f(u(n)) - f(u(n-4))​

This part looks dodgy. It seems to assume that f is linear. But let's skip past that.

f(u(n)) - f(u(n-4)) = nu(n) - (n-4)u(n-4)​

This part looks wrong. Try evaluating f(u(n-4)). You should not get (n-4)u(n-4)
 
  • #13
Here 's another illustration of the fact that you can't use the notation f(x(n)) = n x(n) to map the function x(n) to y(n):

Evaluate f(1). The problem is that you can't tell whether n is 0,1,2 or 3. Each of these gives a different result.
 
  • #14
davidmoore63@y said:
Here 's another illustration of the fact that you can't use the notation f(x(n)) = n x(n) to map the function x(n) to y(n):

Evaluate f(1). The problem is that you can't tell whether n is 0,1,2 or 3. Each of these gives a different result.
If we interpret "1" as the constant function which takes all inputs to 1 and take f() as defined in the original post then f(1) is function g(x) = x * 1(x) = x. That is f(1) is the identity mapping.

f(1)(1) = 1. f(1)(2) = 2, f(1)(n) = n
 
  • #15
jbriggs444 said:
f(u(n)) - f(u(n-4)) = nu(n) - (n-4)u(n-4)​

This part looks wrong. Try evaluating f(u(n-4)). You should not get (n-4)u(n-4)

But surely:
if y(n) = n*x(n) then y(n-4) = (n-4)*x(n-4)

I mean, view the function as a black box. If I input x(n), then I will get n*x(n). If I input instead at a later time, so I input x(n-4), then I should get (n-4)x(n-4).
So, the moment of time where I input the function should not matter.

You can view the waveforms on wolfram alpha.
If you write unitstep(x) then you will see a unit step function. And to this it corrresponds x*unitstep(x).
If I write unitstep(x-4), then this function starts at x=4. but is the same as unitstep(x). And to this it corresponds (x-4)*unitstep(x-4) which has the same form as x*unitstep(x), only delayed in time.

But x*unitstep(x-4) has a very different form.
 
  • #16
jbriggs444 said:
f(u(n)) - f(u(n-4)) = nu(n) - (n-4)u(n-4)
This part looks wrong. Try evaluating f(u(n-4)). You should not get (n-4)u(n-4)
RaduAndrei said:
But surely:
if y(n) = n*x(n) then y(n-4) = (n-4)*x(n-4)
f, as you have claimed to define it is a function that transforms one function into a different function.
y as you have defined it above is a function that transforms values into different values.

Let's evaluate f(u(n-4)).

u() is the unit step function. u(x) = 1 for x >= 0 and u(x) = 0 for x < 0.
u(n-4) is the unit step function shifted right by 4. so u(n-4)(x) = 1 for x >= 4 and u(n-4)(x) = 1 for x < 4.

Note that because f is a function that takes functions as input we must interpret its argument as a function and not as an integer value. That is why I have chosen to use the above notation -- to stress that "u(n-4)" is a function.

f(u(n-4)) transforms this right-shifted step function by multiplying each of its computed results by n.

f(u(n-4))(1) = 1*u(n-4)(1) = 1*u(1-4) = 0
f(u(n-4))(2) = 2*u(n-4)(2) = 2*u(2-4) = 0
f(u(n-4))(3) = 3*u(n-4)(3) = 3*u(3-4) = 0
f(u(n-4))(4) = 4*u(n-4)(4) = 4*u(4-4) = 4
f(u(n-4))(n) = n*u(n-4)(n) = n*u(n-4) = [n for n >= 4 and 0 for n < 4]
 
  • #17
jbriggs444 said:
f(u(n-4))(1) = 1*u(n-4)(1) = 1*u(1-4) = 0
f(u(n-4))(2) = 2*u(n-4)(2) = 2*u(2-4) = 0
f(u(n-4))(3) = 3*u(n-4)(3) = 3*u(3-4) = 0
f(u(n-4))(4) = 4*u(n-4)(4) = 4*u(4-4) = 4
f(u(n-4))(n) = n*u(n-4)(n) = n*u(n-4) = [n for n >= 4 and 0 for n < 4]

Ok, I agree. I asked other people and they all say is n*u(n-4).

Now, let's take it a step further and talk about linear, time-invariant systems.

Consider that the response of the system to u(n) is s(n) = (1-a^(n+1))*u(n).

Basically, is the same as n*u(n). I just replaced n with the exponential (1-a^(n+1)), where a is given.

So to u(n) it corresponds s(n).

Now if I want to find the response to x(n) = u(n) - u(n-4), I apply the superposition principle and do the following thing:

- I calculate the output of the system separately: so to u(n) it corresponds s(n), and to u(n-4) it corresponds s(n-4)
- I add the outputs to obtain y(n) = s(n)-s(n-4) = (1-a^(n+1))*u(n) - (1-a^(n-4+1))*u(n-4).

So, observe that to u(n-4) it corresponds (1-a^(n-4+1))*u(n-4) and not (1-a^(n+1))*u(n-4).

This is what happens in an LTI system. I can't say that to u(n-4) it corresponds (1-a^(n+1))*u(n-4) because if I take not 4, but 100, then at n = 100, when the step down happens, the exponential would have died and I don't want this. I don't want this because when the step goes down, I want it to go down exponential and not suddenly.

So, what happens? Aren't linear, time-invariant systems described by functions but by other mathematical objects?
 
  • #18
I figured it out. y(n) = nx(n) is linear but not time-invariant. That is why it does not work what I was trying to do.

For example, the RC circuit is LTI but the relationship between the input and output is not time-invariant.

Thanks for your time.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 3 ·
Replies
3
Views
922
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 16 ·
Replies
16
Views
2K
  • · Replies 1 ·
Replies
1
Views
1K
  • · Replies 2 ·
Replies
2
Views
1K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 48 ·
2
Replies
48
Views
5K
  • · Replies 2 ·
Replies
2
Views
2K