got stuck in equation

Discussion in 'Python' started by usamazohad@gmail.com, Jan 1, 2013.

  1. Guest

    hi . . my name is usama khan
    i am the student of civil engeering and we got assignment to make a project program on flexible pavement design using python.

    i know very litle about programing. still learning from tutorials. u can call me a beginner.
    now i need to solve this equation so that i can put this in python but the formula of design is very complex

    Formula is :

    log(W18) = (Z)(S)+9.36log(SN+1) -2.0+(log(dpsi/(4.5-1.5))(/(.40+1094/(SN+1)^2.5)+2.32log(Mr-)-8.07

    every thing is constant except this SN. . i want to seperate SN like SN= rest of the stuff. how can i seprate it because manualy its impossible to take SN out.
    so plz help me out
     
    , Jan 1, 2013
    #1
    1. Advertising

  2. On Wed, Jan 2, 2013 at 2:40 AM, <> wrote:
    > hi . . my name is usama khan
    > i am the student of civil engeering and we got assignment to make a project program on flexible pavement design using python.
    >
    > i know very litle about programing. still learning from tutorials. u can call me a beginner.
    > now i need to solve this equation so that i can put this in python but the formula of design is very complex
    >
    > Formula is :
    >
    > log(W18) = (Z)(S)+9.36log(SN+1) -2.0+(log(dpsi/(4.5-1.5))(/(.40+1094/(SN+1)^2.5)+2.32log(Mr-)-8.07
    >
    > every thing is constant except this SN. . i want to seperate SN like SN= rest of the stuff. how can i seprate it because manualy its impossible to take SN out.
    > so plz help me out


    This isn't a Python question, it's an algebra one. I don't know what
    Z, S, and so on are, but for the most part, the basic rule of solving
    equations applies: Do the same thing to both sides and it's still
    true. Work on it until you can isolate SN on one side.

    I don't know what this bit means, though:

    2.32log(Mr-)

    Is this a transcription error? You can't subtract nullness from something.

    ChrisA
     
    Chris Angelico, Jan 1, 2013
    #2
    1. Advertising

  3. Dave Angel Guest

    On 01/01/2013 10:40 AM, wrote:
    > hi . . my name is usama khan
    > i am the student of civil engeering and we got assignment to make a project program on flexible pavement design using python.
    >
    > i know very litle about programing. still learning from tutorials. u can call me a beginner.
    > now i need to solve this equation so that i can put this in python but the formula of design is very complex
    >
    > Formula is :
    >
    > log(W18) = (Z)(S)+9.36log(SN+1) -2.0+(log(dpsi/(4.5-1.5))(/(.40+1094/(SN+1)^2.5)+2.32log(Mr-)-8.07
    >
    > every thing is constant except this SN. . i want to seperate SN like SN= rest of the stuff. how can i seprate it because manualy its impossible to take SN out.
    > so plz help me out


    Tk Solver is (or was) a program for getting numerical results from
    equations where you couldn't (or didn't want to) express the equation
    with the independent variable isolated on its own side of the equals
    sign. I don't know where it's available for purchase or download now;
    I do see references to it on the web, plus books still available about
    it. Apparently it's up to version 5.

    Anyway, since everything else is a constant, use some program like Tk
    Solver to get the value for SN, then the Python program becomes simply:

    SN = 4.7732

    or whatever.

    On the other hand, perhaps you didn't mean the other values were
    constant, but rather known. For example, perhaps your program is
    supposed to ask the user for values to W18, to dpsi, etc., then it is to
    calculate one or more values for SN that make the equation work.


    SN might be "structural number" as indicated on this web page:

    http://classes.engr.oregonstate.edu/cce/winter2012/ce492/Modules/06_structural_design/06-3_body.htm

    The big equation on that page looks kinda like the one you present,
    though I didn't study every term.


    1)
    Is there a finite range of values that SN might fall into? I know
    nothing about pavement design, other than what I just read there, but
    there might well be a specific range that's reasonable to expect.

    2)
    Take the present equation, and subtract log(w18) from both sides. Now,
    you want a value for SN that produces zero, or something close for the
    left hand side. Call that side "error". Is the value "error"
    relatively predictable for changes in SN ? For example, in the simplest
    case, any increase in SN will result in an increase of error. The worst
    case would be where any tiny change in SN might result in enormous
    changes in a random direction to error.

    3)
    Figure an acceptable value for error, so you'll know when you're close
    enough.

    4)
    if the first three questions have good answers, then you could write a
    function that transforms FN into error. Then write a controlling loop
    that calls that function repeatedly, picking values for FN that will
    converge the error into ever-smaller value. The first iteration might
    go over the entire range, dividing it into maybe ten steps. Then pick
    the two smallest values for error, and treat those particular two FN
    values as your new range.

    Repeat until the error value is below the threshold figured in #3, or
    until you've iterated an unreasonable number of times.

    There are ways to improve on that, but they generally require you know
    the approximate behavior of the function. For example, Newton's method
    is a method of calculating square roots, starting with end points of 1
    and N, and it converges more rapidly because it effectively calculates
    the slope of the curve over each range.





    --

    DaveA
     
    Dave Angel, Jan 1, 2013
    #3
  4. Dave Angel Guest

    On 01/01/2013 11:03 AM, Chris Angelico wrote:
    > On Wed, Jan 2, 2013 at 2:40 AM, <> wrote:
    >> hi . . my name is usama khan
    >> i am the student of civil engeering and we got assignment to make a project program on flexible pavement design using python.
    >>
    >> i know very litle about programing. still learning from tutorials. u can call me a beginner.
    >> now i need to solve this equation so that i can put this in python but the formula of design is very complex
    >>
    >> Formula is :
    >>
    >> log(W18) = (Z)(S)+9.36log(SN+1) -2.0+(log(dpsi/(4.5-1.5))(/(.40+1094/(SN+1)^2.5)+2.32log(Mr-)-8.07
    >>
    >> every thing is constant except this SN. . i want to seperate SN like SN= rest of the stuff. how can i seprate it because manualy its impossible to take SN out.
    >> so plz help me out

    > This isn't a Python question, it's an algebra one. I don't know what
    > Z, S, and so on are, but for the most part, the basic rule of solving
    > equations applies: Do the same thing to both sides and it's still
    > true. Work on it until you can isolate SN on one side.


    Such a rule may not be able to solve an equation when there SN appears
    more than once on the RHS, and where it's inside a transcental
    function. I don't consider this an algebra problem, but a programming
    problem.

    > I don't know what this bit means, though:
    >
    > 2.32log(Mr-)
    >
    > Is this a transcription error? You can't subtract nullness from something.
    >
    > ChrisA


    Mr- was apparently intended to mean "M sub r", the subgrade resilient
    modulus
    <http://classes.engr.oregonstate.edu/cce/winter2012/ce492/Modules/04_design_parameters/04-2_body.htm#mr> (in
    psi). Just a number.

    The only thing i know about any of this is from here:

    http://classes.engr.oregonstate.edu/cce/winter2012/ce492/Modules/06_structural_design/06-3_body.htm



    --

    DaveA
     
    Dave Angel, Jan 1, 2013
    #4
  5. Usama Khan Guest

    am just a begginer bro. . jus learnt if elif while nd for loop. .

    can u just display me the coding u want. .it could save my time that i havewhile searchning SN out. . i will give u that dependable variables values.
     
    Usama Khan, Jan 1, 2013
    #5
  6. Usama Khan Guest

    am just a begginer bro. . jus learnt if elif while nd for loop. .

    can u just display me the coding u want. .it could save my time that i havewhile searchning SN out. . i will give u that dependable variables values.
     
    Usama Khan, Jan 1, 2013
    #6
  7. Usama Khan Guest

    Usama Khan, Jan 1, 2013
    #7
  8. Usama Khan Guest

    Usama Khan, Jan 1, 2013
    #8
  9. On Wed, Jan 2, 2013 at 3:42 AM, Dave Angel <> wrote:
    > On 01/01/2013 11:03 AM, Chris Angelico wrote:
    >> This isn't a Python question, it's an algebra one. I don't know what
    >> Z, S, and so on are, but for the most part, the basic rule of solving
    >> equations applies: Do the same thing to both sides and it's still
    >> true. Work on it until you can isolate SN on one side.

    >
    > Such a rule may not be able to solve an equation when there SN appears
    > more than once on the RHS, and where it's inside a transcental
    > function. I don't consider this an algebra problem, but a programming
    > problem.


    It's a tad more complicated than your average equation, and I haven't
    the time now to prove the point by actually solving it, but every
    operation that I can see in that formula can be reversed. The hairy
    bit is that there are two references to SN, so it's going to be a bit
    messy to untangle, and might end up as a higher-order equation.

    But you're likely right that other forms of solver may be more useful
    here. Algebra definitely _could_ be the solution, but it isn't
    necessarily the best.

    ChrisA
     
    Chris Angelico, Jan 1, 2013
    #9
  10. Roy Smith Guest

    In article <>,
    Usama Khan <> wrote:

    > am just a begginer bro.


    That's fine, we were all beginners once. You will discover that people
    here are willing to invest a lot of time and effort helping beginners
    get started.

    > now can u give me the coding of this equation as i need to save my time. . .i
    > am learning from tutorials. . so its taking lot of time. kindly consider my
    > request nd give me the code so that i can put it. .i dont want to losen up my
    > grade. .am trying hard. . .


    You will also discover that people are not willing to invest any effort
    to help if you are not also willing to invest your own effort. Nobody
    is going to just give you some code for your homework assignment so you
    don't have to put any time into it.
     
    Roy Smith, Jan 1, 2013
    #10
  11. On Wed, Jan 2, 2013 at 4:25 AM, Usama Khan <> wrote:
    > now can u give me the coding of this equation as i need to save my time. .. .i am learning from tutorials. . so its taking lot of time. kindly consider my request nd give me the code so that i can put it. .i dont want to losen up my grade. .am trying hard. . .


    You don't want to lose your grade, so you ask someone else to do your
    work for you. You haven't said what sort of class this is, but I see
    two likely possibilities:

    1) It's a programming class. Either you ought to be able to solve this
    in the class (in which case, look to your source material as it's
    almost certainly there - this is way more complicated maths than your
    average programming class wants as an ancillary), or you shouldn't be
    doing this part at all, and you can achieve the program's goal without
    actually running the maths.

    2) It's a course on something else (engineering?), to which this
    formula is central. Then you ought to understand the mathematics of
    it, regardless of the code.

    Either way, posting urgent messages to python-list asking for someone
    to *give you the code* is NOT the way to do things. We'll help you to
    learn; we won't help you to get grades you haven't merited. There are
    plenty of Q'n'A web sites out there with low standards and no
    scruples, but please just make sure you never build a bridge that I'll
    be travelling over.

    Read this, it'll help explain what people think of these sorts of questions:
    http://www.catb.org/esr/faqs/smart-questions.html#homework

    ChrisA
     
    Chris Angelico, Jan 1, 2013
    #11
  12. Usama Khan Guest

    u r right bro. . am serving my time. .realy i dont need a short cut code. .

    nor its a programing class. .
    i have chosen tis project on my own so that we can aviod that graph procedure. .

    i guess the program i am making on python has many many things. .not just the iteration. .i am not that cheap really to cheat my DS(director of studies). .i swear. .

    as i told i am half civil engieer. .in 5 th semester presently. .

    am ready to learn. . .still learning from tutorialz of "tekboi" and "investros" and that book name "python programing for absolute begginers"

    kindly understand me. .i can give u my time. .u got me wrong. i just ask for the coding of solving this formula as its not in the book as well as tutorialz. :(

    thanks for the concern. .
    regards
     
    Usama Khan, Jan 1, 2013
    #12
  13. Usama Khan Guest

    u r right bro. . am serving my time. .realy i dont need a short cut code. .

    nor its a programing class. .
    i have chosen tis project on my own so that we can aviod that graph procedure. .

    i guess the program i am making on python has many many things. .not just the iteration. .i am not that cheap really to cheat my DS(director of studies). .i swear. .

    as i told i am half civil engieer. .in 5 th semester presently. .

    am ready to learn. . .still learning from tutorialz of "tekboi" and "investros" and that book name "python programing for absolute begginers"

    kindly understand me. .i can give u my time. .u got me wrong. i just ask for the coding of solving this formula as its not in the book as well as tutorialz. :(

    thanks for the concern. .
    regards
     
    Usama Khan, Jan 1, 2013
    #13
  14. Usama Khan Guest

    how shud i intiate this equation myself. .can u give me some links to solvethat myself. . am ready already. .its a chalange for me now. . .i just requested for a code as i dont know nothing about iteration of that much complex equation not the entire program. .

    so kindly show me the way. .i will do it myself. .nd remember plz am nt that cheap to cheat. .cheater doesnot worry about grades. .just remember this..he just wants to clear the subject. . i have cleared the subject with excellent marks. .just spoiling my end semester vacation to get good grade andexpereince in programing. . . its totaly optional to go for project, internship or vacationz. .nd i have chosen up the project. . .i hope i have clearified your doubt regarding my amnitions and concerns. . ??

    so kindly show me the way. .i will go myself on that way. .because i dont know what way should go for this beautiful complex equatuion. .:)
     
    Usama Khan, Jan 1, 2013
    #14
  15. Usama Khan Guest

    how shud i intiate this equation myself. .can u give me some links to solvethat myself. . am ready already. .its a chalange for me now. . .i just requested for a code as i dont know nothing about iteration of that much complex equation not the entire program. .

    so kindly show me the way. .i will do it myself. .nd remember plz am nt that cheap to cheat. .cheater doesnot worry about grades. .just remember this..he just wants to clear the subject. . i have cleared the subject with excellent marks. .just spoiling my end semester vacation to get good grade andexpereince in programing. . . its totaly optional to go for project, internship or vacationz. .nd i have chosen up the project. . .i hope i have clearified your doubt regarding my amnitions and concerns. . ??

    so kindly show me the way. .i will go myself on that way. .because i dont know what way should go for this beautiful complex equatuion. .:)
     
    Usama Khan, Jan 1, 2013
    #15
  16. On Tuesday, 1 January 2013 22:55:21 UTC+5:30, Usama Khan wrote:
    > am just a begginer bro. . jus learnt if elif while nd for loop. .
    >
    >
    >
    > can u just display me the coding u want. .it could save my time that i have while searchning SN out. . i will give u that dependable variables values. .
    >
    >
    >
    > nd SN range 4 inches to 13.5 inches
    >
    >
    >
    > log(w18)=50x10^6
    >
    > Z=-1.645
    >
    > S=0.45
    >
    > dpsi=2.5
    >
    > Mr=5800
    >
    >
    >
    > now can u give me the coding of this equation as i need to save my time. .. .i am learning from tutorials. . so its taking lot of time. kindly consider my request nd give me the code so that i can put it. .i dont want to losen up my grade. .am trying hard. . .
    >
    >
    >
    > Regards


    If you spend half a minute extra to write your sentences properly and not use SMS abbreviations, then it would save totally many minutes of other people's time.
     
    Ramchandra Apte, Jan 2, 2013
    #16
  17. On Tuesday, 1 January 2013 22:55:21 UTC+5:30, Usama Khan wrote:
    > am just a begginer bro. . jus learnt if elif while nd for loop. .
    >
    >
    >
    > can u just display me the coding u want. .it could save my time that i have while searchning SN out. . i will give u that dependable variables values. .
    >
    >
    >
    > nd SN range 4 inches to 13.5 inches
    >
    >
    >
    > log(w18)=50x10^6
    >
    > Z=-1.645
    >
    > S=0.45
    >
    > dpsi=2.5
    >
    > Mr=5800
    >
    >
    >
    > now can u give me the coding of this equation as i need to save my time. .. .i am learning from tutorials. . so its taking lot of time. kindly consider my request nd give me the code so that i can put it. .i dont want to losen up my grade. .am trying hard. . .
    >
    >
    >
    > Regards


    If you spend half a minute extra to write your sentences properly and not use SMS abbreviations, then it would save totally many minutes of other people's time.
     
    Ramchandra Apte, Jan 2, 2013
    #17
  18. alex23 Guest

    On Jan 2, 3:20 pm, Ramchandra Apte <> wrote:
    > If you spend half a minute extra to write your sentences properly
    > and not use SMS abbreviations, then it would save totally many
    > minutes of other people's time.


    But that is not the way of the brogrammer... :)
     
    alex23, Jan 2, 2013
    #18
  19. DJC Guest

    On 02/01/13 05:20, Ramchandra Apte wrote:
    > On Tuesday, 1 January 2013 22:55:21 UTC+5:30, Usama Khan wrote:
    >> am just a begginer bro. . jus learnt if elif while nd for loop. .
    >> can u just display me the coding u want. .it could save my time that i have while searchning SN out. . i will give u that dependable variables values. .
    >> now can u give me the coding of this equation as i need to save my time. .. .i am learning from tutorials. . so its taking lot of time. kindly consider my request nd give me the code so that i can put it. .i dont want to losen up my grade. .am trying hard. . .


    > If you spend half a minute extra to write your sentences properly and not use SMS abbreviations, then it would save totally many minutes of other people's time.


    +1 not to mention that a polite, respectful, and well written request
    might incline more people to offer help.
     
    DJC, Jan 2, 2013
    #19
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. sonali
    Replies:
    2
    Views:
    4,919
    Ryan Stewart
    Mar 3, 2004
  2. PROBLEM FACER

    GOT STUCK IN JAVA

    PROBLEM FACER, Feb 13, 2006, in forum: Java
    Replies:
    10
    Views:
    620
    steve
    Feb 13, 2006
  3. Sumpfman

    Got stuck with wchar_t *argv[]

    Sumpfman, Nov 18, 2004, in forum: C Programming
    Replies:
    6
    Views:
    1,980
    Michael Mair
    Nov 18, 2004
  4. streamkid

    got stuck with cstdio

    streamkid, Mar 15, 2007, in forum: C++
    Replies:
    3
    Views:
    403
    David Harmon
    Mar 15, 2007
  5. Usama Khan

    got stuck in equation

    Usama Khan, Jan 1, 2013, in forum: Python
    Replies:
    0
    Views:
    108
    Usama Khan
    Jan 1, 2013
Loading...

Share This Page