What formula had to be used to get X from the given graph?

Recently, I was writing code when I started thinking about how to define X from this graph.
I tried using proportions, but it’s not the same because in this case the “first number” decreases, not increases.

Here is the second chart where I marked the X:

What formula had to be used to substitute any number for the second variable and I would get X?
I have tried all the formulas known to me so far, but my mathematical knowledge is not that big.
I also looked for information on Roblox Creator Documentary, but found nothing there either.
Any ideas?

Well, how is the graph defined? Do you have a function describing the line?

This is middle school stuff, are you sure you don’t know? A linear equation?

--if
y = mx + b
--then
x = (y - b)/m

It’s not linear, look at the Y scale. It’s just being tricky.

then i guess use newton iteration to solve equations if you don’t know what type they are

This module has an algorithm that does just that

1 Like

So I came up with a super stupid idea that works.
I simply subtracted X from 100 and then by proportion counted the number
.
.
.
However, thanks for the help of users @JarodOfOrbiter , @Prototrode and @nicemike40

Can’t you just do 1 / (Second Number) to get X (“First Number”)?

Also just for future reference, usually “x” refers to the horizontal axis, not the vertical axis.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.