Exponential Equation Help

I’m trying to make an exponential equation for my game, and I got this, but I can’t figure out how to make it less steep so it follows the green line more. Any help would be appreciated :smile:

1 Like

Raise x to a power between 0 and 1. When the power is 0 it will be a horizontal line and when it is 1 it will be the regular 1/x function.

4 Likes

That works, but it also raises the graph very high. Is it possible to make it so when x is 1, y is 1 and as x gets bigger y gets smaller so when x is like 200 y is 0.2?

Raising an x value of 1 to any power will always = 1, meaning that the function evaluates to 1/1 and the y value will always be 1. Maybe could you post a screen shot of what Desmos is showing you? I was thinking of an exponential of the form f(x) = x^p where p >= -1 and p <= 0.

1 Like

Whoops, nevermind I completely misinterpreted what you said. It works fine, thanks :sweat_smile:

1 Like

exponential
a here does not have to be limited to 0-1, it can be arbitrarily large if you want to really decay quickly.

Also worth noting, this is not what people normally mean by “exponential decay”, as this is a hyperbola.

Exponential decay would be this:
exponential2

3 Likes

Based on what you drew, it looks like a linear function could do.

y = 4 + x * -.03

or

f(x) = offset + x * scale

you can also change the 1/x into .5/x or .1/x and so on