He is trying to solve the equation "e^mx + e^nx = k" for x; m, n & k are known.
Main Topics
Browse All TopicsIs there a function or a library that can solve equations like: exp(constant*x) + exp(constant*x) = constant ?
If not , what is the best way to solve this equation in c++ ?
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If all values are known, as you mentioned jhshukla was right about, then I don't see what you are trying to do (function is already solved).
The standard library has the exp function (math.h). You'll have to break the algebra down to its simplest form and solve for what ever variable you're looking for. Standard C++ libraries won't do that for you. A library like MathCAD might. Unless you need to break down a lot of different equations then you would be better to just do it yourself.
substitute e^x = A
A^m + A^n = k
depending on the values of m & n, the equation may be unsolvable or you may end up with non-real roots (for A).
x = ln(A)
wikipedia has a variety of formulas for solving cubic & quartic equations
http://en.wikiped
http
there is no set formula for solving higher order equations. you can use newton's method as jiexa showed.
Business Accounts
Answer for Membership
by: tcullerPosted on 2009-05-07 at 07:30:46ID: 24326232
Depends on what you mean by "exp"--what is this function supposed to do? Also, you can't assign a constant to anything but a constant, as far as I know. The entire expression must be a constant (unless x is a constant as well). Can you be a bit more specific as to what exactly you're trying to accomplish?