Can somebody tell me what type (if any) math this is?

Started by
3 comments, last by djz 14 years, 4 months ago
Here's my problem: I have a variable x that starts at 1.0 and I need to find the coefficient that will drop it down to a target value(say 0.1) in exactly t steps through successive multiplying. so let x = 1; we multiply it by d=0.9 and x becomes 0.9. Repeat again, now x becomes 0.81. What I need to find is the value of d that will drop x to some specific target in the specified number of steps. As a bit of a math n00b (I only did 'easy' math in highschool) i am wondering two things - is this a specific "type" of math, or is it well within highschool algebra? Seems like it might be calculus, which I have just got some books on, but haven't had the time to jump in yet. The second thing I am wondering is, how would I express this problem properly? I assume it will involve the summation symbol at some point - I'd like to be able to clearly articulate it in the proper nomenclature. Any and all help, as always, is appreciated thoroughly!! *side note: I could use a recursive function to code a way to find it, but perhaps there is an easier/more sensible way, which is why I would like to look at how this would actually be accomplished mathematically
Advertisement
You need logarithms.

Your problem is basically

c = x*d^k

Where c is you target number, x is your initial value, d is your multiplier, and k is the number of steps.

So if you want to find d, you do...

c/x = d^k
ln(c/x) = k*ln(d)
ln(c/x)/k = ln(d)
e^(ln(c/x)/k) = e^ln(d) = d

Therefore, you have exp(ln(c/x)/k) = d.

Quote:Original post by choffstein
You need logarithms.

Your problem is basically

c = x*d^k

Where c is you target number, x is your initial value, d is your multiplier, and k is the number of steps.

So if you want to find d, you do...

c/x = d^k
ln(c/x) = k*ln(d)
ln(c/x)/k = ln(d)
e^(ln(c/x)/k) = e^ln(d) = d

Therefore, you have exp(ln(c/x)/k) = d.


AWESOME! ratings++ :)

Hi djz,

what you're looking for is called the n-th (or, expressed with your variable names, the t-th) root of the "target value":

http://en.wikipedia.org/wiki/Nth_root

You probably know the "square root" or "2nd root" function, which is the answer to the question "which number must be multiplied with itself -once- to get the target value?" This can be generalized to "which number must be multiplied with itself n times to get the target value?", and this is called the n-th root.

The n-th root can also be expressed as the (1/n)-th power of the "target value", so you can use your programming language's power function to compute it. In C or C++, for example, the n-th root of the target value "y" is returned by

pow(y, 1.0/n).

[edit]
Oh, I see, my answer comes a bit late. choffstein's solution is more general, since it allows your x to be any value. My answer is only correct if your x is always = 1, but, you said it is ;).
[/edit]
Quote:Original post by wurstbrot
Hi djz,

what you're looking for is called the n-th (or, expressed with your variable names, the t-th) root of the "target value":

http://en.wikipedia.org/wiki/Nth_root

You probably know the "square root" or "2nd root" function, which is the answer to the question "which number must be multiplied with itself -once- to get the target value?" This can be generalized to "which number must be multiplied with itself n times to get the target value?", and this is called the n-th root.

The n-th root can also be expressed as the (1/n)-th power of the "target value", so you can use your programming language's power function to compute it. In C or C++, for example, the n-th root of the target value "y" is returned by

pow(y, 1.0/n).

[edit]
Oh, I see, my answer comes a bit late. choffstein's solution is more general, since it allows your x to be any value. My answer is only correct if your x is always = 1, but, you said it is ;).
[/edit]


no problem! I am glad to see the approach to this specific case. thanks :)

This topic is closed to new replies.

Advertisement