Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Engineering Thread

1192022242560

Comments

  • Registered Users, Registered Users 2 Posts: 639 ✭✭✭devinejay


    Also have a program that churns out roman numerals like nobody's business. The only problem is it is quite cumbersome. I'm using four "switch" functions when I could probably have one in a function and call it four times. I guess I'll just do the usual and spend the free time before the actual lab in the mac lab, programming away, then regurgitate the program once again when the instructors arrive in, much to the bewilderment of my partner who possibly doesn't realize how long I've already spent on it. The joys of computer science.


  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,302 Mod ✭✭✭✭Jonathan


    devinejay wrote: »
    Also have a program that churns out roman numerals like nobody's business. The only problem is it is quite cumbersome. I'm using four "switch" functions when I could probably have one in a function and call it four times. I guess I'll just do the usual and spend the free time before the actual lab in the mac lab, programming away, then regurgitate the program once again when the instructors arrive in, much to the bewilderment of my partner who possibly doesn't realize how long I've already spent on it. The joys of computer science.
    One function could do it all if you pass it the appropriate roman letters.


  • Registered Users, Registered Users 2 Posts: 639 ✭✭✭devinejay


    jmccrohan wrote: »
    One function could do it all if you pass it the appropriate roman letters.

    well at the moment I have one function that returns roman numerals for a single digit, then I have four if statements checking whether it's dealing with tens, hundreds etc. which passes the appropriate numerals to the function which does it's thing, then at the end it adds it all together. Kinda what you mean?


  • Registered Users, Registered Users 2 Posts: 639 ✭✭✭devinejay


    Wankel engines in 1E8, don't get over excited Baza!


  • Registered Users, Registered Users 2 Posts: 1,488 ✭✭✭mathew


    who do you have for 1e8 now?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 639 ✭✭✭devinejay


    Professor David Taylor, it seems mechanical engineering is about as interesting to some people in the class as Anil Kokaram's stuff was for me.

    1E8, interesting?!!?:o


  • Registered Users, Registered Users 2 Posts: 5,699 ✭✭✭Brian


    The one time I miss 1E8, and he did rotaries.. bleh, I bet I knew it all already.
    dj-ygpm.


  • Registered Users, Registered Users 2 Posts: 582 ✭✭✭TheAmateur


    Anyone got any idea how to integrate:

    ∫4udu/-(u^4)-(2u^3)+(2u)+1

    ?
    I've been staring at it blankly for about two hours I think... got rid of the u up top to make
    ∫du/-(u^3)-(2u^2)+2+(u^-1)
    but don't see how that can help. It looks like there could be (or should be) some partial fraction thing I can do, but if there is I can't see it... and I've checked everything up to that point again and again and I keep getting left with the same integration...:(


  • Registered Users, Registered Users 2 Posts: 1,488 ✭✭✭mathew


    you sure you have the sum right??? answer is massive....


  • Registered Users, Registered Users 2 Posts: 582 ✭✭✭TheAmateur


    It could be wrong. I might as well start from the start and explain where I got ∫4udu/-(u^4)-(2u^3)+(2u)+1 from.
    The question is
    ∫dθ/cosθ+cotθ
    so I used u = tan (θ/2) and got
    ∫(2du/1+(u^2))/(1-(u^2)/1+(u^2))+(1-(u^2)/2u)

    simplified and got
    ∫2du/((2u-2(u^3)+1-(u^4))/2u)

    simplified again and got
    ∫4udu/-(u^4)-(2u^3)+(2u)+1

    How did you find out the answer is massive? I plugged it into Wolfram and got
    -4*(-1/(4*(1 + x)^2) + 1/(4*(1 + x)) + Log[-1 + x]/8 - Log[1 + x]/8)
    That what you mean by massive?


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 1,488 ✭✭✭mathew


    'fraid I dont have a clue... cant get anywhere with it.. tried trig functions and everything..
    Its prob something easy enought too.. always is :(

    big answer I got was from an online calculator.. attached..


  • Registered Users, Registered Users 2 Posts: 582 ✭✭✭TheAmateur


    mathew wrote: »
    'fraid I dont have a clue... cant get anywhere with it.. tried trig functions and everything..
    Its prob something easy enought too.. always is :(

    big answer I got was from an online calculator.. attached..
    Hmmm. Just figured out (u^4)+2(u^3)-2u-1 is (u-1)((u+1)^3). Any use? Maybe I can use partial fractions now? I've nearly given up though. I mean, it's only worth one mark!!!


  • Registered Users, Registered Users 2 Posts: 784 ✭✭✭Peleus


    TheAmateur wrote: »
    It could be wrong. I might as well start from the start and explain where I got ∫4udu/-(u^4)-(2u^3)+(2u)+1 from.
    The question is
    ∫dθ/cosθ+cotθ
    so I used u = tan (θ/2) and got
    ∫(2du/1+(u^2))/(1-(u^2)/1+(u^2))+(1-(u^2)/2u)

    simplified and got
    ∫2du/((2u-2(u^3)+1-(u^4))/2u)

    simplified again and got
    ∫4udu/-(u^4)-(2u^3)+(2u)+1

    How did you find out the answer is massive? I plugged it into Wolfram and got
    -4*(-1/(4*(1 + x)^2) + 1/(4*(1 + x)) + Log[-1 + x]/8 - Log[1 + x]/8)
    That what you mean by massive?



    type that into wiley, if its the right answer you'll get it right no matter how undersimplified it is.


  • Registered Users, Registered Users 2 Posts: 1,488 ✭✭✭mathew


    partial fractions with repeated roots arent the same as normal.. requires differentiation.. its very easy.. but not obvious..
    very well explained here: http://www.swarthmore.edu/NatSci/echeeve1/Ref/LPSA/PartialFraction/PartialFraction.html

    Might help..


  • Registered Users, Registered Users 2 Posts: 582 ✭✭✭TheAmateur


    Peleus wrote: »
    type that into wiley, if its the right answer you'll get it right no matter how undersimplified it is.
    Heh it's not wiley it's no. 4 of those extra questions he gave us! Remember?
    matthew wrote:
    partial fractions with repeated roots arent the same as normal.. requires differentiation.. its very easy.. but not obvious..
    very well explained here: http://www.swarthmore.edu/NatSci/ech...lFraction.html
    Might help..
    You should see the partial fraction equation now... it's like a monster! If I'm feeling super sadistic I might try work it out... it seems a shame to give up again after the breakthrough...


  • Registered Users, Registered Users 2 Posts: 5,699 ✭✭✭Brian


    Mathew, would you mind explaining the logic of this "cover-up" thing? I can't get my mind beyond the apparent division by zero..


  • Registered Users, Registered Users 2 Posts: 582 ✭✭✭TheAmateur


    Baza210 wrote: »
    Mathew, would you mind explaining the logic of this "cover-up" thing? I can't get my mind beyond the apparent division by zero..
    You trying the question too? I've officially given up. I haven't tried one or three, but I think I got two. It's for tuesday isn't it?


  • Registered Users, Registered Users 2 Posts: 5,699 ✭✭✭Brian


    Not trying them no, I suck at Maths. I'm just trying to understand the notes that Mathew linked to.

    I think the assignment's meant to determine who's been doing their integration using online integrators..

    >_>

    <_<


  • Registered Users, Registered Users 2 Posts: 582 ✭✭✭TheAmateur


    Baza210 wrote: »
    Not trying them no, I suck at Maths. I'm just trying to understand the notes that Mathew linked to.

    I think the assignment's meant to determine who's been doing their integration using online integrators..

    >_>

    <_<
    Online Integrators.... that's genius! Why didn't I think of that!!! All those hours...


  • Registered Users, Registered Users 2 Posts: 1,488 ✭✭✭mathew


    Baza210 wrote: »
    Mathew, would you mind explaining the logic of this "cover-up" thing? I can't get my mind beyond the apparent division by zero..

    I'll do my best.. hard to do on here...

    say we have A/(s+1) and B/(s+2)

    The 'logic' is kinda weird..
    To work out A, you find an s that will make the term under A 0, in our case thats -1.

    No go back to the original one you're trying to expand. Ignoring, or 'covering up' the term that is the same as the term under A, put in your value for s.

    That will give you the value of A.

    Now do the same for B.


    In the case where you have something like A/(s^2 + 1). In order for that term under A to be 0, the s^2 term has to be -1, therefore s = j ... ie the square root of -1.. It'll still work out..

    Very handy method, until you get to repeated roots when things get a bit more complicated..


  • Advertisement


  • ahhh 1st year. wiley plus.....piece-O-cake

    wait until 2nd year guys:( things get a lot harder

    i can only imagine what 3rd and 4th year are like:confused:


  • Moderators, Education Moderators, Home & Garden Moderators Posts: 8,302 Mod ✭✭✭✭Jonathan


    Trying to work out who you are Natalia Dirty Acid :)


  • Registered Users, Registered Users 2 Posts: 1,488 ✭✭✭mathew


    oh.. @Baza or Amature...
    could one of you post or pm me the solution to that integral problem when you get it.. its annoying me :)


  • Moderators, Science, Health & Environment Moderators Posts: 23,265 Mod ✭✭✭✭godtabh


    [quote=[Deleted User];59169458]ahhh 1st year. wiley plus.....piece-O-cake

    wait until 2nd year guys:( things get a lot harder

    i can only imagine what 3rd and 4th year are like:confused:[/QUOTE]

    Dont be telling lies
    Post edited by Boards.ie: Mike on


  • Registered Users, Registered Users 2 Posts: 5,699 ✭✭✭Brian


    My C++ has

    for
    while
    for
    for
    if
    else


    =/


  • Registered Users, Registered Users 2 Posts: 582 ✭✭✭TheAmateur


    Does
    it
    work?


    I've got
    for
    if
    if
    for
    if
    for
    if
    else
    for
    matthew wrote:
    oh.. @Baza or Amature...
    could one of you post or pm me the solution to that integral problem when you get it.. its annoying me smile.gif
    No problem... that is, if they ever give us the solution! Experiences so far have taught me not to expect any follow-up on assignments etc. given in. We're lucky if we even get them back, never mind marks and/or corrections. Still wondering if we'll ever get those reports we did for 1e8 back... I spent some time on that feckin thing.... Was it/is it always like this?


  • Registered Users, Registered Users 2 Posts: 373 ✭✭desertstorm


    [quote=[Deleted User];59169458]ahhh 1st year. wiley plus.....piece-O-cake

    wait until 2nd year guys:( things get a lot harder

    i can only imagine what 3rd and 4th year are like:confused:[/quote]

    actually apparently it gets easier, I have a friend in 4th year civil and she says she hasnt got any maths lectures, but its a ton of project work
    Post edited by Boards.ie: Mike on


  • Registered Users, Registered Users 2 Posts: 5,699 ✭✭✭Brian


    Frick. My array seems to have residual values, or whatever the heck they'd be called. There's values in the slots even though I haven't entered them. That means that I have to for-loop a negative value into every single slot before starting to input the array with a negative number sentinel..

    Picture_3_1.png
    The 4 bars on the right shouldn't be there at all.

    Picture_4_1.png
    What I get after the negative slot loading. Notice that the setw() bar still extends the same width :/


  • Registered Users, Registered Users 2 Posts: 1,488 ✭✭✭mathew


    TheAmateur wrote: »
    Does
    it
    work?


    I've got
    for
    if
    if
    for
    if
    for
    if
    else
    for


    No problem... that is, if they ever give us the solution! Experiences so far have taught me not to expect any follow-up on assignments etc. given in. We're lucky if we even get them back, never mind marks and/or corrections. Still wondering if we'll ever get those reports we did for 1e8 back... I spent some time on that feckin thing.... Was it/is it always like this?

    You get the 1e8 back eventually.. They take their time tho.. Never got a mark for autocad tho..


  • Advertisement
  • Closed Accounts Posts: 17,163 ✭✭✭✭Boston


    TheAmateur wrote: »

    No problem... that is, if they ever give us the solution! Experiences so far have taught me not to expect any follow-up on assignments etc. given in. We're lucky if we even get them back, never mind marks and/or corrections. Still wondering if we'll ever get those reports we did for 1e8 back... I spent some time on that feckin thing.... Was it/is it always like this?

    They're not paid to do corrections hence they're slow about doing them.

    Baza, you should always initialise your variables.


Advertisement