Can you determine this function?

  • Thread starter Thread starter Fjolvar
  • Start date Start date
  • Tags Tags
    Function
Fjolvar
Messages
156
Reaction score
0
Help please - I can't determine this function.

Okay I will try to make this as straightforward and clear as possible. My calculus background is rusty because it's been awhile, so this may seem trivial.

I am trying to find a function that can best fit the shape of the red curve shown in the attached figure. I need to be able to choose the y-intercept and increase/decrease the maximum point value marked as "1" on both the y and x-axis location. I also need to be able to increase/decrease the length/x-value of the end portion of the curve marked as "2."

I have so far tried playing with quadratic functions, a sine wave (from 0 to π), and a double exponential. No luck so far. I would greatly appreciate any advice on this seemingly simple problem.

Thank you in advance!
 

Attachments

  • Function.png
    Function.png
    1.2 KB · Views: 449
Last edited:
Physics news on Phys.org
Fjolvar said:
Okay I will try to make this as straightforward and clear as possible. My calculus background is rusty because it's been awhile, so this may seem trivial.

I am trying to find a function that can best fit the shape of the red curve shown in the attached figure. I need to be able to choose the y-intercept and increase/decrease the maximum point value marked as "1" on both the y and x-axis location. I also need to be able to increase/decrease the length/x-value of the end portion of the curve marked as "2."

I have so far tried playing with quadratic functions, a sine wave (from 0 to π), and a double exponential. No luck so far. I would greatly appreciate any advice on this seemingly simple problem.

Thank you in advance!

Maybe this 4 parameter fit will work:

y_0+a\frac{x}{L}\left(1-\frac{x}{L}\right)\left(1+c\frac{x}{L}\right)
 
Chestermiller said:
Maybe this 4 parameter fit will work:

y_0+a\frac{x}{L}\left(1-\frac{x}{L}\right)\left(1+c\frac{x}{L}\right)

Hmm I've been playing with this equation, but not having too much luck. Could you explain it? :)
 
Fjolvar said:
Hmm I've been playing with this equation, but not having too much luck. Could you explain it? :)

The first term is the value at x = 0. The parameter x=L is what you call point 2. Note that the function values at the x = 0 and x = L are both the same, as shown on your figure. The parameter a adjusts the height of the peak (along with the parameter c), and the parameter c moves the location of the peak around between x = 0 and x = L.
 
Maybe an even polynomial fit? Quartic or order 6? Course you may need a few more points to constrain it...
 
Chestermiller said:
Maybe this 4 parameter fit will work:

y_0+a\frac{x}{L}\left(1-\frac{x}{L}\right)\left(1+c\frac{x}{L}\right)

OK. I figured out an even better functional form than this previous one to try that I think you'll like much better:


y_0+a\frac{x}{L}\left(1-\frac{x}{L}\right)e^{c(\frac{x}{L})}

If c = 0, the maximum will be at x = L/2. If c < 0, the maximum will be at x < L/2, and if c > 0, the maximum will be at x > L/2. This functional form will guarantee one maximum and no minima (or negative values) between x = 0 and x = L.

Chet
 

Similar threads

Replies
3
Views
4K
Replies
6
Views
2K
Replies
8
Views
2K
Replies
26
Views
2K
Replies
4
Views
3K
Back
Top