Solving an Exponential Function

Started by
19 comments, last by MichaelBartman 20 years, 9 months ago
Hey, I am having some trouble understanding how to solve the following Exponential Function: f(x) = a(e^bx)+c Here are the constraints: f(0) = 0 f(.1) = 1 f(1) = 100 Any hints would recieve a warm welcome Thankyou, Michael Bartman CEO, Lead Programmer Dark Omen Studios http://www.darkomenstudios.com/
Michael BartmanCEO, Lead ProgrammerDark Omen Studios
Advertisement
Rewrite your equation

f(x) = a * e^(b*x) + c

as

(f(x) - c)/a = e^(b*x)

then take the natural logarithm of both sides
(and use ln(A/B) = ln(A) - ln(B) to expand if so inclined)

ln(f(x) - c) - ln(a) = b*x

then sub in the various values of x and f(x), resulting in 3 fairly simple equations with 3 unknowns (a, b and c). You can replace ln(a) with something else, say A = ln(a) for doing the linear algebra, and then find a using a = e^A
Hey Geoff,

Thanks a ton for your help! I really appreciated it. I''ve been stuck on this problem since the other night.

Thanks again,


Michael Bartman
CEO, Lead Programmer
Dark Omen Studios
http://www.darkomenstudios.com/
Michael BartmanCEO, Lead ProgrammerDark Omen Studios
Excuse this interruption but could you explain yourself.

I just cannot understand how you can solve it from your final equation, and this makes me irritated.

Is it too much to ask to continue it further?

Just to find out if we are in the same ball park, I got a as roughly 0.6. Does your method get that?

[edited by - sadwanmage on July 5, 2003 6:38:52 PM]
Hey,

I am enrolled in Game Institutes Game Mathematics course, and this problem was used as an example in the text there. The reason I needed help was because they gave the results, but didn''t really explain how to get to them. They simply said they used Mathematica.

Anyway, according to the course material a should be about 2.10999, b should be about 3.87937, and c should be the inverse of a -2.10999.

I haven''t had time to verify if Geoff''s equation works yet, but it looks like it should.

Michael Bartman
CEO, Lead Programmer
Dark Omen Studios
http://www.darkomenstudios.com/
Michael BartmanCEO, Lead ProgrammerDark Omen Studios
Just tested it with those values, and yes it does work.

Hope that helps sadwanmage,

Thanks again Geoff!

Michael Bartman
CEO, Lead Programmer
Dark Omen Studios
http://www.darkomenstudios.com/
Michael BartmanCEO, Lead ProgrammerDark Omen Studios
quote:Original post by sadwanmage
Is it too much to ask to continue it further?


It is not. I assumed it wasn''t necessary. Upon attempting to do so however, I found it was somewhat harder than I had thought. Here''s what I did:

Substitute f(0) = 0 into f(x) = a*(exp(b*x)) + c
(1) 0 = a*exp(0) + c
(2) a = -c

Substitute f(.1) = 1, f(1) = 100 into ln(f(x) - c) - ln(a) = b*x

(3) ln(1 + a) - ln(a) = b/10
(4) ln(100 + a) - ln(a) = b

Subtract (4) - 10*(3)

(5) ln(100 + a) + 9*ln(a) = 10*ln(1 + a)
(6) (100 + a)*a^9 = (1 + a)^10

At this point, I''m stumped. Maple 6 will solve for a if I ask it nicely, but it gives 9 answers, 8 of them partly imaginary. The purely real answer is the correct one. (Maple will solve the original system with no problems however... only giving one solution) Doing this analytically is probly not worth the effort, as it would involve factoring a 9th order polynomial and searching for the single purely real root, which is not an integer. You''d have to do this iteratively, I think.

You don''t want me to do that too, do you sadwanmage?

Knowing a, one can easily get b and c.

If someone knows a better way, I''d like to know. Also, why/how does Maple get only the signle, purely real, solution when asked to solve the whole system instead of just equation (6). I assume I''ve generalized a specific case of something or invalidated some property of the original equations by manipulating them.

How did you check my equations, MichaelBartman?
I know what a, b and c should be, so I plugged them into it and both sides were equal. I haven''t worked the problem out yet though.

Michael Bartman
CEO, Lead Programmer
Dark Omen Studios
http://www.darkomenstudios.com/
Michael BartmanCEO, Lead ProgrammerDark Omen Studios
Using mathematica on equation 6 yields 9 equations as well, so it isn''t just maple.

I assume maple is a program like mathematica.

Thanks,

Michael Bartman
CEO, Lead Programmer
Dark Omen Studios
http://www.darkomenstudios.com/
Michael BartmanCEO, Lead ProgrammerDark Omen Studios
Thanks, I thought it was not as easy as you said. I did the same thing, but made a mistake, so got the wrong polynomial at the end. Good to know my reasoning is sound though...

This topic is closed to new replies.

Advertisement