Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. Newton's first order numerical method.

Newton's first order numerical method.

Scheduled Pinned Locked Moved Algorithms
tutorialcomquestion
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MarkB777
    wrote on last edited by
    #1

    This is a homework question. If your against helping students, I understand. Given the differential equation : dy/dx + 2y = -5, y(0) = 3 Solve using Newton's first order numerical method, taking sufficient steps to estimate y when x = 2. I can't find any examples on how to solve the equation using this method. It would be appreciated if someone showed me how to do this, or pointed me to a useful example. Cheers,

    Mark Brock Click here to view my blog

    D T M 3 Replies Last reply
    0
    • M MarkB777

      This is a homework question. If your against helping students, I understand. Given the differential equation : dy/dx + 2y = -5, y(0) = 3 Solve using Newton's first order numerical method, taking sufficient steps to estimate y when x = 2. I can't find any examples on how to solve the equation using this method. It would be appreciated if someone showed me how to do this, or pointed me to a useful example. Cheers,

      Mark Brock Click here to view my blog

      D Offline
      D Offline
      DQNOK
      wrote on last edited by
      #2

      The numerical recipes book(s) has been a God-send for many of us. It was originally for Fortran, then translated to (a rather clunky, but functional) C. The really great thing is that they do a good job of explaining the algorithms. I have, for the most part, just used their explanations and written my own code. Here's a link to their older versions that you can read on-line. http://www.nrbook.com/a/[^] You can also find their most recent versions at www.nr.com The book will explain the Newton method, and have examples of it's use.

      David --------- Empirical studies indicate that 20% of the people drink 80% of the beer. With C++ developers, the rule is that 80% of the developers understand at most 20% of the language. It is not the same 20% for different people, so don't count on them to understand each other's code. http://yosefk.com/c++fqa/picture.html#fqa-6.6 ---------

      M 1 Reply Last reply
      0
      • D DQNOK

        The numerical recipes book(s) has been a God-send for many of us. It was originally for Fortran, then translated to (a rather clunky, but functional) C. The really great thing is that they do a good job of explaining the algorithms. I have, for the most part, just used their explanations and written my own code. Here's a link to their older versions that you can read on-line. http://www.nrbook.com/a/[^] You can also find their most recent versions at www.nr.com The book will explain the Newton method, and have examples of it's use.

        David --------- Empirical studies indicate that 20% of the people drink 80% of the beer. With C++ developers, the rule is that 80% of the developers understand at most 20% of the language. It is not the same 20% for different people, so don't count on them to understand each other's code. http://yosefk.com/c++fqa/picture.html#fqa-6.6 ---------

        M Offline
        M Offline
        MarkB777
        wrote on last edited by
        #3

        Thanks! :)

        Mark Brock Click here to view my blog

        1 Reply Last reply
        0
        • M MarkB777

          This is a homework question. If your against helping students, I understand. Given the differential equation : dy/dx + 2y = -5, y(0) = 3 Solve using Newton's first order numerical method, taking sufficient steps to estimate y when x = 2. I can't find any examples on how to solve the equation using this method. It would be appreciated if someone showed me how to do this, or pointed me to a useful example. Cheers,

          Mark Brock Click here to view my blog

          T Offline
          T Offline
          Tim Craig
          wrote on last edited by
          #4

          MarkBrock wrote:

          I can't find any examples on how to solve the equation using this method.

          You obviously haven't looked. :doh:

          Doing my part to piss off the religious right.

          M 1 Reply Last reply
          0
          • T Tim Craig

            MarkBrock wrote:

            I can't find any examples on how to solve the equation using this method.

            You obviously haven't looked. :doh:

            Doing my part to piss off the religious right.

            M Offline
            M Offline
            MarkB777
            wrote on last edited by
            #5

            Sure I have, I read this, searched Google, and found "Code Project Math Forum: Mathematics and Algorithms discussions - Full of people who love to solve differential equations"... ;).

            Mark Brock Click here to view my blog

            T 1 Reply Last reply
            0
            • M MarkB777

              Sure I have, I read this, searched Google, and found "Code Project Math Forum: Mathematics and Algorithms discussions - Full of people who love to solve differential equations"... ;).

              Mark Brock Click here to view my blog

              T Offline
              T Offline
              Tim Craig
              wrote on last edited by
              #6

              MarkBrock wrote:

              searched Google

              I searched Google[^] and the material David referenced, albeit in a different location, popped up on the first page. Actually, two different versions of that book. The implementations in the language specific versions of "Numerical Recipes" suck since they're crappy direct, probably machine generated, translations of the original FORTRAN.

              Doing my part to piss off the religious right.

              1 Reply Last reply
              0
              • M MarkB777

                This is a homework question. If your against helping students, I understand. Given the differential equation : dy/dx + 2y = -5, y(0) = 3 Solve using Newton's first order numerical method, taking sufficient steps to estimate y when x = 2. I can't find any examples on how to solve the equation using this method. It would be appreciated if someone showed me how to do this, or pointed me to a useful example. Cheers,

                Mark Brock Click here to view my blog

                M Offline
                M Offline
                MarkB777
                wrote on last edited by
                #7

                In case anyone cares... I found out that Newton's first order numerical method is actually Euler's method. y(h) = y(0) + h*(dy/dx). It is a way of estimating the solution of a differential equation. Cheers,

                Mark Brock Click here to view my blog

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups