Generating monotonic decreasing functions

In summary, the conversation discusses the possibility of a list or software for monotonic decreasing functions with specific limitations such as passing through certain points and being in Cartesian form. The person asking for this is interested in testing their code for fluid dynamics and provides examples of such functions. The responder suggests a method for creating these functions and the person expresses their gratitude for the helpful advice.
  • #1
ephedyn
170
1
OK, this is an odd request, but is there some way or existing list of monotonic decreasing functions? The limitations I have are:

- f is monotonic and decreasing.
- f(0) = a, a is a real constant; f(1) = 1 ( or simply, passes through (0,a) and (1,1) )
- Cartesian equations, most preferably.

I thought it would be useful if there was such a thing (so there probably is), even if it's a software, like those curve fitting ones which have a predefined set of functions, just that here I'm (edit: interesting -> interested) in threading through the exact points. Reason being, I've written a code that does wonders with any input function for problems in fluid dynamics, but I'm having trouble thinking of inputs to test it out with when I have these limitations. Here's two fairly easy ones which I have thought of so far:

y = (1-a)(x-1) + 1
y = (a-1)(-10x^3 + 15x^4 - 6x^5) + a

Thanks in advance!
 
Last edited:
Mathematics news on Phys.org
  • #2
Here's a family of simple ones...


[1/(e-1)](a-1)(exp(-x^n+1) - 1) + 1


Plugging in x = 1, we have that exp(-x^n+1) = exp(-1+1) = exp(0) = 1, so the first term drops out and leaves only the trailing +1.

Plugging in x = 0, we have [1/(e-1)](a-1)(e-1)+1, and we are left with (a-1) + 1 = a.

n can be any number... in fact, the only restriction is that it be positive. Does not even have to be an integer, even though that's how I envisioned it when I came up with it.

Is that what you're looking for?
 
  • #3
Also...

a*cos[ (pi/2) x/(x+1) (4/pi)arccos(1/a)]
 
  • #4
csprof2000 said:
[1/(e-1)](a-1)(exp(-x^n+1) - 1) + 1

Also...

a*cos[ (pi/2) x/(x+1) (4/pi)arccos(1/a)]

Yes! Those meet the requirements that I'm looking for! Thanks aplenty!

I have to ask, is there a general way that you come up with them... or is purely based on your intuition (*cough* both of mine are polynomial functions ><;)?
 
  • #5
Maybe...

[(1-a)/ln(1/2)]ln(1/(x+1)) + a
 
  • #6
Well, I do have a method.

Basically, I think of the function I want to make work. So for my first example, I thought "exponential function". So we have

exp(-x)

Next, I said, let it always equal 1 at x = 1. So I shift one to the right...

exp(-x + 1)

Now, I know I need to scale it so that f(0) = a. So, to do this, I need to be able to multiply the whole thing, stretching it out. But to do this correctly, I must subtract by one so the point (1, 1) is "anchored" at (1, 0)... otherwise, I'll lose it. Of course, I'll have to add one back to the end result to have it go through (1, 1) again. So I have...

c ( exp(-x + 1) - 1 ) + 1

At this point, c can be found by plugging in x = 0 and demanding that the whole thing equals a. That leads to me final answer. I also noticed that there could be any power on the x without affecting anything (though this is luck, and I'm not even 100% sure it works for any n).

The others worked the same. You've just got to start with a function - any function - and figure out how to make it do what you want anywhere you have constraints.
 
  • #7
Oh crap, I realized that I must have closed my browser along with my reply and plain forgot to thank you for sharing your method. My code worked flawlessly with your examples, and I've gotten a hang of the method.

This part was really useful; thanks a lot!

Now, I know I need to scale it so that f(0) = a. So, to do this, I need to be able to multiply the whole thing, stretching it out. But to do this correctly, I must subtract by one so the point (1, 1) is "anchored" at (1, 0)... otherwise, I'll lose it. Of course, I'll have to add one back to the end result to have it go through (1, 1) again. So I have...

c ( exp(-x + 1) - 1 ) + 1

At this point, c can be found by plugging in x = 0 and demanding that the whole thing equals a.

A happy new year to you.
 

1. What is a monotonic decreasing function?

A monotonic decreasing function is a type of mathematical function where the values decrease as the input variable increases. This means that as you move from left to right on a graph, the function will always be decreasing or staying the same.

2. How do you generate a monotonic decreasing function?

To generate a monotonic decreasing function, you can start with a basic function (such as a linear function) and then apply transformations to it. For example, you can multiply the function by a negative number to flip it upside down and make it decreasing.

3. What are some examples of monotonic decreasing functions?

Some common examples of monotonic decreasing functions include exponential functions with a negative base, logarithmic functions, and quadratic functions with a negative coefficient for the squared term.

4. Why are monotonic decreasing functions important?

Monotonic decreasing functions are important in many areas of science and mathematics, including economics, physics, and statistics. They can be used to model real-world phenomena and make predictions based on data.

5. How can you determine if a function is monotonic decreasing?

To determine if a function is monotonic decreasing, you can look at the slope of the function at different points. If the slope is always negative or zero, then the function is monotonic decreasing. You can also graph the function and see if it is always decreasing or staying the same as you move from left to right.

Similar threads

Replies
17
Views
2K
  • General Math
Replies
5
Views
2K
  • General Math
Replies
2
Views
719
Replies
2
Views
1K
Replies
1
Views
1K
Replies
2
Views
4K
  • General Math
Replies
4
Views
2K
  • Calculus and Beyond Homework Help
Replies
4
Views
1K
  • Precalculus Mathematics Homework Help
Replies
15
Views
629
  • Calculus and Beyond Homework Help
Replies
6
Views
2K
Back
Top