## Designing a function

"Please leave a message at the beep, we will get back to you when your support contract expires."

Moderators: phlip, Larson, Moderators General, Prelates

### Designing a function

Hey guys, I need help designing a function. With my years of college math behind me, I actually feel bad with my lack of ability to make a function behave how I want.

The criteria are:
• increasing like an exponetial or power function
• The integral from 0 to 10 equals 210 (or close to it)
• Simplistic-ish formula.

I want this to be on someone's jacket (think of the number on a jersey), so I want the formula to be somewhat pleasing to look at. Can anyone help me with this, or give me somewhere to start?

Thank you!
Shiral

Posts: 9
Joined: Thu Jan 10, 2008 8:13 pm UTC

### Re: Designing a function

Well, one thing you could do is just pick a base function like x2. Figure out what it's integral is from 0 to 10 (333.33..), then just multiply by whatever will make it be around what you want. For instance, (2/3)x2 will put the integral at 222.

You can try different powers or exponentials, adding or subtracting a constant, etc. until you get a function that "looks nice". That's not well-defined enough for me to judge.
EvanED

Posts: 3766
Joined: Mon Aug 07, 2006 6:28 am UTC

### Re: Designing a function

(2^x)/7 is about that. You could probably do something with a scale on the x too. Although after playing with it (ie telling wolfram alpha to solve it) it doesn't look very nice.

Another option is to find a function f such that f(10)-f(0)=210 and take the derivative.
cjmcjmcjmcjm wrote:If it can't be done in an 80x24 terminal, it's not worth doing
Meem1029

Posts: 377
Joined: Wed Jul 21, 2010 1:11 am UTC

### Re: Designing a function

EvanED wrote:Well, one thing you could do is just pick a base function like x2. Figure out what it's integral is from 0 to 10 (333.33..), then just multiply by whatever will make it be around what you want. For instance, (2/3)x2 will put the integral at 222.

BZZZZZZZT! WRONG!

222.222...

Proginoskes

Posts: 309
Joined: Mon Nov 14, 2011 7:07 am UTC
Location: Sitting Down

### Re: Designing a function

Meem1029 wrote:(2^x)/7 is about that. You could probably do something with a scale on the x too. Although after playing with it (ie telling wolfram alpha to solve it) it doesn't look very nice.

Another option is to find a function f such that f(10)-f(0)=210 and take the derivative.

The integral of 2x/7 from 0 to 10 =~ 210.84.
The integral of sqrt(5/2)x from 0 to 10 =~ 210.97

MrDrake

Posts: 7
Joined: Wed Apr 11, 2012 12:20 pm UTC
Location: Sydney, NSW, Australia

### Re: Designing a function

210*exp(x)/(exp(10)-1)
double epsilon = -.0000001;

Dason

Posts: 1264
Joined: Wed Dec 02, 2009 7:06 am UTC
Location: ~/