Is there any sum of a function equal to the absolute value of a sum of the functions parameters?

47 Views Asked by At

I am looking for a function $b(a)$, which fullfills the following statement:

$|\Sigma(a_i)|=\Sigma(b(a_i)), i \in [1..n]$

So basically I want to pull the sum out of the absolute function.

2

There are 2 best solutions below

1
On BEST ANSWER

No, this can't be done.

Consider a particular $a_n$.

If the sum of the terms up to $a_{n-1}$ is equal to $S$, and the sum of the right-hand side for the first $(n-1)$ terms is equal to $B$,we want:

$$|S + a_n| = B + b(a_n), \forall S, B, a_n$$

As an example, let $S = 10, B = 10, a_n = 2$. Easy: $b(2) = 2$. Now consider $S = -10, B = 10, a_n = 2$. Now we get: $b(2) = -2$. Depending on the other values $a_i$, we need to change the sign of $b(a_n)$.

0
On

Such a function does not exist. $n = 1$ implies that $b(a) = |a|$, i.e. $b$ must be the absolute value. But this clearly does not work for $n \geq 2$.