Math headache

Sunday, May 1, 2005 by Thomas Thomassen | Discussion: WinCustomize Talk

Right, I'm trying to figure out how to calculate the base number of a power when the result and exponent is known. It's been a while since I did this sort of work and now my brain has come to a complete stop. I have looked at the internet for formulas to help me, but I'm finding them just as hard to understand. (Mind you that I'm Norwegian and some of the terms are unfamiliar as I have never learned the english words for the mathematical terminology.)

So I hoped anyone here could help me in the right direction. The formula I have is:

200 = logb10
Essencay
Reply #1 Sunday, May 1, 2005 4:11 PM
http://www.math.utah.edu/~alfeld/math/Log.html If it worked right the answer I got was 1.011579

I've been out of school way too long, so I have no clue if that is correct way to display the base number or not. I have forgotten so much.
Chris TH
Reply #2 Sunday, May 1, 2005 6:56 PM
Looks right to me (FWIW!)

Posted via WinCustomize Browser/Stardock Central
Skarny
Reply #3 Sunday, May 1, 2005 7:40 PM
Getting the function to something that's solvable using most scientific calculators:

200 = logb10
translates to:
b^200 = 10 take the 200th root of both sides ->
b = 10^(1/200) simplify ->
b = 10^0.005
= 1.011579

Just another rearrangement to show some more working on how to get b as the 'focus'. The last line used a calculator (the x^y button) found on most scientific calculators.
A general formula might be: x = logby
b = y^(1/x)

tri1ogy
Reply #4 Sunday, May 1, 2005 7:56 PM
Ah, Skarnivorous beat me, but has the correct solving method.

His formulas appearance looks much better, so I'll only add this check...
logbx = (log x)/(log = (ln x)/(ln
= ln(10)/ln(1.011579454)
= 200
thomassen
Reply #5 Sunday, May 1, 2005 8:00 PM
Thank you. I'm making a DX widget where I got some objects that animated as they expand or collapse. However, I wanted something more fluid than just an even animation. I wanted it to start of fast and then slow down right before it reaches it's final size. What I came up with fast was something that started slow and ended fast. Opposite of what I wanted.

When I got back home this summer I'll see if I can find my old math books, if I haven't burned them, and freshen up my memory.
I swear my old math teachers are giggling to them self now, thinking: -That'll teach him for saying "This is rubbish, I'll never have any use for this!"!

Thanks guys.
thomassen
Reply #6 Tuesday, May 10, 2005 5:42 PM
Right, I've got another issue. Similar, just inverted. I'd need a function that will in 10 steps create a curve that goes from a given number (example: 200) to 0. Last time the function generated a curve like the red one. Now a need a function the lives me a curve like the green one.


I'm quite annoyed that I can't figure out this my self yet. I remember doing stuff like this just a couple of years ago..
KeithMacDonald
Reply #7 Tuesday, May 10, 2005 6:48 PM
ok, what kind of math is this?? im confused... im only able to do type II algebra, at the best (distributive property)
thomassen
Reply #8 Wednesday, May 11, 2005 4:44 AM
Logarithm. Never thought I'd have any use for it. Hence why I forgot about it...
Skarny
Reply #9 Wednesday, May 11, 2005 7:08 PM
I did have a lengthy post about decreasing functions and other bits, but it would have still left you with trying to 'fiddle' a function like 1/x or 1/sqrt(x) to make something that goes from 200 to 0 with an 'even' curve, in the shape you wanted. So I just did it for you. This was still done with a bit of trial and error and a graphing program, but it does what you want.

for x = 0 to 200 step 20
y = -40*(x-200)/(x+40)
next

y will decrease from 200 to 0, as x ranges from 0 to 200, the step 20 makes the 10 steps you wanted.

Skarny
Reply #10 Wednesday, May 11, 2005 7:17 PM
as an extra note, a general form of the function:

-a*(x-/(x+a)

a is roughly the closness of the 'curving' point to the origin, so INCREASING this number makes the function a more GRADUAL curve (I recommend sticking around 20-40, but increase this as you increase

b is your limit,
so b = 100 will make the function decrease from 100 to 0 in x = 0 to 100
and b = 200 will make the function decrease from 200 to 0 in x = 0 to 200
thomassen
Reply #11 Thursday, May 12, 2005 1:10 PM
Ok, the -a*(x-/(x+a) function works perfect. However I have two different functions now. Is there any way that the -a*(x-/(x+a) function can be adapted to create a curve like the red one? I feel I got better control over the curve with this last function.
Phoon
Reply #12 Thursday, May 12, 2005 2:30 PM
I guess my Jethro Bodine school of Double-Naught Cypherin' diploma is quite useless in this scenario...
Skarny
Reply #13 Thursday, May 12, 2005 6:49 PM
heh heh, that has a quick solution that might not be equivilent to a mathematical inverse or anything. Think about the curve you have now. Mirror it across the x-axis, it now has the right shape, but it's from -200 to 0 on the y-axis, we want it from 0 to 200, so simply add 200 to every point on the curve! so -200 + 200 -> 0 and 0 + 200 -> 200, and we get the correct y-range.

So, to mirror a function across x-axis, a rough method is to multiply the entire function by -1, and to add 200 to every point, just add 200 to the function.

therefore:
y = 200+40*(x-200)/(x+40)

generally:
y = b+a*(x-/(x+a)

will give you what you want.

thomassen
Reply #14 Friday, May 13, 2005 7:05 AM
Ah! Brilliant! Thank you very much for your help. It'll be credited in the widget.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01