PDA

View Full Version : OT Maths Question



SDL
04-15-2010, 10:37 AM
I have found a curve fit for some experiments that I have done and got the equation.

Y = (A x ( Flow^B))+ (C x (Flow^D))

Can anyone help in transposing the formulae to give Flow=, I cant remember maths to this level although I can still transpose trig and other simpler equations.

Steve Larner

BigBoy1
04-15-2010, 12:05 PM
What method did you use to process the data to obtain the equation? I've never heard of the "Flow" function. I just might be something that is peculiar to the function/routine which you used to generate the equation.

SDL
04-15-2010, 12:16 PM
What method did you use to process the data to obtain the equation? I've never heard of the "Flow" function. I just might be something that is peculiar to the function/routine which you used to generate the equation.

Sorry Flow is the property that is x on the graph, should read

Y = (A x ( X^B))+ (C x (X^D))

Steve Larner

dp
04-15-2010, 12:31 PM
Is little x and big X the same or is little x a multiplication operator?

In other words, is it Y = AX^B + CX^D

SDL
04-15-2010, 12:58 PM
Is little x and big X the same or is little x a multiplication operator?

In other words, is it Y = AX^B + CX^D

little x is multiplication


Y = (A *( X^B))+ (C * (X^D))

Steve Larner

boslab
04-15-2010, 01:22 PM
would you be referring to the eqn of continuity [abridged] leading to an all out assault on Bernoulli's[spelling?], ie cross section at point A x velocity [or mass flow rate] = cross section at point B x velocity [or mass flow rate]
AKA A1V1 =A2V2, it is reminiscent of a venturi meter
mark

ckelloug
04-15-2010, 01:29 PM
Steve,

It can be solved with logarithms. I got in my days practice at using maxima, the free computer arithmetic package coaxing it to do the math for me (twice as hard as actually doing the problem).

Maxima says

x=A^(1/(D-B))/((-C)^(1/(D-B))

--Cameron

aostling
04-15-2010, 01:32 PM
The equation cannot in general be transposed to give a solution for X as a function of Y. Only if the exponents B and D are integers can solutions can be obtained, and then only if these integers are not greater than 4.

This article states that a quartic is the highest order polynominal that can be solved in the general case: http://en.wikipedia.org/wiki/Quartic_equation

Pete F
04-15-2010, 01:37 PM
Steve,

It can be solved with logarithms. I got in my days practice at using maxima, the free computer arithmetic package coaxing it to do the math for me (twice as hard as actually doing the problem).

Maxima says

x=A^(1/(D-B))/((-C)^(1/(D-B))

--Cameron

What happened to Y?

-Pete

Tony Ennis
04-15-2010, 01:51 PM
Also, Wolfram-Alpha (http://www.wolframalpha.com/input/?i=x^3+%2B+x^2+%3D+Y) seems appropriate.

jungle_geo
04-15-2010, 03:29 PM
Y = A*X^B + C*X^D is best treated transcendental (literally meaning "transcending algebra"). I suggest this by the nature of the exponents and their arbitrary values of B and D. We can still use algebra, but encapsulate the exponential functions with natural logarithms first.

Rules:
1) ln(x*y) = ln(x) + ln(y)
2) ln(x/y) = ln(x) - ln(y)
3 ln(x^r) = r*ln(x)
4) e^ln(X) = X

Take the natural log (ln) of both sides:
ln(Y) = ln(A*X^B) +ln(C*X^D)

Apply rule #1:
ln(Y) = ln(A)+ln(X^B) + ln(C) + ln(X^D)

Apply rule #3:
ln(Y) = ln(A)+B*ln(X) + ln(C) + D*ln(X)

Now the algebra:
Subtract ln(A) and ln(C) from both sides (also put the ln(X) terms on the left):
B*ln(X) + D*ln(X) = ln(Y) - ln(A) - ln(C)

Factor out the ln(X) terms:
(B+D)ln(X) = ln(Y) - ln(A) - ln(C)

Divide both sides by B+D:
ln(X) = [ln(Y) - ln(A) - ln(C)] / (B+D)

Apply rule #3:
ln(X) = [ln(Y/A*C)] / (B+D)

Apply rule #4:
X = e^[ln(Y/A*C) / (B+D)]

Note: this solution is only valid where A,B,C,D, Y are all greater than 0.

I would really double check this math before I made any investments based on it. :D

mklotz
04-15-2010, 03:47 PM
Y = A*X^B + C*X^D

Take the natural log (ln) of both sides:
ln(Y) = ln(A*X^B) + ln(C*X^D)

Well, there's your problem. The ln(p + q) is not equal to ln(p) + ln(q).

ln(p) + ln(q) = ln (p*q) (as you pointed out)

I didn't bother to check but, since the first step in your derivation is wrong, I have to presume your final answer is also wrong.

beanbag
04-15-2010, 04:12 PM
The equation cannot in general be transposed to give a solution for X as a function of Y. Only if the exponents B and D are integers can solutions can be obtained, and then only if these integers are not greater than 4.

This article states that a quartic is the highest order polynominal that can be solved in the general case: http://en.wikipedia.org/wiki/Quartic_equation

^^^^^
what he said

ckelloug
04-15-2010, 05:37 PM
Hi Steve,

Sorry for the goof in the result I posted earlier.

You could probably solve it numerically by Newton Raphson iteration but depending on what it looks like, it might be easier to just draw a graph and estimate.

--Cameron

oldtiffie
04-15-2010, 08:28 PM
Cameron,

please check this out and see if I've got it right or wrong.

http://i200.photobucket.com/albums/aa294/oldtiffie/Sketches/SolveforX1.jpg

beanbag
04-16-2010, 03:11 AM
step 6 wrong

raise both sides to power 1/(d-b)

rule is (x^a)^b=x^(a*b), not x^(a+b)

multiple (complex) solutions possible

for example, assume d-b=2, then what would the answer look like?

Fasttrack
04-16-2010, 10:22 AM
Lest you doubted Aostling or Beanbag, here's another vote for Aostling's original answer. :)

What program did you use to find your regression? Basically you need to tell it to look for X(y) instead of Y(x). The quick and dirty way of doing this if you are not familiar with the program is to simply exchange your data points - i.e. instead of entering ordered pairs ("flow",y), enter (y,"flow"). Now when you do a fit in "y" you are actually doing a fit in "flow". Make sense?

SDL
04-16-2010, 07:15 PM
Lest you doubted Aostling or Beanbag, here's another vote for Aostling's original answer. :)

What program did you use to find your regression? Basically you need to tell it to look for X(y) instead of Y(x). The quick and dirty way of doing this if you are not familiar with the program is to simply exchange your data points - i.e. instead of entering ordered pairs ("flow",y), enter (y,"flow"). Now when you do a fit in "y" you are actually doing a fit in "flow". Make sense?

The equation came from a trial version of XLFIT see here
http://www.excelcurvefitting.com/?gclid=CKy0yJeejKECFWde4wod0SqchQ.

It gives a far better trend line than excel but I wanted to plot a derived series of results. I will post more details Monday when back at work

Steve Larner