Solved

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

Posted on 2004-11-03
300 Views
Last Modified: 2012-06-21
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
Question by:kacor
    8 Comments
     
    LVL 26

    Expert Comment

    by:d-glitch
    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
     
    LVL 10

    Author Comment

    by:kacor
    thanks d-glitch I'll test it.

    wbr Janos
    0
     
    LVL 26

    Expert Comment

    by:d-glitch
    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
     
    LVL 26

    Accepted Solution

    by:
    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
     
    LVL 10

    Author Comment

    by:kacor
    thanks that's right
    0
     
    LVL 1

    Expert Comment

    by:thanasis57
    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
     
    LVL 1

    Expert Comment

    by:thanasis57
    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
     
    LVL 10

    Author Comment

    by:kacor
    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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    A Guide to the PMT, FV, IPMT and PPMT Functions In MS Excel we have the PMT, FV, IPMT and PPMT functions, which do a fantastic job for interest rate calculations.  But what if you don't have Excel ? This article is for programmers looking to re…
    Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…
    This video is in connection to the article "The case of a missing mobile phone (https://www.experts-exchange.com/articles/28474/The-Case-of-a-Missing-Mobile-Phone.html)". It will help one to understand clearly the steps to track a lost android phone.

    877 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now