Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #35891 > unrolled thread
| Started by | usamazohad@gmail.com |
|---|---|
| First post | 2013-01-01 07:40 -0800 |
| Last post | 2013-01-01 13:09 -0800 |
| Articles | 20 — 9 participants |
Back to article view | Back to comp.lang.python
got stuck in equation usamazohad@gmail.com - 2013-01-01 07:40 -0800
Re: got stuck in equation Chris Angelico <rosuav@gmail.com> - 2013-01-02 03:03 +1100
Re: got stuck in equation Dave Angel <d@davea.name> - 2013-01-01 11:39 -0500
Re: got stuck in equation Dave Angel <d@davea.name> - 2013-01-01 11:42 -0500
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 09:25 -0800
Re: got stuck in equation Chris Angelico <rosuav@gmail.com> - 2013-01-02 04:51 +1100
Re: got stuck in equation Ramchandra Apte <maniandram01@gmail.com> - 2013-01-01 21:20 -0800
Re: got stuck in equation alex23 <wuwei23@gmail.com> - 2013-01-02 01:53 -0800
Re: got stuck in equation Ramchandra Apte <maniandram01@gmail.com> - 2013-01-01 21:20 -0800
Re: got stuck in equation DJC <djc@news.invalid> - 2013-01-02 14:44 +0000
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 09:25 -0800
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 09:30 -0800
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 09:30 -0800
Re: got stuck in equation Roy Smith <roy@panix.com> - 2013-01-01 12:47 -0500
Re: got stuck in equation Chris Angelico <rosuav@gmail.com> - 2013-01-02 04:44 +1100
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 10:00 -0800
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 10:12 -0800
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 10:12 -0800
Re: got stuck in equation Usama Khan <usamazohad@gmail.com> - 2013-01-01 10:00 -0800
Re: got stuck in equation Tim Roberts <timr@probo.com> - 2013-01-01 13:09 -0800
| From | usamazohad@gmail.com |
|---|---|
| Date | 2013-01-01 07:40 -0800 |
| Subject | got stuck in equation |
| Message-ID | <2043e377-00d8-49d7-a35a-0c52c869f70f@googlegroups.com> |
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
[toc] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-01-02 03:03 +1100 |
| Message-ID | <mailman.1516.1357056207.29569.python-list@python.org> |
| In reply to | #35891 |
On Wed, Jan 2, 2013 at 2:40 AM, <usamazohad@gmail.com> 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
[toc] | [prev] | [next] | [standalone]
| From | Dave Angel <d@davea.name> |
|---|---|
| Date | 2013-01-01 11:39 -0500 |
| Message-ID | <mailman.1517.1357058384.29569.python-list@python.org> |
| In reply to | #35891 |
On 01/01/2013 10:40 AM, usamazohad@gmail.com 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
[toc] | [prev] | [next] | [standalone]
| From | Dave Angel <d@davea.name> |
|---|---|
| Date | 2013-01-01 11:42 -0500 |
| Message-ID | <mailman.1518.1357058568.29569.python-list@python.org> |
| In reply to | #35891 |
On 01/01/2013 11:03 AM, Chris Angelico wrote: > On Wed, Jan 2, 2013 at 2:40 AM, <usamazohad@gmail.com> 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
[toc] | [prev] | [next] | [standalone]
| From | Usama Khan <usamazohad@gmail.com> |
|---|---|
| Date | 2013-01-01 09:25 -0800 |
| Message-ID | <02785889-0bd1-4b93-8f75-bde14d6932d6@googlegroups.com> |
| In reply to | #35894 |
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
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-01-02 04:51 +1100 |
| Message-ID | <mailman.1524.1357062695.29569.python-list@python.org> |
| In reply to | #35895 |
On Wed, Jan 2, 2013 at 4:25 AM, Usama Khan <usamazohad@gmail.com> 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
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2013-01-01 21:20 -0800 |
| Message-ID | <b0f981e0-29e5-4254-afee-8ba97fba72fa@googlegroups.com> |
| In reply to | #35895 |
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.
[toc] | [prev] | [next] | [standalone]
| From | alex23 <wuwei23@gmail.com> |
|---|---|
| Date | 2013-01-02 01:53 -0800 |
| Message-ID | <72e3a4af-c25c-4ee6-9e7a-976e066bc84a@vb8g2000pbb.googlegroups.com> |
| In reply to | #35960 |
On Jan 2, 3:20 pm, Ramchandra Apte <maniandra...@gmail.com> 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... :)
[toc] | [prev] | [next] | [standalone]
| From | Ramchandra Apte <maniandram01@gmail.com> |
|---|---|
| Date | 2013-01-01 21:20 -0800 |
| Message-ID | <mailman.1550.1357104026.29569.python-list@python.org> |
| In reply to | #35895 |
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.
[toc] | [prev] | [next] | [standalone]
| From | DJC <djc@news.invalid> |
|---|---|
| Date | 2013-01-02 14:44 +0000 |
| Message-ID | <kc1h5r$ii1$1@dont-email.me> |
| In reply to | #35961 |
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.
[toc] | [prev] | [next] | [standalone]
| From | Usama Khan <usamazohad@gmail.com> |
|---|---|
| Date | 2013-01-01 09:25 -0800 |
| Message-ID | <mailman.1521.1357061130.29569.python-list@python.org> |
| In reply to | #35894 |
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
[toc] | [prev] | [next] | [standalone]
| From | Usama Khan <usamazohad@gmail.com> |
|---|---|
| Date | 2013-01-01 09:30 -0800 |
| Message-ID | <d9fcd7f6-85a0-4f14-ad47-7000b0b1b681@googlegroups.com> |
| In reply to | #35896 |
Sn range is given in here. . www.dot.state.fl.us/rddesign/DS/08/IDx/514.pdf
[toc] | [prev] | [next] | [standalone]
| From | Usama Khan <usamazohad@gmail.com> |
|---|---|
| Date | 2013-01-01 09:30 -0800 |
| Message-ID | <mailman.1522.1357061436.29569.python-list@python.org> |
| In reply to | #35896 |
Sn range is given in here. . www.dot.state.fl.us/rddesign/DS/08/IDx/514.pdf
[toc] | [prev] | [next] | [standalone]
| From | Roy Smith <roy@panix.com> |
|---|---|
| Date | 2013-01-01 12:47 -0500 |
| Message-ID | <roy-80E95D.12474901012013@news.panix.com> |
| In reply to | #35896 |
In article <mailman.1521.1357061130.29569.python-list@python.org>, Usama Khan <usamazohad@gmail.com> 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.
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2013-01-02 04:44 +1100 |
| Message-ID | <mailman.1523.1357062295.29569.python-list@python.org> |
| In reply to | #35891 |
On Wed, Jan 2, 2013 at 3:42 AM, Dave Angel <d@davea.name> 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
[toc] | [prev] | [next] | [standalone]
| From | Usama Khan <usamazohad@gmail.com> |
|---|---|
| Date | 2013-01-01 10:00 -0800 |
| Message-ID | <74ed5f20-43ea-4962-849e-2f36e7fa4f9c@googlegroups.com> |
| In reply to | #35899 |
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
[toc] | [prev] | [next] | [standalone]
| From | Usama Khan <usamazohad@gmail.com> |
|---|---|
| Date | 2013-01-01 10:12 -0800 |
| Message-ID | <b9e69957-c496-43cf-989f-3f0b043f0a2c@googlegroups.com> |
| In reply to | #35902 |
how shud i intiate this equation myself. .can u give me some links to solve that 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 and expereince 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. .:)
[toc] | [prev] | [next] | [standalone]
| From | Usama Khan <usamazohad@gmail.com> |
|---|---|
| Date | 2013-01-01 10:12 -0800 |
| Message-ID | <mailman.1526.1357063959.29569.python-list@python.org> |
| In reply to | #35902 |
how shud i intiate this equation myself. .can u give me some links to solve that 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 and expereince 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. .:)
[toc] | [prev] | [next] | [standalone]
| From | Usama Khan <usamazohad@gmail.com> |
|---|---|
| Date | 2013-01-01 10:00 -0800 |
| Message-ID | <mailman.1525.1357063791.29569.python-list@python.org> |
| In reply to | #35899 |
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
[toc] | [prev] | [next] | [standalone]
| From | Tim Roberts <timr@probo.com> |
|---|---|
| Date | 2013-01-01 13:09 -0800 |
| Message-ID | <otj6e81p6vnk2mu653gvj0u1sdg904ati8@4ax.com> |
| In reply to | #35891 |
usamazohad@gmail.com wrote: > >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. Right. Algebraically, it isn't practical to solve this for SN. That probably means you're going to need a iterative solution. That is, you start with a guess, see how far off you are, and refine the guess until you narrow in on a solution. That means you'll have to figure out whether raising SN gets you closer or farther away from a solution. -- Tim Roberts, timr@probo.com Providenza & Boekelheide, Inc.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web