- #1

- 664

- 3

W*C^(Z/A) = X*C^(Y/A) - D*X + D*W

How do you go about solving for A?

Known: C>1

Also, if it makes it easier (it shouldn't) you can assume that D=1.

If Y and Z are known, I figure you can substitute k=C^(1/A), which turns it into a more trivial polynomial. But if Y and Z *aren't* known, I'm at a loss.

For the sake of reference, here's where the problem comes from:

I want a logarithmic function that I can use in a program I'm writing. Therefore, I'm guessing that I want an equasion of the form:

f(x) = A*log(B*x + D) (that's log base C)

And I know that:

f(0) = 0

f(W) = Y

f(X) = Z

Since F(0) = 0, I can assume that D = 1. No problem.

And I don't really care what C is, nor do I think I ought to-- if it matters, I'm just assuming that C = e.

Plugging in W and solving for B in terms of A gives me:

B = (C^(Y/A) - D)/W

Plugging in X and solving for A gives me something I can't solve-- at least not in the general case:

W*C^(Z/A) = X*C^(Y/A) - D*X + D*W

[edit]

And if I do the reverse, and try solving for B instead of A, I get:

(B*W+D)^Z = (B*X+D)^Y

Which I similarly can't figure out how to solve for B.

[/edit]

DaveE

How do you go about solving for A?

Known: C>1

Also, if it makes it easier (it shouldn't) you can assume that D=1.

If Y and Z are known, I figure you can substitute k=C^(1/A), which turns it into a more trivial polynomial. But if Y and Z *aren't* known, I'm at a loss.

For the sake of reference, here's where the problem comes from:

I want a logarithmic function that I can use in a program I'm writing. Therefore, I'm guessing that I want an equasion of the form:

f(x) = A*log(B*x + D) (that's log base C)

And I know that:

f(0) = 0

f(W) = Y

f(X) = Z

Since F(0) = 0, I can assume that D = 1. No problem.

And I don't really care what C is, nor do I think I ought to-- if it matters, I'm just assuming that C = e.

Plugging in W and solving for B in terms of A gives me:

B = (C^(Y/A) - D)/W

Plugging in X and solving for A gives me something I can't solve-- at least not in the general case:

W*C^(Z/A) = X*C^(Y/A) - D*X + D*W

[edit]

And if I do the reverse, and try solving for B instead of A, I get:

(B*W+D)^Z = (B*X+D)^Y

Which I similarly can't figure out how to solve for B.

[/edit]

DaveE

Last edited: