What formula can transform the table on the left to the table on the right?

43 Views Asked by At

I have Table A, which I have to transform into Table B:

Table A Table B Difference
-8.00 0.00 (+8)
-7.00 1.00 (+8)
-6.00 2.00 (+8)
-5.00 3.00 (+8)
-4.00 4.00 (+8)
-3.00 3.00 (+6)
-2.00 2.00 (+4)
-1.00 1.00 (+2)
0.00 0.00 (0)
1.00 -1.00 (-2)
2.00 -2.00 (-4)
3.00 -3.00 (-6)
4.00 -4.00 (-8)
5.00 -3.00 (-8)
6.00 -2.00 (-8)
7.00 -1.00 (-8)
8.00 0.00 (-8)

Table A is a round robin between -8 and 8, with a step of 0.01 or smaller (same for Table B).
Table B is a round robin between -4 and 4, starting from 0.

The cycles look similar to the following animation (the minor cycle runs twice during one run of the major cycle): https://www.purdue.edu/freeform/me274/wp-content/uploads/sites/15/2021/11/H4A_16.gif

What formula can I use to make that transformation?

2

There are 2 best solutions below

0
On BEST ANSWER

The function is $$x + |x - 4| - |x + 4|$$

0
On

Try $\frac{\left|x^{2}-4\left|x\right|\right|}{x}-\frac{\left|4x\right|}{x}$.