How to generate log function that intersects at (0,1) and (1,0)? I apologize for any incorrect or missing formatting, first time posting in the math stack exchange. It's been a few years since I've done any kind of calculus, so I remember nothing at all, which is probably the reason why I find my self stumped so early in my calculations. I'm looking to generate a logarithmic algorithm that will follow a plot that will pass the following points: (0,1) and (1,0). My end goal is to generate a programming function that will return a very simple repulsion force ceofficient value based on a distance between two points. I would like, however, that the force drop (logarithmic?) the further these two points are, and grow (exponentially?) the closer they get. This is in no way an accurate calculatio
Paulkenyo
Open question
2022-08-28
How to generate function that intersects at and ? I apologize for any incorrect or missing formatting, first time posting in the math stack exchange. It's been a few years since I've done any kind of calculus, so I remember nothing at all, which is probably the reason why I find my self stumped so early in my calculations. I'm looking to generate a logarithmic algorithm that will follow a plot that will pass the following points: and . My end goal is to generate a programming function that will return a very simple repulsion force ceofficient value based on a distance between two points. I would like, however, that the force drop (logarithmic?) the further these two points are, and grow (exponentially?) the closer they get. This is in no way an accurate calculation I'm looking for, but merely a non-linear function to return me a scalar coefficient between 0 and 1 that I can manipulate later on. I want the function to cross at and so I get a coefficient between and . In my function, any Y value lower than will be floored at and likewise for values over (where , which is possible since my value in my algorithm will likely be an offsetted value of the distance between two points). That being said, with the following few assumptions: 1. when 2. when 3. when 4. when 5. 6.assuming log is log based 10 I tried to deduce the constants in order to generate a formula. Here is what I've done so far: 1.From assumption #1, I can generate 2.From assumption #2, I can generate 3.I make both equations equals by transforming equation from 1. to 4.Making the following equality: 5.I can scratch both constants out (is it safe to assume , or can be equal to any arbitrary value, without changing the equation's plot?): 6.Dividing each part by A gets me: 7.Allowing me to reduce both logs: 8.If I put both logs on the same side: 9.I can combine them into: And I'd say this is where I'm stuck; I have two unknowns ( and ) with one equation to solve. I don't know where to go from here. What's the next step?
Answer & Explanation
Annalise Baldwin
Beginner2022-08-29Added 5 answers
If you have the functional form (with three parameters), and impose only the two constraints and , then your problem is underdetermined and you should expect to have a free parameter remaining. What you've done so far is correct.
Subtracting one equation from the other gives
or and You are free to choose as you like and then solve for and For instance, let . Then and , so your function is
which you can readily see meets your constraints and is logarithmic. Or, let . Then and , so
As you can see, a nice parameterization of the entire family of solutions is