# Thread: Trouble figuring out which formula to use

1. ## Trouble figuring out which formula to use

I've been working on a personal project, and I've come up with a problem that I'm not sure how to proceed on. Here's the issue:

I need a way to determine the value of value Y given the value X for the values X that are not provided. There are different base values for Y, and so I'm trying to develop a formula to reach points associated with X=2 and X=100, with X=60 being a value equal to 40% of the distance between values 2 and 100. I want this to be a gradual curve, with the exact values for X=2 and X=100, rather than a rough estimate such as can be found from a trendline. There were two approaches I attempted - first being Binomial, but my only method is a trendline formula from microsoft excel, and it doesn't hit the most important values exactly. Second attempt was a Power trendline, but the rough intended curve I tried to get just didn't work. I tried doing a compound interest equation next, but it made the resulting values unusable.

But all I want is just a gradual curve, hitting the exact points for values X=2 and X=100, and having X=60 being roughly 40% between the two. Again, I'm not too picky on that, but... how would I guarantee the intersections, while being able to tweak the curve itself? I still think Binomial may be the best approach, but I'm only halfway through my college algebra class and it's entirely possible that my approach to this problem is wrong.

Values less than 2 and greater than 100 don't really matter for this, and the formula I apply for set Y1 I'd want to apply to all other sets, so having this written in a way that I can specify cells in a spreadsheet for the Y coordinates would be ideal.

My apologies if this is confusing, I have difficulties when it comes to communication. If you need me to clarify something, ask and I'll do my best to answer.

Thanks for the help.

2. ## Re: Trouble figuring out which formula to use

The simplest curve that will pass through three given points is a quadratic: $\displaystyle X= at^2+ bt+ c$ where "t" is the percentage distance from the first point to the second. There are 3 coefficients to be determined, a, b, and c, and you have three conditions to be satisfies.

X(0)= 2 so that when t= 0, X= 2. Putting those into the equation above, $\displaystyle 2= a(0^2)+ b(0)+ c= c$. c= 2.

X(100)= 100 so that when t= 100, X= 100. Putting those into the equation above, $\displaystyle 100= a(100^2)+ b(100)+ c= 100$ or $\displaystyle 10000a+ 100b+ c= 100$.

X(60)= 40 so that when t= 60, X= 40. Putting those into the equation above, $\displaystyle 40= a(60^2)+ b(60)+ c$ or $\displaystyle 3600a+ 60b+ c= 40$.

Three equations to solve for a, b, and c. From the first equation, c= 2 so we can write the other two equations as
$\displaystyle 10000a+ 100b+ 2= 100$ or $\displaystyle 10000a+ 100b= 98$ and
$\displaystyle 3600a+ 60b+ 2= 40$ or $\displaystyle 3600a+ 60b= 38$.

I think I would start by dividing the first of those equations by 100 to get $\displaystyle 100a+ b= 0.98$ and the second by 60 to get $\displaystyle 60a+ b= 0.6333...$. Subtracting the second from the first, $\displaystyle 40a= -0.3466...$ and then $\displaystyle a= \frac{-0.3466...}{40}= -0.008666...$.

Put that value of a into $\displaystyle 100a+ b= 0.98$ to get a single equation to solve for b.

3. ## Re: Trouble figuring out which formula to use

Well, yes. I had figured it would be a binomial, as you provided. y =ax2 + bx + c.

In this series, the X and Y coordinates correspond to:

X = Character Level
Y = Total experience obtained

For this reason, the domain becomes {x| 2 <= x <= 100}

X1 = 2, the minimum value
Y1 = Row 2, the amount of experience necessary to reach level 2

X2 = 100, the maximum value
Y2 = Row 3, the amount of experience necessary to reach level 100

X3 = 60, where I currently want the 45 degree tangent of the curve to be
Y3 = the value I estimate I'll be using at the 45 degree turning point, currently set to 40%

It's entirely possible that my result is undesirable. I'm not trying to graph a line, but generate values from X = 2 through X = 100 in a table using X1, Y1, X2, Y2, and the percentage between the two to determine what value on the curve it is, as well as a good enough understanding on how to manipulate that curve in case it turns out to be too impractical. For example, if the increase in value in the early X values is too sharp, it's not a useful curve, so I may need to adjust where the 45 degree tangent is on the curve, perhaps making it shallower by reducing the expected Y value of X3, or by changing the value associated with X3 itself. Furthermore, I need this formula in a form that I can insert it into a spreadsheet.

The answer that was provided isn't clear to me on how it would solve my problem. From what I can tell, it may help with finding values a and b in the quadratic equation, but it doesn't help me apply three sets of coordinates into a formula I can use to generate the values I need. It appears instead as a sequential series of equations, when in my case the equations in nested form, with the locations of X1, Y1, X2, Y2, X3, and Y3 (or a similarly desired value, such as TP/Tangent Percentage) clearly labeled. Being able to see the logic of the things working would help me quite a bit, since more verbose explanations tend to be more difficult for me to understand.

My apologies if my post is unclear or I have a hard time understanding the meaning of what you're trying to express - my autism tends to make communication difficult for me to grasp the way most people understand it.