Re: goddamn equasions

new topic     » goto parent     » topic index » view thread      » older message » newer message

Koda,

Sorry, i didnt realize you were asking such a trivial question.
I had thought you stuck in any old constants and such just to
illustrate the nature of the question you had, especially since
you never see the number 1 raised to a power in any real life
situation.

You happen to be lucky here, the system you are trying to solve
looks like a textbook example, as it can be shown to have only one
independent variable, a very rare occurance in real life. It can
be solved using simple algebra and natural logarithms.

The specific system:
[1]  135= a * 1000^b * e^(.2c) * (0.1)^d
[2]  360= a * 950^b * e^(.4c) * 1^d
[3]  765= a * 900^b * e^(.6c) * 5^d
[4]  130= a * 850^b * e^(.2c) * (0.1)^d

together with the relationship:
  A^b=e^(B*b)

can be converted into the system:

  135= a * e^(B1*b +   C1*c + D1*d)
  360= a * e^(B2*b + 2*C1*c + 0   )
  765= a * e^(B3*b + 3*C1*c + D3*d)
  130= a * e^(B4*b +   C1*c + D1*d)

where:
  B1=ln(1000)
  B2=ln(950)
  B3=ln(900)
  B4=ln(850)
  C1=.2
  D1=ln(.1)
  D3=ln(5)

Now divide all by a and taking the log of both sides leads to:
[5]  ln(135/a)=  B1*b +   C1*c  + D1*d
[6]  ln(360/a)=  B2*b + 2*C1*c
[7]  ln(765/a)=  B3*b + 3*C1*c  + D3*d
[8]  ln(130/a)=  B4*b +   C1*c  + D1*d

Now subtracting eq[5]-eq[8] and solving for b in terms of a yields:
  [9] b = (ln(135/a)-ln(130/a))/(B1-B4)

Now substitute b into eq[6] and solve for c in terms of a:
  [10] c = (ln(360/a)-B2*b)/2/C1

Now substitute b and c into eq[7] and solve for d in terms of a:
  [11] d = (ln(765/a)- B3*b - 3*C1*c)/D3

This shows "a" is the only independent variable in that system.

Now let variable "a" range in value numerically,
solve for b,c,d in terms of this a,
then substitute into eq[1] and calculate the right side numerically.
When the left side equals the right side you have the solution
to a,b,c and d.

Since you have only one independent variable, you can also
use Newtons method for roots for that last step:

rearrange eq[1] and let:
  f(x)= 135 - a * 1000^b * e^(.2c) * (0.1)^d
  where f(x) is an error function of x created by subtracting
  the left side of eq[1] from the right side of eq[1], and
  letting a = x and calculating b,c,d from eq[9], eq[10], eq[11].

  Now choosing x such that f(x)=0 and we have a solution.

  To help arrive at this x, pick a guess, say, 20, then:

  first pass:
  a = x - f(x)/f'(x) (Newtons)
    = 20 - (-25.96575)/(1.733109)
    = 34.98218
  second pass:
  a = x - f(x)/f'(x)
    = 34.98218 - ( -7.707)/(0.878447)
    = 43.75578
  third pass:
  a = x - f(x)/f'(x)
    = 43.75578 - ( -.99323)/(.66925)
    = 45.23984
  fourth pass:
  a = x - f(x)/f'(x)
    = 45.23984 - ( -0.0199605)/(.6426765)
    = 45.27090
  fifth pass:
  a = x - f(x)/f'(x)
    = 45.27090 - ( -8E-6)/(.642)
    = 45.270915

  after which var a doesnt change much because the second term
  approaches zero.

On my calculator i came up with the following values:
  a=45.270915
  b=0.232221121
  c=1.20305991
  d=0.326645325

f'(x) is the numerical derivative taken at x, and can be approx:
  f'(x)= [ f(x)- f(x + delta) ]/(delta + delta)

where delta is typically set equal to some small value, like 0.0001.

Its sometimes necessary to analyze the equations using calculus
to see if more solutions exist.

Oh and yes, the n equations have to be independent as dan was saying too.
(thanks dan)

Have fun with it,
--Al

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu