Coefficient in the y-value of a function

Fredrik

New member
Joined
Dec 1, 2020
Messages
9
Hello!
I have a couple of functions of my own design that I need to transform somehow. The functions are [MATH]y=(cot(pi/x))^2[/MATH] and [MATH]y=x^2[/MATH]I will be using large x-values, somewhere between [MATH]10^2[/MATH] possibly all the way up to around [MATH]10^9[/MATH] or so. These numbers , say we have 987 654 321, can be written as [MATH]9,87654321*10^9[/MATH]. I need some way to extract this coefficient, like [MATH]9,87654321[/MATH], from the larger number as part of the function.

This is because I'm looking for the x-value for which the coefficient of y in the cotangent funciton is equal to the coefficient of the x-value squared. And because [MATH](n*10^b)^2=n^2*10^{2b}[/MATH], the coefficient of the y-value of [MATH]x^2[/MATH] is equal to the coefficient of x squared.
Thank you in advance for any help!
 
I have a couple of functions of my own design that I need to transform somehow. The functions are [MATH]y=(cot(pi/x))^2[/MATH] and [MATH]y=x^2[/MATH]I will be using large x-values, somewhere between [MATH]10^2[/MATH] possibly all the way up to around [MATH]10^9[/MATH] or so. These numbers , say we have 987 654 321, can be written as [MATH]9,87654321*10^9[/MATH]. I need some way to extract this coefficient, like [MATH]9,87654321[/MATH], from the larger number as part of the function.

This is because I'm looking for the x-value for which the coefficient of y in the cotangent funciton is equal to the coefficient of the x-value squared. And because [MATH](n*10^b)^2=n^2*10^{2b}[/MATH], the coefficient of the y-value of [MATH]x^2[/MATH] is equal to the coefficient of x squared.
It appears that you are using the word "coefficient" as one of the synonyms of significand. I wasn't familiar with that usage. I also see that there are several variants, but you've shown enough to clarify which one you mean. (But didn't you use the wrong exponent in [MATH]9,87654321*10^9[/MATH]?)

What you need, I think, is to determine the exponent, which you can do by taking the base-ten logarithm and rounding down. Then you can use that to find the coefficient.
 
This is still a bit vague to me. Are these numbers integers?
Yes. The x-input will always be integers. As Dr. Peterson pointed out below, what I mean is known officially as a significand of the normalized form. So I need fractional coefficient, as the wikipedia article calls it, of the y-values
 
It appears that you are using the word "coefficient" as one of the synonyms of significand. I wasn't familiar with that usage. I also see that there are several variants, but you've shown enough to clarify which one you mean. (But didn't you use the wrong exponent in [MATH]9,87654321*10^9[/MATH]?)

What you need, I think, is to determine the exponent, which you can do by taking the base-ten logarithm and rounding down. Then you can use that to find the coefficient.
That sounds like a great idea. I know of a function which rounds down, as well. I'm not so sure I can input it into my software, but I will try to. Thank you for your help.
 
That sounds like a great idea. I know of a function which rounds down, as well. I'm not so sure I can input it into my software, but I will try to. Thank you for your help.
In FORTRAN language there was a function called INTEGER (basically floor function) that dropped all the numbers after decimal point and returned an integer.
 
That sounds like a great idea. I know of a function which rounds down, as well. I'm not so sure I can input it into my software, but I will try to. Thank you for your help.
Many languages have some sort of round or floor function; if you tell us your language or environment, we may have more to say.
 
Many languages have some sort of round or floor function; if you tell us your language or environment, we may have more to say.
I'm using Geogebra classic to graph these functions. I could probably use WolframAlpha as well, I'm familiar enough with that too.
 
Well isn't that great. Can it round to powers of ten only though? If not, I can't think of a way to use it.
What I would do is take the cotanget function and divide by the floor of the cotangent function. If I get integers other than a power of ten, though, I obviously lose the significand.
Unless there is some way to get around that or if I can round to tens only, it won't be of any use to me
 
My suggestion was not to round the actual value, but the exponent.

Taking your number 987 654 321 as an example, its log is 8.9946, which we round down to 8; then we divide by 10^8 to get the significand, 9.87654321.

I'm not clear on the details of what you want to do with this, but I think this is the part you were asking about.
 
My suggestion was not to round the actual value, but the exponent.

Taking your number 987 654 321 as an example, its log is 8.9946, which we round down to 8; then we divide by 10^8 to get the significand, 9.87654321.

I'm not clear on the details of what you want to do with this, but I think this is the part you were asking about.
Clever, that would be the final solution then. Thank you very much for your help Dr. Peterson!
 
Top