• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 316
  • Last Modified:

Formula of a line in log-log coordinate system going through P1 and P2

Hi Experts,

earlier I asked a similar question see

http://www.experts-exchange.com/Miscellaneous/Math_Science/Q_21183266.html#12444220

But now my question is: what is the formula of a line in log-log coordinate system going through P1(X1;Y1) and P2(X2;Y2) because I've tried to solve it but I was unsuccesful. Thanks for your help!

Janos
0
kacor
Asked:
kacor
  • 3
  • 3
  • 2
1 Solution
 
d-glitchCommented:
Sorry we weren't clearer last time.

The equation of a straight line on a log-log plot must have the form:

               Y  =  Ao * X^m  

From the earlier question we have:

      m   = log (Y2/Y1)/log(X2/X1))


                       Y1            Y2
     Ao    =   ---------   =  --------
                    X1^m         X2^m
0
 
kacorretiredAuthor Commented:
thanks d-glitch I'll test it.

wbr Janos
0
 
d-glitchCommented:
If you believe
                          Y  =  Ao * X^m        

Then you have two equations in two unknowns:

                         Y1  =  Ao * X1^m

                         Y2  =  Ao * X2^m

You can solve either one or both to find Ao in terms of X,Y, and m

                                        Y1            Y2
                       Ao    =   ---------   =  --------
                                     X1^m         X2^m

You can use the second equality (which has eliminated Ao) to solve for m in terms of X and Y.

                            Y1            Y2
                        ---------   =  --------
                         X1^m         X2^m

You did this yourself in the earlier question:

                                 m   = log (Y2/Y1)/log(X2/X1))
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
d-glitchCommented:
I think the problem may be mixing graphical and algebraic techniques.  
Either one works to find a solution, or to gain insight.  
But trying to combine them on the fly can be a little confusing.
0
 
kacorretiredAuthor Commented:
thanks that's right
0
 
thanasis57Commented:
In a normal plot, the equation for a straight line is:
y=a*x+b

In a log-log plot it will be:
logy=a*logx+b =>
y=10^(a*logx+b) =>
y=10^(a*logx)*10^b =>
y=(10^logx)^a*10^b => (because if y=logx <=> x=10^y=10^logx)
y=x^a*10^b

Thus, this function will give a linear graph in a log-log plot
0
 
thanasis57Commented:
In a normal plot, the equation for a straight line is:
y=a*x+b

where a=(Y2-Y1)/(X2-X1) (the slope) and b=(X1*Y2-X2*Y1)/(X1-X2) (intersection with y-axis)

In a log-log plot it will be:
logy=a*logx+b =>
y=10^(a*logx+b) =>
y=[10^(a*logx)]*(10^b) =>
y=[(10^logx)^a]*(10^b) => (because if y=logx <=> x=10^y=10^logx)
y=(x^a)*(10^b)

Thus, this function will give a linear graph in a log-log plot
0
 
kacorretiredAuthor Commented:
HI,

I tried to get the needed equation but my trying was unsuccesful when I used the above said:

For example there are taken 2 points:

Point 1: y1=10;  x1=4,1
Point 2: y2=0,1; x2=176

I tried to insert the values.

the slope is m = log (Y2/Y1)/log(X2/X1))   =>  

m = log10(0,1/10) / log10(176/4)          m = -2 / 1,632729 = -1,224943

the intersection point with y-axis is b = y1 / x1^m

b = 10 / 4,1^(-1,224943) = 10 / 0,177572 = 56,31517

and using the equation of y=(x^a)*(10^b)  = 3,7E+55  I've got a bad value.

but using the equation of y = b * (x^a) the results are OK.

thanks for your support

Janos

0

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now