Rescaling Data Set: Solve Math Question for Physics Lab

  • Thread starter Thread starter fishingspree2
  • Start date Start date
  • Tags Tags
    Data Set
AI Thread Summary
The discussion revolves around scaling the difference between two non-negative numbers A and B into a specified range of [-100, 100]. The user attempts to create a linear equation to achieve this scaling but finds that it does not work as intended. Key points include the need for a proper mapping of the differences, particularly ensuring that when A = 0, S equals 100, and when B = 0, S equals -100. A suggestion is made to use a nonlinear approach involving the arctangent function to effectively map the differences to the desired range. The conversation emphasizes the importance of correctly defining the relationship between A, B, and the resulting scaled value S.
fishingspree2
Messages
138
Reaction score
0
Hello, this is not really a math homework but I have a math question for a physics lab.

Let's say I have two numbers A and B which are both more or equal to 0.

Then, A-B is always in the interval [-B,A].
I want to assign the difference A-B to number S in an interval [-100,100], in such a way that if A = 0, A-B = -B and the scaled value S is 100, and if B=0, A-B=A and the scaled value is S = -100. Finally, if A-B = 0 then S = 0. Any other difference is scaled on the interval [-100 , 100].

First, I tried this: for difference = -B, then S=100
for difference = A, S=-100
for difference = 0, S=0
I have set up a linear equation using slope 100+100/-B-A = -200/(A+B).
Therefore, S = [-200/(A+B)]*difference = [-200/(A+B)]*(A-B)

Then, for any value A and B > 0, it should give me an S between [-100,100], but this does not work. I have no idea why.

Can anyone please point me towards the right direction?
 
Physics news on Phys.org
The relation you mention is not a linear one.

Moreover, you have not limited the values for A and B.
This means that an A-B of minus infinity must be mapped to S = +100,
that an A-B of plus infinity must be mapped to S = -100,
and that an A-B of zero must be mapped to S = 0.

You could do this for instance with:

S = -100 \frac {2} {\pi} \arctan(A-B)
 
I picked up this problem from the Schaum's series book titled "College Mathematics" by Ayres/Schmidt. It is a solved problem in the book. But what surprised me was that the solution to this problem was given in one line without any explanation. I could, therefore, not understand how the given one-line solution was reached. The one-line solution in the book says: The equation is ##x \cos{\omega} +y \sin{\omega} - 5 = 0##, ##\omega## being the parameter. From my side, the only thing I could...
Essentially I just have this problem that I'm stuck on, on a sheet about complex numbers: Show that, for ##|r|<1,## $$1+r\cos(x)+r^2\cos(2x)+r^3\cos(3x)...=\frac{1-r\cos(x)}{1-2r\cos(x)+r^2}$$ My first thought was to express it as a geometric series, where the real part of the sum of the series would be the series you see above: $$1+re^{ix}+r^2e^{2ix}+r^3e^{3ix}...$$ The sum of this series is just: $$\frac{(re^{ix})^n-1}{re^{ix} - 1}$$ I'm having some trouble trying to figure out what to...
Back
Top