0

I have equation with default $4$ terms but number of terms are related to input

for example :

Say the equation is $X - x^2 + x^3 - x^4$

If my input was $1$ then the equation equals $X$

If it was $2$ equation equals $X - x^2$ .

If it was $3$ then equation will equal $X- x^2 +x^3$ and so on.

I thought of making equations that have same result (say $1$) for specific numbers like (say $3$, $4$) and results zero for $2$ so I can put this equation on the second term and so on with other terms but how to make such an equation?

Is there a mathematical way to do that

Thanks in advance

  • "If my input was 1.." etc: When $x=1$ it is $X-1^2+1^3-1^4=X-1$ rather than your claimed $X.$ What do you mean by "the input"? That cannot be the number of terms, for then with 2 terms it would be $X-x^2$ not $X+x^2.$ – coffeemath Mar 13 '17 at 14:46
  • I don't mean substituting X with 1 . Like 2z = x-x^2. 3z= x-x^2+x^3 . I want to find the relation between the coefficient of z and number of terms . I'm just giving the example. I can't explain exactly . What's meaning . I'm doing my best . Oh and sorry for X+x^2 . Typing error . Thanks – user3767289 Mar 13 '17 at 15:03

1 Answers1

1

You can define $f(n)=X-\sum_{i=2}^n (-1)^{i-1}x^i$ Having the upper limit of the sum depend on $n$ can make the number of terms depend on $n$.

Ross Millikan
  • 374,822